Skip to content

docs: clarify default legacy initialize and SdkHttpError on connect - #2573

Open
luquitas-cloud wants to merge 1 commit into
modelcontextprotocol:mainfrom
luquitas-cloud:docs/2410-legacy-initialize-and-sdkhttperror
Open

docs: clarify default legacy initialize and SdkHttpError on connect#2573
luquitas-cloud wants to merge 1 commit into
modelcontextprotocol:mainfrom
luquitas-cloud:docs/2410-legacy-initialize-and-sdkhttperror

Conversation

@luquitas-cloud

Copy link
Copy Markdown

Summary

Documents the residual DX points from #2410 after the dual-era / retry claims were narrowed:

  • Default client connect still uses legacy initialize (not a dual-era probe). Opt into versionNegotiation: { mode: 'auto' } for modern-first behavior.
  • Endpoints that never implement the MCP lifecycle are not MCP servers; the SDK will not connect them.
  • Non-2xx responses to initialize surface as SdkHttpError: Error POSTing to endpoint: ... (JSON-RPC fields live in the body text / error.data.text), while a JSON-RPC error on HTTP 200 becomes ProtocolError.
  • Failed initialize POSTs are not retried three times by the SDK.

Changes

  • docs/protocol-versions.md — explicit default wording + tip for non-MCP JSON-RPC endpoints
  • docs/clients/connect.md — default handshake called out next to the basic example
  • docs/troubleshooting.md — new entry for the SdkHttpError: Error POSTing to endpoint: ... message

Test plan

  • Docs review only (no runtime change)
  • Confirm links between protocol-versions tip and troubleshooting heading render

Closes #2410

Document that v2 clients default to legacy initialize (not dual-era probe),
how non-MCP endpoints fail, and that non-2xx initialize responses surface as
SdkHttpError rather than typed ProtocolError.

Closes modelcontextprotocol#2410
@luquitas-cloud
luquitas-cloud requested a review from a team as a code owner July 28, 2026 20:09
@changeset-bot

changeset-bot Bot commented Jul 28, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 9cd9ac3

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

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

@pkg-pr-new

pkg-pr-new Bot commented Jul 28, 2026

Copy link
Copy Markdown

Open in StackBlitz

@modelcontextprotocol/client

npm i https://pkg.pr.new/@modelcontextprotocol/client@2573

@modelcontextprotocol/codemod

npm i https://pkg.pr.new/@modelcontextprotocol/codemod@2573

@modelcontextprotocol/core

npm i https://pkg.pr.new/@modelcontextprotocol/core@2573

@modelcontextprotocol/server

npm i https://pkg.pr.new/@modelcontextprotocol/server@2573

@modelcontextprotocol/server-legacy

npm i https://pkg.pr.new/@modelcontextprotocol/server-legacy@2573

@modelcontextprotocol/express

npm i https://pkg.pr.new/@modelcontextprotocol/express@2573

@modelcontextprotocol/fastify

npm i https://pkg.pr.new/@modelcontextprotocol/fastify@2573

@modelcontextprotocol/hono

npm i https://pkg.pr.new/@modelcontextprotocol/hono@2573

@modelcontextprotocol/node

npm i https://pkg.pr.new/@modelcontextprotocol/node@2573

commit: 9cd9ac3

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.

[v2] feedback: Client sends legacy initialize to non-conforming "MCP" endpoint — no dual-era probe

1 participant