@typeship-ax/mcp 0.21.0 → 0.22.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +15 -11
- package/README.md +22 -53
- package/api.json +9998 -10118
- package/api.md +8983 -9120
- package/dist/arguments.d.ts +47 -0
- package/dist/arguments.d.ts.map +1 -0
- package/dist/arguments.js +254 -0
- package/dist/core/http.d.ts +162 -19
- package/dist/core/http.d.ts.map +1 -1
- package/dist/core/http.js +381 -48
- package/dist/core/pagination.d.ts +42 -6
- package/dist/core/pagination.d.ts.map +1 -1
- package/dist/core/pagination.js +111 -17
- package/dist/credential-storage.d.ts +10 -3
- package/dist/credential-storage.d.ts.map +1 -1
- package/dist/credential-storage.js +15 -6
- package/dist/dates.d.ts +1 -1
- package/dist/dates.js +1 -1
- package/dist/errors.d.ts +20 -84
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +20 -108
- package/dist/fields.d.ts +29 -0
- package/dist/fields.d.ts.map +1 -0
- package/dist/fields.js +101 -0
- package/dist/index.d.ts +28 -18
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +35 -25
- package/dist/mcp-authorization.d.ts.map +1 -1
- package/dist/mcp-authorization.js +34 -10
- package/dist/mcp-protocol.d.ts +87 -44
- package/dist/mcp-protocol.d.ts.map +1 -1
- package/dist/mcp-protocol.js +552 -478
- package/dist/mcp.d.ts.map +1 -1
- package/dist/mcp.js +127 -28
- package/dist/named-credentials.d.ts +19 -0
- package/dist/named-credentials.d.ts.map +1 -1
- package/dist/named-credentials.js +81 -1
- package/dist/oauth-request.d.ts +7 -1
- package/dist/oauth-request.d.ts.map +1 -1
- package/dist/oauth-request.js +26 -4
- package/dist/oauth-session.d.ts +13 -1
- package/dist/oauth-session.d.ts.map +1 -1
- package/dist/oauth-session.js +34 -18
- package/dist/ops.d.ts +53 -5
- package/dist/ops.d.ts.map +1 -1
- package/dist/ops.js +49 -40
- package/dist/resources/api-keys.d.ts +10 -7
- package/dist/resources/api-keys.d.ts.map +1 -1
- package/dist/resources/api-keys.js +10 -31
- package/dist/resources/deliveries.d.ts +88 -4
- package/dist/resources/deliveries.d.ts.map +1 -1
- package/dist/resources/deliveries.js +95 -18
- package/dist/resources/drafts.d.ts +15 -15
- package/dist/resources/drafts.d.ts.map +1 -1
- package/dist/resources/drafts.js +11 -64
- package/dist/resources/files.d.ts +4 -4
- package/dist/resources/files.d.ts.map +1 -1
- package/dist/resources/files.js +3 -12
- package/dist/resources/generations.d.ts +14 -14
- package/dist/resources/generations.d.ts.map +1 -1
- package/dist/resources/generations.js +21 -45
- package/dist/resources/organization.d.ts +4 -4
- package/dist/resources/organization.d.ts.map +1 -1
- package/dist/resources/organization.js +3 -10
- package/dist/resources/{generate.d.ts → packages.d.ts} +16 -16
- package/dist/resources/packages.d.ts.map +1 -0
- package/dist/resources/{generate.js → packages.js} +13 -29
- package/dist/resources/projects.d.ts +50 -50
- package/dist/resources/projects.d.ts.map +1 -1
- package/dist/resources/projects.js +60 -116
- package/dist/resources/releases.d.ts +21 -16
- package/dist/resources/releases.d.ts.map +1 -1
- package/dist/resources/releases.js +18 -39
- package/dist/resources/spec-revisions.d.ts +15 -6
- package/dist/resources/spec-revisions.d.ts.map +1 -1
- package/dist/resources/spec-revisions.js +6 -28
- package/dist/resources/specs.d.ts +7 -7
- package/dist/resources/specs.d.ts.map +1 -1
- package/dist/resources/specs.js +6 -34
- package/dist/resources/targets.d.ts +48 -48
- package/dist/resources/targets.d.ts.map +1 -1
- package/dist/resources/targets.js +58 -114
- package/dist/schemas.d.ts.map +1 -1
- package/dist/schemas.js +78 -76
- package/dist/search.d.ts +54 -0
- package/dist/search.d.ts.map +1 -0
- package/dist/search.js +421 -0
- package/dist/types.d.ts +499 -339
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +18 -18
- package/dist/worker.js +2 -2
- package/package.json +5 -2
- package/server.json +5 -5
- package/src/arguments.ts +242 -0
- package/src/core/http.ts +457 -58
- package/src/core/pagination.ts +129 -18
- package/src/credential-storage.ts +16 -6
- package/src/dates.ts +1 -1
- package/src/errors.ts +46 -115
- package/src/fields.ts +91 -0
- package/src/index.ts +45 -28
- package/src/mcp-authorization.ts +29 -9
- package/src/mcp-protocol.ts +580 -428
- package/src/mcp.ts +113 -26
- package/src/named-credentials.ts +66 -1
- package/src/oauth-request.ts +32 -6
- package/src/oauth-session.ts +37 -19
- package/src/ops.ts +82 -44
- package/src/resources/api-keys.ts +34 -48
- package/src/resources/deliveries.ts +211 -30
- package/src/resources/drafts.ts +60 -107
- package/src/resources/files.ts +19 -20
- package/src/resources/generations.ts +57 -75
- package/src/resources/organization.ts +11 -16
- package/src/resources/{generate.ts → packages.ts} +43 -51
- package/src/resources/projects.ts +145 -200
- package/src/resources/releases.ts +48 -65
- package/src/resources/spec-revisions.ts +38 -47
- package/src/resources/specs.ts +39 -59
- package/src/resources/targets.ts +143 -193
- package/src/schemas.ts +78 -76
- package/src/search.ts +434 -0
- package/src/types.ts +538 -357
- package/src/worker.ts +2 -2
- package/dist/resources/generate.d.ts.map +0 -1
- package/dist/resources/publications.d.ts +0 -47
- package/dist/resources/publications.d.ts.map +0 -1
- package/dist/resources/publications.js +0 -70
- package/src/resources/publications.ts +0 -140
package/AGENTS.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Typeship: agent guide
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Instructions for coding agents that call the Typeship API through this MCP server (API version 1.0.0, package version 0.22.0).
|
|
4
4
|
|
|
5
5
|
Resolve an OpenAPI or GraphQL Spec, diagnose it, and keep every
|
|
6
6
|
selected CLI, MCP, and SDK Target current.
|
|
@@ -16,22 +16,26 @@ Examples use Parcel, a fictional delivery service. Replace its domains,
|
|
|
16
16
|
repository names, and resource identifiers with your own. The hosted
|
|
17
17
|
petstore Spec is a runnable sample.
|
|
18
18
|
|
|
19
|
-
##
|
|
20
|
-
-
|
|
21
|
-
-
|
|
19
|
+
## Before writing code
|
|
20
|
+
- `api.md` is the tool and schema reference; `api.json` is the machine-readable contract: every operation's inputs, outputs, errors, `safety` (`read`, `write`, or `destructive`), and an example. Look up exact names there instead of guessing.
|
|
21
|
+
- `README.md` covers installation and setup.
|
|
22
22
|
- Zero runtime dependencies; the program runs on Node.js 20+ and platform `fetch`.
|
|
23
|
-
- `api.md` is the tool and schema reference; `api.json` is the machine-readable operation, schema, safety, and example contract. Read them before guessing.
|
|
24
|
-
- Start with the local build or installation instructions in `README.md`. Generation does not publish a registry package.
|
|
25
23
|
|
|
26
24
|
## Authentication
|
|
27
25
|
- Bearer token: set the `TYPESHIP_TOKEN` environment variable.
|
|
28
26
|
|
|
29
27
|
## MCP server
|
|
30
|
-
-
|
|
31
|
-
-
|
|
32
|
-
- This package exposes the compact `search_docs`, `read_docs`, and `execute` surface. Find an operation, read its
|
|
28
|
+
- `README.md` shows how to connect an MCP client. The server supports MCP `2025-11-25` and `2026-07-28` and picks the version automatically; clients need no protocol flags.
|
|
29
|
+
- Clients start the server with `npx -y --package @typeship-ax/mcp typeship-mcp`. Set the auth environment variables in the client's configuration; `--read-only` removes write tools.
|
|
30
|
+
- This package exposes the compact `search_docs`, `read_docs`, and `execute` surface. Find an operation, read its arguments and example with `read_docs`, then call `execute` with its name and `arguments`; destructive operations return `CONFIRMATION_REQUIRED` until repeated with `confirm: true`. Operation names are not directly callable tools in this mode.
|
|
33
31
|
- Tool arguments are checked against the schema before any request (unknown or mistyped arguments are one `isError` result with per-argument issues); pass `fields` (dotted paths) to keep only the result keys you need; errors carry `code` and `next_steps`.
|
|
34
32
|
|
|
33
|
+
## Safety
|
|
34
|
+
- Read credentials from the environment or a secret store. Never hard-code them, print them, or put them in URLs or command arguments.
|
|
35
|
+
- Check an operation's `safety` in `api.json` before calling it. Confirm with the user before running a `write` or `destructive` operation they did not ask for.
|
|
36
|
+
- For exploration or reporting, run the MCP server with `--read-only` so no tool can write.
|
|
37
|
+
- Keep results small: select only the fields you need with `fields` (MCP).
|
|
38
|
+
|
|
35
39
|
## Documentation
|
|
36
40
|
- The reference for this exact package: `api.md` (offline, always current with the code).
|
|
37
|
-
- Conceptual guides live on the docs site. For questions about how the API's concepts fit together (flows, ordering, environments), fetch `https://typeship.dev/llms-full.txt` and read the relevant sections; `https://typeship.dev/llms.txt` is the page index. Relative links in the spec resolve against `https://typeship.dev`.
|
|
41
|
+
- Conceptual guides live on the docs site. For questions about how the API's concepts fit together (flows, ordering, environments), fetch `https://typeship.dev/llms-full.txt` and read the relevant sections; `https://typeship.dev/llms.txt` is the page index. Relative links in the spec resolve against `https://typeship.dev/docs`.
|
package/README.md
CHANGED
|
@@ -1,44 +1,22 @@
|
|
|
1
1
|
# @typeship-ax/mcp
|
|
2
2
|
|
|
3
|
-
MCP server for
|
|
3
|
+
MCP server for the Typeship API. [API reference](./api.md)
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Resolve an OpenAPI or GraphQL Spec, diagnose it, and keep every selected CLI, MCP, and SDK Target current.
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
- **Agent-ready MCP** — schema-derived tools, argument validation, read-only mode, and bounded results
|
|
7
|
+
## Installation
|
|
9
8
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
Run these commands in the downloaded or cloned package directory:
|
|
9
|
+
MCP clients start the server with `npx`, so it needs no separate installation (see [Connect an MCP client](#connect-an-mcp-client)). To install the `typeship-mcp` command globally instead:
|
|
13
10
|
|
|
14
11
|
```sh
|
|
15
|
-
npm install
|
|
16
|
-
npm run build
|
|
12
|
+
npm install --global @typeship-ax/mcp@0.22.0
|
|
17
13
|
```
|
|
18
14
|
|
|
19
|
-
Requires Node.js 20+.
|
|
20
|
-
|
|
21
|
-
To run the local MCP server, configure your MCP client with `node` and the absolute path to `dist/mcp.js`, as shown below. The server communicates over stdio.
|
|
22
|
-
|
|
23
|
-
## Install a published package
|
|
24
|
-
|
|
25
|
-
Generation does not publish a package. Before using the registry command below, confirm `name` and `version` in `package.json`, publish under a name you control, and verify that release is available on npm.
|
|
26
|
-
|
|
27
|
-
```sh
|
|
28
|
-
npm install --global @typeship-ax/mcp@0.21.0
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
## MCP client requirements
|
|
32
|
-
|
|
33
|
-
Connect with your client's default settings. This server supports MCP `2025-11-25` and `2026-07-28` automatically; no protocol environment variables are required. After registering it, run `claude mcp list` to verify a Claude Code connection.
|
|
15
|
+
Requires Node.js 20+.
|
|
34
16
|
|
|
35
|
-
## Connect
|
|
17
|
+
## Connect an MCP client
|
|
36
18
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
Authentication: provide `TYPESHIP_TOKEN` through the MCP client's environment or secret settings. Keep credential values out of URLs and command arguments.
|
|
40
|
-
|
|
41
|
-
For Cursor, merge a local or remote server entry from this README into `mcpServers` in `.cursor/mcp.json`, then enable the server in Cursor’s MCP settings.
|
|
19
|
+
Provide `TYPESHIP_TOKEN` through the MCP client's environment or secret settings. Keep credential values out of URLs and command arguments.
|
|
42
20
|
|
|
43
21
|
### Local
|
|
44
22
|
|
|
@@ -64,17 +42,20 @@ For Cursor, merge a local or remote server entry from this README into `mcpServe
|
|
|
64
42
|
- Codex: `codex mcp add typeship-readonly --url https://typeship.dev/mcp/readonly`
|
|
65
43
|
- [Install in VS Code](vscode:mcp/install?%7B%22name%22%3A%22typeship-readonly%22%2C%22type%22%3A%22http%22%2C%22url%22%3A%22https%3A%2F%2Ftypeship.dev%2Fmcp%2Freadonly%22%7D)
|
|
66
44
|
|
|
67
|
-
|
|
45
|
+
### Other clients
|
|
68
46
|
|
|
69
|
-
|
|
47
|
+
Add a server entry to your client's MCP configuration. For Cursor, merge it into `mcpServers` in `.cursor/mcp.json`, then enable the server in Cursor's MCP settings:
|
|
70
48
|
|
|
71
49
|
```json
|
|
72
50
|
{
|
|
73
51
|
"mcpServers": {
|
|
74
52
|
"typeship": {
|
|
75
|
-
"command": "
|
|
53
|
+
"command": "npx",
|
|
76
54
|
"args": [
|
|
77
|
-
"
|
|
55
|
+
"-y",
|
|
56
|
+
"--package",
|
|
57
|
+
"@typeship-ax/mcp",
|
|
58
|
+
"typeship-mcp"
|
|
78
59
|
],
|
|
79
60
|
"env": {
|
|
80
61
|
"TYPESHIP_TOKEN": "replace-with-your-credential"
|
|
@@ -84,28 +65,16 @@ A zero-dependency stdio server exposing a compact discovery surface: `search_doc
|
|
|
84
65
|
}
|
|
85
66
|
```
|
|
86
67
|
|
|
87
|
-
Replace the
|
|
88
|
-
|
|
89
|
-
For Claude Code, you can register the local build from the shell configured above:
|
|
90
|
-
|
|
91
|
-
```sh
|
|
92
|
-
claude mcp add --transport stdio typeship -- node /absolute/path/to/package/dist/mcp.js
|
|
93
|
-
claude mcp list
|
|
94
|
-
```
|
|
95
|
-
|
|
96
|
-
Replace the credential placeholder using the MCP client's secret storage when it has one. The local server reads `TYPESHIP_TOKEN` from its environment; credentials never belong in command arguments. If you also generated the CLI, its `typeship login` command stores credentials the local MCP server can reuse.
|
|
68
|
+
Replace the credential placeholder using the MCP client's secret storage when it has one. The server reads `TYPESHIP_TOKEN` from its environment; credentials never belong in command arguments.
|
|
97
69
|
|
|
98
|
-
|
|
70
|
+
The server supports MCP `2025-11-25` and `2026-07-28` and picks the version automatically, so clients need no protocol settings. After registering it with Claude Code, `claude mcp list` shows the connection.
|
|
99
71
|
|
|
100
|
-
|
|
72
|
+
## Tools
|
|
101
73
|
|
|
102
|
-
|
|
74
|
+
The server runs over stdio with no runtime dependencies and exposes a compact discovery surface: `search_docs`, `read_docs`, and `execute`. Read an operation before executing it to get its arguments, an example, and its safety classification.
|
|
103
75
|
|
|
104
|
-
|
|
76
|
+
Tool input schemas come from the OpenAPI spec, so agents see real parameter types and required fields. Arguments are checked before anything reaches the API (unknown or mistyped ones come back as one `isError` result, nothing is dropped), every tool takes `fields` to keep only the result keys it needs, and errors carry a stable `code` and `next_steps`.
|
|
105
77
|
|
|
106
|
-
|
|
78
|
+
Add `--read-only` to `args` (or set `TYPESHIP_MCP_READ_ONLY=1`) for a server that cannot write, `--tools projects,specs` (or `TYPESHIP_MCP_TOOLS`) to expose a subset, and `TYPESHIP_MCP_MAX_RESULT_CHARS` to change the result size cap (64,000).
|
|
107
79
|
|
|
108
|
-
|
|
109
|
-
npm run mcp:validate
|
|
110
|
-
npm run mcp:publish
|
|
111
|
-
```
|
|
80
|
+
Generated from the OpenAPI spec by [Typeship](https://typeship.dev).
|