@typeship-ax/mcp 0.21.0 → 0.23.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.
Files changed (133) hide show
  1. package/AGENTS.md +15 -11
  2. package/README.md +22 -53
  3. package/api.json +9998 -10118
  4. package/api.md +8983 -9120
  5. package/dist/arguments.d.ts +54 -0
  6. package/dist/arguments.d.ts.map +1 -0
  7. package/dist/arguments.js +265 -0
  8. package/dist/core/http.d.ts +162 -19
  9. package/dist/core/http.d.ts.map +1 -1
  10. package/dist/core/http.js +381 -48
  11. package/dist/core/pagination.d.ts +42 -6
  12. package/dist/core/pagination.d.ts.map +1 -1
  13. package/dist/core/pagination.js +111 -17
  14. package/dist/credential-storage.d.ts +10 -3
  15. package/dist/credential-storage.d.ts.map +1 -1
  16. package/dist/credential-storage.js +15 -6
  17. package/dist/dates.d.ts +1 -1
  18. package/dist/dates.js +1 -1
  19. package/dist/errors.d.ts +20 -84
  20. package/dist/errors.d.ts.map +1 -1
  21. package/dist/errors.js +20 -108
  22. package/dist/fields.d.ts +36 -0
  23. package/dist/fields.d.ts.map +1 -0
  24. package/dist/fields.js +187 -0
  25. package/dist/index.d.ts +28 -18
  26. package/dist/index.d.ts.map +1 -1
  27. package/dist/index.js +35 -25
  28. package/dist/mcp-authorization.d.ts.map +1 -1
  29. package/dist/mcp-authorization.js +34 -10
  30. package/dist/mcp-protocol.d.ts +108 -44
  31. package/dist/mcp-protocol.d.ts.map +1 -1
  32. package/dist/mcp-protocol.js +780 -484
  33. package/dist/mcp.d.ts.map +1 -1
  34. package/dist/mcp.js +129 -29
  35. package/dist/named-credentials.d.ts +19 -0
  36. package/dist/named-credentials.d.ts.map +1 -1
  37. package/dist/named-credentials.js +81 -1
  38. package/dist/oauth-request.d.ts +7 -1
  39. package/dist/oauth-request.d.ts.map +1 -1
  40. package/dist/oauth-request.js +26 -4
  41. package/dist/oauth-session.d.ts +13 -1
  42. package/dist/oauth-session.d.ts.map +1 -1
  43. package/dist/oauth-session.js +34 -18
  44. package/dist/ops.d.ts +58 -5
  45. package/dist/ops.d.ts.map +1 -1
  46. package/dist/ops.js +110 -41
  47. package/dist/resources/api-keys.d.ts +10 -7
  48. package/dist/resources/api-keys.d.ts.map +1 -1
  49. package/dist/resources/api-keys.js +10 -31
  50. package/dist/resources/deliveries.d.ts +89 -5
  51. package/dist/resources/deliveries.d.ts.map +1 -1
  52. package/dist/resources/deliveries.js +96 -19
  53. package/dist/resources/drafts.d.ts +16 -16
  54. package/dist/resources/drafts.d.ts.map +1 -1
  55. package/dist/resources/drafts.js +12 -65
  56. package/dist/resources/files.d.ts +4 -4
  57. package/dist/resources/files.d.ts.map +1 -1
  58. package/dist/resources/files.js +3 -12
  59. package/dist/resources/generations.d.ts +16 -16
  60. package/dist/resources/generations.d.ts.map +1 -1
  61. package/dist/resources/generations.js +23 -47
  62. package/dist/resources/organization.d.ts +4 -4
  63. package/dist/resources/organization.d.ts.map +1 -1
  64. package/dist/resources/organization.js +3 -10
  65. package/dist/resources/{generate.d.ts → packages.d.ts} +16 -16
  66. package/dist/resources/packages.d.ts.map +1 -0
  67. package/dist/resources/{generate.js → packages.js} +13 -29
  68. package/dist/resources/projects.d.ts +50 -50
  69. package/dist/resources/projects.d.ts.map +1 -1
  70. package/dist/resources/projects.js +60 -116
  71. package/dist/resources/releases.d.ts +22 -17
  72. package/dist/resources/releases.d.ts.map +1 -1
  73. package/dist/resources/releases.js +19 -40
  74. package/dist/resources/spec-revisions.d.ts +16 -7
  75. package/dist/resources/spec-revisions.d.ts.map +1 -1
  76. package/dist/resources/spec-revisions.js +7 -29
  77. package/dist/resources/specs.d.ts +7 -7
  78. package/dist/resources/specs.d.ts.map +1 -1
  79. package/dist/resources/specs.js +6 -34
  80. package/dist/resources/targets.d.ts +49 -49
  81. package/dist/resources/targets.d.ts.map +1 -1
  82. package/dist/resources/targets.js +59 -115
  83. package/dist/schemas.d.ts.map +1 -1
  84. package/dist/schemas.js +78 -76
  85. package/dist/search.d.ts +54 -0
  86. package/dist/search.d.ts.map +1 -0
  87. package/dist/search.js +421 -0
  88. package/dist/type-docs.d.ts +61 -0
  89. package/dist/type-docs.d.ts.map +1 -0
  90. package/dist/type-docs.js +174 -0
  91. package/dist/types.d.ts +499 -339
  92. package/dist/types.d.ts.map +1 -1
  93. package/dist/types.js +18 -18
  94. package/dist/worker.js +2 -2
  95. package/package.json +5 -2
  96. package/server.json +5 -5
  97. package/src/arguments.ts +254 -0
  98. package/src/core/http.ts +457 -58
  99. package/src/core/pagination.ts +129 -18
  100. package/src/credential-storage.ts +16 -6
  101. package/src/dates.ts +1 -1
  102. package/src/errors.ts +46 -115
  103. package/src/fields.ts +167 -0
  104. package/src/index.ts +45 -28
  105. package/src/mcp-authorization.ts +29 -9
  106. package/src/mcp-protocol.ts +808 -435
  107. package/src/mcp.ts +115 -27
  108. package/src/named-credentials.ts +66 -1
  109. package/src/oauth-request.ts +32 -6
  110. package/src/oauth-session.ts +37 -19
  111. package/src/ops.ts +146 -45
  112. package/src/resources/api-keys.ts +34 -48
  113. package/src/resources/deliveries.ts +213 -32
  114. package/src/resources/drafts.ts +62 -109
  115. package/src/resources/files.ts +19 -20
  116. package/src/resources/generations.ts +61 -79
  117. package/src/resources/organization.ts +11 -16
  118. package/src/resources/{generate.ts → packages.ts} +43 -51
  119. package/src/resources/projects.ts +145 -200
  120. package/src/resources/releases.ts +50 -67
  121. package/src/resources/spec-revisions.ts +40 -49
  122. package/src/resources/specs.ts +39 -59
  123. package/src/resources/targets.ts +144 -194
  124. package/src/schemas.ts +78 -76
  125. package/src/search.ts +434 -0
  126. package/src/type-docs.ts +205 -0
  127. package/src/types.ts +538 -357
  128. package/src/worker.ts +2 -2
  129. package/dist/resources/generate.d.ts.map +0 -1
  130. package/dist/resources/publications.d.ts +0 -47
  131. package/dist/resources/publications.d.ts.map +0 -1
  132. package/dist/resources/publications.js +0 -70
  133. package/src/resources/publications.ts +0 -140
package/AGENTS.md CHANGED
@@ -1,6 +1,6 @@
1
- # typeship — agent context
1
+ # Typeship: agent guide
2
2
 
3
- This package contains the generated MCP server for **typeship** (API v1.0.0, package v0.21.0).
3
+ Instructions for coding agents that call the Typeship API through this MCP server (API version 1.0.0, package version 0.23.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
- ## Ground rules
20
- - Maintaining this package: when its repository receives reviewed regeneration pull requests, committed customizations are preserved and edits that overlap a generated change stop for review. Regenerating into a directory replaces its files.
21
- - A custom file ships only when the package manifest, exports, build, and tests include it. Add a package check for every custom build or test step.
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
- - Use the README's MCP connection instructions. MCP `2025-11-25` and `2026-07-28` are selected automatically; no client protocol flags are required.
31
- - 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.
32
- - 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.
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 typeship. [API reference](./api.md)
3
+ MCP server for the Typeship API. [API reference](./api.md)
4
4
 
5
- Generated from the OpenAPI spec by [typeship](https://typeship.dev).
5
+ Resolve an OpenAPI or GraphQL Spec, diagnose it, and keep every selected CLI, MCP, and SDK Target current.
6
6
 
7
- - **Zero runtime dependencies** — built on the platform `fetch` in Node 20+
8
- - **Agent-ready MCP** — schema-derived tools, argument validation, read-only mode, and bounded results
7
+ ## Installation
9
8
 
10
- ## Build from source
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.23.0
17
13
  ```
18
14
 
19
- Requires Node.js 20+. 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.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 after publishing
17
+ ## Connect an MCP client
36
18
 
37
- 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.
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
- ## MCP server
45
+ ### Other clients
68
46
 
69
- 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:
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": "node",
53
+ "command": "npx",
76
54
  "args": [
77
- "/absolute/path/to/package/dist/mcp.js"
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 path with the absolute path to this package's built `dist/mcp.js`.
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
- 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`.
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
- 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).
72
+ ## Tools
101
73
 
102
- ## MCP Registry
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
- `server.json` describes the npm executable and any hosted transports. Its `dev.typeship/typeship` identity matches `package.json#mcpName`.
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
- Install the official `mcp-publisher`, publish this npm package first, then validate or publish the listing:
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
- ```bash
109
- npm run mcp:validate
110
- npm run mcp:publish
111
- ```
80
+ Generated from the OpenAPI spec by [Typeship](https://typeship.dev).