Conversation
This removes all tool schemes except for "code mode" tools. Specifically, this removes "all tools" and "dynamic tools" schemes. Additionally, this removes support for resource filtering, tags, jq filtering, and compatibility controls in MCP servers, as they are no longer necessary when using code mode. # Migration To migrate, simply modify the command used to invoke the MCP server. Currently, the only supported tool scheme is code mode. Now, starting the server with just `node /path/to/mcp/server` or `npx package-name` will invoke code tools: changing your command to one of these is likely all you will need to do. Specifically, you must remove all flags including things like --resources, --tags, --client, --tools=dynamic, etc from your invocation command. The only supported flags are now `--port`, `--transport`, `--socket`, and `--tools=docs` (specifically for "docs"). These are also the only options available for http servers. migration-effort: small
|
🧪 Testing To try out this version of the SDK, run: Expires at: Sat, 21 Mar 2026 06:11:24 GMT |
f12fcbd to
6341884
Compare
6341884 to
eeaa8d7
Compare
packages/mcp-server/src/index.ts
Outdated
| switch (options.transport) { | ||
| case 'stdio': | ||
| await launchStdioServer(options); | ||
| await launchStdioServer(); |
This comment was marked as outdated.
This comment was marked as outdated.
Sorry, something went wrong.
eeaa8d7 to
a9837eb
Compare
packages/mcp-server/src/index.ts
Outdated
|
|
||
| switch (options.transport) { | ||
| case 'stdio': | ||
| await launchStdioServer(options); | ||
| await launchStdioServer(); | ||
| break; | ||
| case 'http': | ||
| await launchStreamableHTTPServer(options, options.port ?? options.socket); |
This comment was marked as outdated.
This comment was marked as outdated.
Sorry, something went wrong.
a9837eb to
0f5d41c
Compare
0f5d41c to
27458c2
Compare
27458c2 to
77978e4
Compare
packages/mcp-server/src/code-tool.ts
Outdated
| code, | ||
| client_opts: { | ||
| appId: readEnv('TERMINAL_APP_ID'), | ||
| environment: (readEnv('TERMINAL_ENVIRONMENT') || undefined) as any, | ||
| }, | ||
| code, | ||
| }), | ||
| } satisfies WorkerInput), | ||
| }); |
This comment was marked as outdated.
This comment was marked as outdated.
Sorry, something went wrong.
77978e4 to
0ea3fa0
Compare
0ea3fa0 to
1347d13
Compare
1347d13 to
be49a96
Compare
be49a96 to
66bc5c4
Compare
66bc5c4 to
85f4458
Compare
|
Note: this release PR has been open for more than 60 days. Until this PR is merged, we will temporarily stop pushing codegen updates due to changes to Stainless' codegen. |
4b9db5f to
23a03d2
Compare
|
Note: this release PR has been open for more than 60 days. Until this PR is merged, we will temporarily stop pushing codegen updates due to changes to Stainless' codegen. |
23a03d2 to
283208c
Compare
|
Note: this release PR has been open for more than 60 days. Until this PR is merged, we will temporarily stop pushing codegen updates due to changes to Stainless' codegen. |
283208c to
c25afb6
Compare
|
Note: this release PR has been open for more than 60 days. Until this PR is merged, we will temporarily stop pushing codegen updates due to changes to Stainless' codegen. |
3 similar comments
|
Note: this release PR has been open for more than 60 days. Until this PR is merged, we will temporarily stop pushing codegen updates due to changes to Stainless' codegen. |
|
Note: this release PR has been open for more than 60 days. Until this PR is merged, we will temporarily stop pushing codegen updates due to changes to Stainless' codegen. |
|
Note: this release PR has been open for more than 60 days. Until this PR is merged, we will temporarily stop pushing codegen updates due to changes to Stainless' codegen. |
c25afb6 to
6af0e42
Compare
|
Note: this release PR has been open for more than 60 days. Until this PR is merged, we will temporarily stop pushing codegen updates due to changes to Stainless' codegen. |
1 similar comment
|
Note: this release PR has been open for more than 60 days. Until this PR is merged, we will temporarily stop pushing codegen updates due to changes to Stainless' codegen. |
6af0e42 to
b732453
Compare
| instructions ??= ((await response.json()) as { instructions: string }).instructions; | ||
|
|
There was a problem hiding this comment.
Bug: The fetchLatestInstructionsFromApi function can return undefined if the API response is 200 OK but lacks an instructions key, violating its Promise<string> return type.
Severity: HIGH
Suggested Fix
Add runtime validation after parsing the JSON response from the API. Check for the existence and type of the instructions property before accessing it. If the property is missing or invalid, throw an error or return a default fallback string to ensure the function's Promise<string> contract is always met.
Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.
Location: packages/mcp-server/src/instructions.ts#L80-L81
Potential issue: The function `fetchLatestInstructionsFromApi` is declared to return a
`Promise<string>`, but a specific code path allows it to resolve with `undefined`. If
the external API responds with `200 OK` but the JSON payload does not contain an
`instructions` key, the type assertion `as { instructions: string }` fails silently at
runtime. The expression `((await response.json()) as ...).instructions` evaluates to
`undefined`, which is then assigned to the `instructions` variable and returned. This
violates the function's type contract and can lead to the `McpServer` being initialized
with `undefined` instructions.
|
Note: this release PR has been open for more than 60 days. Until this PR is merged, we will temporarily stop pushing codegen updates due to changes to Stainless' codegen. |
b732453 to
caf6f26
Compare
|
Note: this release PR has been open for more than 60 days. Until this PR is merged, we will temporarily stop pushing codegen updates due to changes to Stainless' codegen. |
5 similar comments
|
Note: this release PR has been open for more than 60 days. Until this PR is merged, we will temporarily stop pushing codegen updates due to changes to Stainless' codegen. |
|
Note: this release PR has been open for more than 60 days. Until this PR is merged, we will temporarily stop pushing codegen updates due to changes to Stainless' codegen. |
|
Note: this release PR has been open for more than 60 days. Until this PR is merged, we will temporarily stop pushing codegen updates due to changes to Stainless' codegen. |
|
Note: this release PR has been open for more than 60 days. Until this PR is merged, we will temporarily stop pushing codegen updates due to changes to Stainless' codegen. |
|
Note: this release PR has been open for more than 60 days. Until this PR is merged, we will temporarily stop pushing codegen updates due to changes to Stainless' codegen. |
Automated Release PR
2.0.0 (2026-04-10)
Full Changelog: v1.23.3...v2.0.0
⚠ BREAKING CHANGES
node /path/to/mcp/serverornpx package-namewill invoke code tools: changing your command to one of these is likely all you will need to do.Features
Bug Fixes
Chores
actions/github-script(b03af58)actions/checkoutversion (2959753)Documentation
This pull request is managed by Stainless's GitHub App.
The semver version number is based on included commit messages. Alternatively, you can manually set the version number in the title of this pull request.
For a better experience, it is recommended to use either rebase-merge or squash-merge when merging this pull request.
🔗 Stainless website
📚 Read the docs
🙋 Reach out for help or questions