feat(core): implement support for Stateless MCP (SEP-2575)#393
feat(core): implement support for Stateless MCP (SEP-2575)#393anubhav756 wants to merge 1 commit into
Conversation
|
nit: please fix lint issues |
|
Should we add a new transport class for the new version of mcp here? |
|
Is this supposed to be similar to googleapis/mcp-toolbox-sdk-python#648? |
12d6250 to
1280f5b
Compare
Absolutely, but that's added in the next PR #395. I tried to keep this one focussed on SEP-2575 implementation only. |
That's right. Added to PR description for clarity. |
2eb9d12 to
8ec66a3
Compare
|
Could you clarify what is reference support here? If that's incorrect, can we update the PR title? |
| console.error(baseMessage, loggableDetails); | ||
| } | ||
|
|
||
| export class ProtocolNegotiationError extends Error { |
There was a problem hiding this comment.
Can we add unit tests?
| if (e instanceof ProtocolNegotiationError) { | ||
| this.#transport = this.#createTransport( | ||
| this.#transport.baseUrl, | ||
| undefined, |
There was a problem hiding this comment.
Should we use the right session instead of undefined here?
| undefined, | ||
| e.fallbackVersion as Protocol, | ||
| ); | ||
| manifest = await this.#transport.toolsList(toolsetName, headers); |
There was a problem hiding this comment.
In the ProtocolNegotiationError class, we assume that fallback version is a string but here we're casting it as protocol. Can we keep it consistent?
|
In the PR description, it is mentioned
However, the Python PR seems to contain a lot more files. Can we fix the description to clarify the right intent? |
Ah my bad. I added the word "reference" because we had picked this up right after adding the conformance tests for this SEP in the MCP repo, so this PR was also kind of a reference implementation for that SEP. Removed it from the title to make it more clear. Thanks! |
|
This PR doesn't seem to be implementing the SEP-2575. It doesn;t seem like the PR adds new 2026 version files / remove the initialize method |
Description
Implements SEP-2575, introducing support for the MCP Draft protocol version. This removes the legacy stateful
initializeJSON-RPC handshake and replaces it with a stateless HTTP header (Mcp-Protocol-Version).This PR lays the groundwork for the new stateless MCP communication.
Note
This PR is the JS counterpart to googleapis/mcp-toolbox-sdk-python#648.