Skip to content

Adding mcp-session-id to McpAgents' CORS headers to permit web-based MCP clients#261

Merged
threepointone merged 5 commits intomainfrom
mcp-streamable-cors-session-header
May 7, 2025
Merged

Adding mcp-session-id to McpAgents' CORS headers to permit web-based MCP clients#261
threepointone merged 5 commits intomainfrom
mcp-streamable-cors-session-header

Conversation

@geelen
Copy link
Copy Markdown
Contributor

@geelen geelen commented May 7, 2025

This now includes mcp-session-id in Access-Control-Expose-Headers and Access-Control-Allow-Headers, otherwise StreamableHTTP transport servers can't be used from web-based MCP Clients.

This has been added to all 2xx responses from McpAgents

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented May 7, 2025

🦋 Changeset detected

Latest commit: 3fd86df

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
agents Patch
hono-agents Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

geelen added 3 commits May 7, 2025 15:21
This now includes `mcp-session-id` in `Access-Control-Expose-Headers` and `Access-Control-Allow-Headers`, otherwise StreamableHTTP transport servers can't be used from web-based MCP Clients
@geelen geelen force-pushed the mcp-streamable-cors-session-header branch from fc6a5b1 to f16c726 Compare May 7, 2025 05:21
@threepointone
Copy link
Copy Markdown
Contributor

lemme fix the build failures for you

tsconfigs.map((tsconfig) => execSync(`tsc -p ${tsconfig}`))
)
).filter((r) => r.status === "rejected");
type Result = {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

thanks for this! so much nicer

Copy link
Copy Markdown
Contributor

@threepointone threepointone left a comment

Choose a reason for hiding this comment

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

looks great, approving and landing

@threepointone threepointone merged commit 881f11e into main May 7, 2025
1 check passed
@threepointone threepointone deleted the mcp-streamable-cors-session-header branch May 7, 2025 07:03
@threepointone threepointone mentioned this pull request May 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants