Skip to content

release: 2.0.0#249

Open
stainless-app[bot] wants to merge 63 commits intomainfrom
release-please--branches--main--changes--next--components--sdk
Open

release: 2.0.0#249
stainless-app[bot] wants to merge 63 commits intomainfrom
release-please--branches--main--changes--next--components--sdk

Conversation

@stainless-app
Copy link
Copy Markdown
Contributor

@stainless-app stainless-app bot commented Dec 19, 2025

Automated Release PR

2.0.0 (2026-04-10)

Full Changelog: v1.23.3...v2.0.0

⚠ BREAKING CHANGES

  • mcp: remove deprecated tool schemes
  • mcp: 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.

Features

  • mcp: add initial server instructions (b96652d)

Bug Fixes

  • docs: fix mcp installation instructions for remote servers (8cecce3)
  • mcp: allow falling back for required env variables (b888cc9)
  • mcp: correct code tool api output types (c5a472c)
  • mcp: do not fallback on baseUrl if environment env variable is set (7792449)
  • mcp: fix env parsing (ebe7a45)
  • mcp: fix options parsing (0a9e105)
  • mcp: update code tool prompt (2e1e61e)

Chores

  • break long lines in snippets into multiline (099799b)
  • ci: upgrade actions/github-script (b03af58)
  • client: do not parse responses with empty content-length (2dc2d76)
  • internal: add health check to MCP server when running in HTTP mode (129191b)
  • internal: allow basic filtering of methods allowed for MCP code mode (e3a8bca)
  • internal: always generate MCP server dockerfiles and upgrade associated dependencies (2dc70ea)
  • internal: codegen related update (4c84fbf)
  • internal: codegen related update (6036e13)
  • internal: codegen related update (d12215b)
  • internal: codegen related update (159c7ea)
  • internal: codegen related update (44f48a8)
  • internal: codegen related update (c597dec)
  • internal: codegen related update (3beb9cc)
  • internal: codegen related update (40d19e2)
  • internal: codegen related update (e89c6b6)
  • internal: codegen related update (1fde448)
  • internal: codegen related update (dc9e9d7)
  • internal: codegen related update (35ac52b)
  • internal: codegen related update (6d2422b)
  • internal: codegen related update (9cb63d6)
  • internal: codegen related update (b2811ca)
  • internal: codegen related update (5a66289)
  • internal: codegen related update (6aedf0f)
  • internal: codegen related update (0a08718)
  • internal: codegen related update (2add106)
  • internal: codegen related update (625f4c5)
  • internal: codegen related update (eda5110)
  • internal: codegen related update (ea5101a)
  • internal: codegen related update (3ee84b3)
  • internal: codegen related update (b299c03)
  • internal: codegen related update (21f2996)
  • internal: codegen related update (4a5dbae)
  • internal: codegen related update (bf53a63)
  • internal: codegen related update (1646399)
  • internal: codegen related update (ee47b3e)
  • internal: codegen related update (8cd3436)
  • internal: codegen related update (6ae8b7b)
  • internal: codegen related update (4f3fe9b)
  • internal: codegen related update (269f193)
  • internal: fix MCP Dockerfiles so they can be built without buildkit (0e8d62c)
  • internal: fix MCP Dockerfiles so they can be built without buildkit (b672e2a)
  • internal: improve layout of generated MCP server files (5dd32ae)
  • internal: refactor flag parsing for MCP servers and add debug flag (4fc206d)
  • internal: support oauth authorization code flow for MCP servers (bd8e9ed)
  • internal: update actions/checkout version (2959753)
  • internal: upgrade babel, qs, js-yaml (b2e7cb8)
  • internal: use x-stainless-mcp-client-envs header for MCP remote code tool calls (ef6ce54)
  • mcp: add intent param to execute tool (71cd9c9)
  • mcp: forward STAINLESS_API_KEY to docs search endpoint (b03a4af)
  • mcp: pass intent param to execute handler (c972807)
  • mcp: remove deprecated tool schemes (c8d468d)
  • mcp: up tsconfig lib version to es2022 (6dc632a)
  • mcp: upgrade dependencies (73b8d6b)

Documentation

  • prominently feature MCP server setup in root SDK readmes (51611e9)

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

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
@stainless-app
Copy link
Copy Markdown
Contributor Author

stainless-app bot commented Dec 19, 2025

🧪 Testing

To try out this version of the SDK, run:

npm install 'https://pkg.stainless.com/s/terminal-node/21f29963d2fca76194778d18920157283fe029a2/dist.tar.gz'

Expires at: Sat, 21 Mar 2026 06:11:24 GMT
Updated at: Thu, 19 Feb 2026 06:11:24 GMT

@stainless-app stainless-app bot force-pushed the release-please--branches--main--changes--next--components--sdk branch from f12fcbd to 6341884 Compare January 6, 2026 06:54
@stainless-app stainless-app bot force-pushed the release-please--branches--main--changes--next--components--sdk branch from 6341884 to eeaa8d7 Compare January 6, 2026 07:09
switch (options.transport) {
case 'stdio':
await launchStdioServer(options);
await launchStdioServer();

This comment was marked as outdated.

@stainless-app stainless-app bot force-pushed the release-please--branches--main--changes--next--components--sdk branch from eeaa8d7 to a9837eb Compare January 6, 2026 07:14
Comment on lines 18 to 24

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.

@stainless-app stainless-app bot force-pushed the release-please--branches--main--changes--next--components--sdk branch from a9837eb to 0f5d41c Compare January 7, 2026 06:47
@stainless-app stainless-app bot force-pushed the release-please--branches--main--changes--next--components--sdk branch from 0f5d41c to 27458c2 Compare January 7, 2026 06:49
@stainless-app stainless-app bot force-pushed the release-please--branches--main--changes--next--components--sdk branch from 27458c2 to 77978e4 Compare January 8, 2026 06:46
Comment on lines 45 to 51
code,
client_opts: {
appId: readEnv('TERMINAL_APP_ID'),
environment: (readEnv('TERMINAL_ENVIRONMENT') || undefined) as any,
},
code,
}),
} satisfies WorkerInput),
});

This comment was marked as outdated.

@stainless-app stainless-app bot force-pushed the release-please--branches--main--changes--next--components--sdk branch from 77978e4 to 0ea3fa0 Compare January 9, 2026 05:43
@stainless-app stainless-app bot force-pushed the release-please--branches--main--changes--next--components--sdk branch from 0ea3fa0 to 1347d13 Compare January 12, 2026 03:43
@stainless-app stainless-app bot force-pushed the release-please--branches--main--changes--next--components--sdk branch from 1347d13 to be49a96 Compare January 12, 2026 03:43
@@ -59,7 +78,17 @@ export async function codeTool() {
);

This comment was marked as outdated.

@stainless-app stainless-app bot force-pushed the release-please--branches--main--changes--next--components--sdk branch from be49a96 to 66bc5c4 Compare January 13, 2026 11:09
@stainless-app stainless-app bot force-pushed the release-please--branches--main--changes--next--components--sdk branch from 66bc5c4 to 85f4458 Compare January 13, 2026 11:10
@stainless-app
Copy link
Copy Markdown
Contributor Author

stainless-app bot commented Mar 31, 2026

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.

@stainless-app stainless-app bot force-pushed the release-please--branches--main--changes--next--components--sdk branch from 4b9db5f to 23a03d2 Compare April 1, 2026 08:22
@stainless-app
Copy link
Copy Markdown
Contributor Author

stainless-app bot commented Apr 1, 2026

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.

@stainless-app stainless-app bot force-pushed the release-please--branches--main--changes--next--components--sdk branch from 23a03d2 to 283208c Compare April 2, 2026 05:06
@stainless-app
Copy link
Copy Markdown
Contributor Author

stainless-app bot commented Apr 2, 2026

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.

@stainless-app stainless-app bot force-pushed the release-please--branches--main--changes--next--components--sdk branch from 283208c to c25afb6 Compare April 3, 2026 05:20
@stainless-app
Copy link
Copy Markdown
Contributor Author

stainless-app bot commented Apr 3, 2026

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
@stainless-app
Copy link
Copy Markdown
Contributor Author

stainless-app bot commented Apr 4, 2026

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.

@stainless-app
Copy link
Copy Markdown
Contributor Author

stainless-app bot commented Apr 5, 2026

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.

@stainless-app
Copy link
Copy Markdown
Contributor Author

stainless-app bot commented Apr 6, 2026

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.

@stainless-app stainless-app bot force-pushed the release-please--branches--main--changes--next--components--sdk branch from c25afb6 to 6af0e42 Compare April 7, 2026 07:38
@stainless-app
Copy link
Copy Markdown
Contributor Author

stainless-app bot commented Apr 7, 2026

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
@stainless-app
Copy link
Copy Markdown
Contributor Author

stainless-app bot commented Apr 8, 2026

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.

@stainless-app stainless-app bot force-pushed the release-please--branches--main--changes--next--components--sdk branch from 6af0e42 to b732453 Compare April 9, 2026 10:13
Comment on lines +80 to +81
instructions ??= ((await response.json()) as { instructions: string }).instructions;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@stainless-app
Copy link
Copy Markdown
Contributor Author

stainless-app bot commented Apr 9, 2026

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.

@stainless-app stainless-app bot force-pushed the release-please--branches--main--changes--next--components--sdk branch from b732453 to caf6f26 Compare April 10, 2026 10:21
@stainless-app
Copy link
Copy Markdown
Contributor Author

stainless-app bot commented Apr 10, 2026

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
@stainless-app
Copy link
Copy Markdown
Contributor Author

stainless-app bot commented Apr 11, 2026

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.

@stainless-app
Copy link
Copy Markdown
Contributor Author

stainless-app bot commented Apr 12, 2026

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.

@stainless-app
Copy link
Copy Markdown
Contributor Author

stainless-app bot commented Apr 13, 2026

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.

@stainless-app
Copy link
Copy Markdown
Contributor Author

stainless-app bot commented Apr 14, 2026

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.

@stainless-app
Copy link
Copy Markdown
Contributor Author

stainless-app bot commented Apr 15, 2026

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants