@typeship-ax/mcp 0.6.0 → 0.9.1
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 +31 -0
- package/README.md +67 -10
- package/api.json +6735 -3243
- package/api.md +8537 -248
- package/dist/api-identity.d.ts +40 -0
- package/dist/api-identity.d.ts.map +1 -0
- package/dist/api-identity.js +128 -0
- package/dist/auth-profiles.d.ts +30 -0
- package/dist/auth-profiles.d.ts.map +1 -0
- package/dist/auth-profiles.js +138 -0
- package/dist/core/http.d.ts +21 -92
- package/dist/core/http.d.ts.map +1 -1
- package/dist/core/http.js +143 -221
- package/dist/core/pagination.d.ts.map +1 -1
- package/dist/core/pagination.js +6 -34
- package/dist/credential-storage.d.ts +24 -0
- package/dist/credential-storage.d.ts.map +1 -0
- package/dist/credential-storage.js +207 -0
- package/dist/dates.d.ts +0 -2
- package/dist/dates.d.ts.map +1 -1
- package/dist/dates.js +0 -1
- package/dist/docs.d.ts +36 -0
- package/dist/docs.d.ts.map +1 -0
- package/dist/docs.js +258 -0
- package/dist/errors.d.ts +42 -34
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +30 -20
- package/dist/index.d.ts +27 -12
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +40 -14
- package/dist/mcp-authorization.d.ts +52 -0
- package/dist/mcp-authorization.d.ts.map +1 -0
- package/dist/mcp-authorization.js +232 -0
- package/dist/mcp-protocol.d.ts +69 -25
- package/dist/mcp-protocol.d.ts.map +1 -1
- package/dist/mcp-protocol.js +386 -138
- package/dist/mcp.d.ts +21 -3
- package/dist/mcp.d.ts.map +1 -1
- package/dist/mcp.js +199 -85
- package/dist/named-credentials.d.ts +21 -0
- package/dist/named-credentials.d.ts.map +1 -0
- package/dist/named-credentials.js +86 -0
- package/dist/oauth-request.d.ts +21 -0
- package/dist/oauth-request.d.ts.map +1 -0
- package/dist/oauth-request.js +119 -0
- package/dist/oauth-session.d.ts +106 -0
- package/dist/oauth-session.d.ts.map +1 -0
- package/dist/oauth-session.js +244 -0
- package/dist/ops.d.ts +18 -0
- package/dist/ops.d.ts.map +1 -1
- package/dist/ops.js +31 -17
- package/dist/resources/account.d.ts +4 -4
- package/dist/resources/account.d.ts.map +1 -1
- package/dist/resources/account.js +1 -0
- package/dist/resources/api-keys.d.ts +13 -8
- package/dist/resources/api-keys.d.ts.map +1 -1
- package/dist/resources/api-keys.js +5 -1
- package/dist/resources/definition-revisions.d.ts +58 -0
- package/dist/resources/definition-revisions.d.ts.map +1 -0
- package/dist/resources/definition-revisions.js +114 -0
- package/dist/resources/definitions.d.ts +35 -0
- package/dist/resources/definitions.d.ts.map +1 -0
- package/dist/resources/definitions.js +60 -0
- package/dist/resources/generate.d.ts +18 -7
- package/dist/resources/generate.d.ts.map +1 -1
- package/dist/resources/generate.js +13 -5
- package/dist/resources/generations.d.ts +6 -6
- package/dist/resources/generations.d.ts.map +1 -1
- package/dist/resources/generations.js +3 -1
- package/dist/resources/projects.d.ts +111 -35
- package/dist/resources/projects.d.ts.map +1 -1
- package/dist/resources/projects.js +125 -15
- package/dist/resources/targets.d.ts +97 -0
- package/dist/resources/targets.d.ts.map +1 -0
- package/dist/resources/targets.js +197 -0
- package/dist/schemas.d.ts.map +1 -1
- package/dist/schemas.js +135 -62
- package/dist/types.d.ts +2072 -267
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +20 -3
- package/dist/worker.js +4 -4
- package/package.json +11 -1
- package/server.json +42 -0
- package/src/api-identity.ts +98 -0
- package/src/auth-profiles.ts +114 -0
- package/src/core/http.ts +156 -305
- package/src/core/pagination.ts +6 -30
- package/src/credential-storage.ts +183 -0
- package/src/dates.ts +0 -1
- package/src/docs.ts +239 -0
- package/src/errors.ts +52 -41
- package/src/index.ts +49 -14
- package/src/mcp-authorization.ts +211 -0
- package/src/mcp-protocol.ts +432 -133
- package/src/mcp.ts +204 -90
- package/src/named-credentials.ts +74 -0
- package/src/oauth-request.ts +90 -0
- package/src/oauth-session.ts +258 -0
- package/src/ops.ts +56 -17
- package/src/resources/account.ts +6 -3
- package/src/resources/api-keys.ts +27 -7
- package/src/resources/definition-revisions.ts +207 -0
- package/src/resources/definitions.ts +122 -0
- package/src/resources/generate.ts +29 -6
- package/src/resources/generations.ts +9 -4
- package/src/resources/projects.ts +274 -41
- package/src/resources/targets.ts +378 -0
- package/src/schemas.ts +135 -62
- package/src/types.ts +2273 -322
- package/src/worker.ts +4 -4
- package/dist/resources/spec-revisions.d.ts +0 -47
- package/dist/resources/spec-revisions.d.ts.map +0 -1
- package/dist/resources/spec-revisions.js +0 -90
- package/src/resources/spec-revisions.ts +0 -150
package/AGENTS.md
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# typeship — agent context
|
|
2
|
+
|
|
3
|
+
This package contains the generated MCP server for **typeship** (API v1.0.0, package v0.9.1).
|
|
4
|
+
|
|
5
|
+
Resolve an OpenAPI or GraphQL Definition, diagnose it, and keep every
|
|
6
|
+
selected SDK, CLI, and MCP Target current.
|
|
7
|
+
|
|
8
|
+
Every operation but one requires a bearer credential: an organization
|
|
9
|
+
API key from the console, or an OAuth access token carrying the operation's
|
|
10
|
+
read, generate, or write capability and the organization selected during
|
|
11
|
+
consent. OAuth grants cannot switch organizations after consent. A browser
|
|
12
|
+
session is not a credential for this API. The exception is POST /generate,
|
|
13
|
+
which works anonymously with the free plan's limits.
|
|
14
|
+
|
|
15
|
+
## Ground rules
|
|
16
|
+
- Typeship owns the files it generates. Change the API definition, generation settings, or definition patches, then regenerate those files. Repository delivery preserves files outside its generated-file ownership manifest; preserving a file does not add it to the package's exports, build, or tests.
|
|
17
|
+
- Zero runtime dependencies; the program runs on Node.js 18+ and platform `fetch`.
|
|
18
|
+
- `api.md` is the tool and schema reference; `api.json` is the machine-readable operation, schema, safety, and example contract. Read them before guessing.
|
|
19
|
+
- Start with the local build or installation instructions in `README.md`. Generation does not publish a registry package.
|
|
20
|
+
|
|
21
|
+
## Authentication
|
|
22
|
+
- Bearer token: set the `TYPESHIP_TOKEN` environment variable.
|
|
23
|
+
|
|
24
|
+
## MCP server
|
|
25
|
+
- Build the package and configure your MCP client to run `node` with the absolute path to `dist/mcp.js`. After publishing, you can use `npx -y --package @typeship-ax/mcp typeship-mcp`. Set the package's auth environment variables in that client; `--read-only` prevents write tools.
|
|
26
|
+
- This package exposes the compact `search_docs`, `read_docs`, and `execute` surface. Find an operation, read its complete contract, 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.
|
|
27
|
+
- 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`.
|
|
28
|
+
|
|
29
|
+
## Documentation
|
|
30
|
+
- The reference for this exact package: `api.md` (offline, always current with the code).
|
|
31
|
+
- 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`.
|
package/README.md
CHANGED
|
@@ -4,29 +4,73 @@ MCP server for typeship. [API reference](./api.md)
|
|
|
4
4
|
|
|
5
5
|
Generated from the OpenAPI spec by [typeship](https://typeship.dev). Change the spec or generation settings, then regenerate; generated files are not hand-edited.
|
|
6
6
|
|
|
7
|
-
- **Zero runtime dependencies** — built on the platform `fetch`
|
|
7
|
+
- **Zero runtime dependencies** — built on the platform `fetch` in Node 18+
|
|
8
8
|
- **Agent-ready MCP** — schema-derived tools, argument validation, read-only mode, and bounded results
|
|
9
9
|
|
|
10
|
-
##
|
|
10
|
+
## Build from source
|
|
11
|
+
|
|
12
|
+
Run these commands in the downloaded or cloned package directory:
|
|
11
13
|
|
|
12
14
|
```sh
|
|
13
|
-
npm install
|
|
15
|
+
npm install
|
|
16
|
+
npm run build
|
|
14
17
|
```
|
|
15
18
|
|
|
19
|
+
Requires Node.js 18+. The package is ESM.
|
|
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.9.1
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## Connect after publishing
|
|
32
|
+
|
|
33
|
+
The npm connections below require `@typeship-ax/mcp` to be published under your package identity. To use downloaded source before publishing, use the local configuration in the next section. Hosted connections require a deployed server.
|
|
34
|
+
|
|
35
|
+
Authentication: provide `TYPESHIP_TOKEN` through the MCP client's environment or secret settings. Keep credential values out of URLs and command arguments.
|
|
36
|
+
|
|
37
|
+
> **Cursor:** Cursor 3.2 is not supported: it opens with the legacy initialize handshake, while this server speaks MCP 2026-07-28.
|
|
38
|
+
|
|
39
|
+
### Local
|
|
40
|
+
|
|
41
|
+
- Claude Code: `claude mcp add typeship -- npx -y --package @typeship-ax/mcp typeship-mcp`
|
|
42
|
+
- Codex: `codex mcp add typeship -- npx -y --package @typeship-ax/mcp typeship-mcp`
|
|
43
|
+
- [Install in VS Code](vscode:mcp/install?%7B%22name%22%3A%22typeship%22%2C%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22--package%22%2C%22%40typeship-ax%2Fmcp%22%2C%22typeship-mcp%22%5D%7D)
|
|
44
|
+
|
|
45
|
+
### Local · read-only
|
|
46
|
+
|
|
47
|
+
- Claude Code: `claude mcp add typeship-readonly -- npx -y --package @typeship-ax/mcp typeship-mcp --read-only`
|
|
48
|
+
- Codex: `codex mcp add typeship-readonly -- npx -y --package @typeship-ax/mcp typeship-mcp --read-only`
|
|
49
|
+
- [Install in VS Code](vscode:mcp/install?%7B%22name%22%3A%22typeship-readonly%22%2C%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22--package%22%2C%22%40typeship-ax%2Fmcp%22%2C%22typeship-mcp%22%2C%22--read-only%22%5D%7D)
|
|
50
|
+
|
|
51
|
+
### Hosted
|
|
52
|
+
|
|
53
|
+
- Claude Code: `claude mcp add --transport http typeship https://typeship.dev/mcp`
|
|
54
|
+
- Codex: `codex mcp add typeship --url https://typeship.dev/mcp`
|
|
55
|
+
- [Install in VS Code](vscode:mcp/install?%7B%22name%22%3A%22typeship%22%2C%22type%22%3A%22http%22%2C%22url%22%3A%22https%3A%2F%2Ftypeship.dev%2Fmcp%22%7D)
|
|
56
|
+
|
|
57
|
+
### Hosted · read-only
|
|
58
|
+
|
|
59
|
+
- Claude Code: `claude mcp add --transport http typeship-readonly https://typeship.dev/mcp/readonly`
|
|
60
|
+
- Codex: `codex mcp add typeship-readonly --url https://typeship.dev/mcp/readonly`
|
|
61
|
+
- [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)
|
|
62
|
+
|
|
16
63
|
## MCP server
|
|
17
64
|
|
|
18
|
-
A zero-dependency stdio server exposing a compact discovery surface: `search_docs`, `read_docs`, and `execute`. Read an operation before executing it to get its complete schema, example arguments, and safety classification.
|
|
65
|
+
A zero-dependency stdio server exposing a compact discovery surface: `search_docs`, `read_docs`, and `execute`. Read an operation before executing it to get its complete schema, example arguments, and safety classification. After building, add the local server to an MCP client:
|
|
19
66
|
|
|
20
67
|
```json
|
|
21
68
|
{
|
|
22
69
|
"mcpServers": {
|
|
23
70
|
"typeship": {
|
|
24
|
-
"command": "
|
|
71
|
+
"command": "node",
|
|
25
72
|
"args": [
|
|
26
|
-
"
|
|
27
|
-
"--package",
|
|
28
|
-
"@typeship-ax/mcp",
|
|
29
|
-
"typeship-mcp"
|
|
73
|
+
"/absolute/path/to/package/dist/mcp.js"
|
|
30
74
|
],
|
|
31
75
|
"env": {
|
|
32
76
|
"TYPESHIP_TOKEN": "replace-with-your-credential"
|
|
@@ -36,8 +80,21 @@ A zero-dependency stdio server exposing a compact discovery surface: `search_doc
|
|
|
36
80
|
}
|
|
37
81
|
```
|
|
38
82
|
|
|
83
|
+
Replace the path with the absolute path to this package's built `dist/mcp.js`.
|
|
84
|
+
|
|
39
85
|
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.
|
|
40
86
|
|
|
41
87
|
Tool input schemas are derived 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`.
|
|
42
88
|
|
|
43
|
-
Add `--read-only` to `args` (or set `TYPESHIP_MCP_READ_ONLY=1`) for a server that cannot write, `--tools
|
|
89
|
+
Add `--read-only` to `args` (or set `TYPESHIP_MCP_READ_ONLY=1`) for a server that cannot write, `--tools generate,projects` (or `TYPESHIP_MCP_TOOLS`) to expose a subset, and `TYPESHIP_MCP_MAX_RESULT_CHARS` to change the result size cap (64,000).
|
|
90
|
+
|
|
91
|
+
## MCP Registry
|
|
92
|
+
|
|
93
|
+
`server.json` describes the npm executable and any hosted transports. Its `dev.typeship/typeship` identity matches `package.json#mcpName`.
|
|
94
|
+
|
|
95
|
+
Install the official `mcp-publisher`, publish this npm package first, then validate or publish the listing:
|
|
96
|
+
|
|
97
|
+
```bash
|
|
98
|
+
npm run mcp:validate
|
|
99
|
+
npm run mcp:publish
|
|
100
|
+
```
|