Skip to content

feat(mcp): add resource wrappers and streamable session ids#1111

Merged
seratch merged 1 commit intomainfrom
feat/mcp-resource-wrappers
Mar 21, 2026
Merged

feat(mcp): add resource wrappers and streamable session ids#1111
seratch merged 1 commit intomainfrom
feat/mcp-resource-wrappers

Conversation

@seratch
Copy link
Copy Markdown
Member

@seratch seratch commented Mar 21, 2026

This pull request adds MCP resource wrappers to the JS SDK and exposes streamable HTTP session IDs for resumable MCP sessions.

The main change is a non-breaking expansion of the MCP wrapper surface in @openai/agents-core. Instead of widening the existing MCPServer contract, it introduces a separate MCPServerWithResources interface plus resource result/types so existing custom MCP server implementations do not need to adopt new required methods. The concrete stdio, SSE, and streamable HTTP wrappers now delegate listResources, listResourceTemplates, and readResource to the underlying MCP SDK client, and the browser shim mirrors the same surface for type consistency.

This also exposes sessionId on MCPServerStreamableHttp, which makes server-issued MCP session identifiers available to callers that want to resume stateful sessions across workers or process restarts. The change keeps the existing session setup and cleanup behavior intact while making the active session identifier readable through the public wrapper.

see also:

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Mar 21, 2026

🦋 Changeset detected

Latest commit: 79b8114

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

This PR includes changesets to release 5 packages
Name Type
@openai/agents Patch
@openai/agents-core Patch
@openai/agents-extensions Patch
@openai/agents-openai Patch
@openai/agents-realtime 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

@github-actions github-actions bot added this to the 0.7.x milestone Mar 21, 2026
@seratch seratch merged commit 0ff9a25 into main Mar 21, 2026
6 checks passed
@seratch seratch deleted the feat/mcp-resource-wrappers branch March 21, 2026 00:46
@seratch seratch modified the milestones: 0.7.x, 0.8.x Mar 21, 2026
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.

1 participant