You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Mirror SEP-2792 _meta acceptLanguage to Accept-Language on CLI and TUI connections #2987
Follow-up to #2979, which mirrors the SEP-2792 language preference in the web backend only.
The problem
SEP-2792 carries a language preference in params._meta["io.modelcontextprotocol/acceptLanguage"]. On Streamable HTTP a client also mirrors it to Accept-Language, and a server may reject a present header that does not exactly equal _meta (400 / HeaderMismatch, -32020); a missing header is tolerated.
The CLI and TUI connect through the direct Node transport (core/mcp/node/transport.ts), which does not mirror. Worse, the header is never actually missing there: Node's fetch (undici) sends Accept-Language: * on any request that carries none. So with an acceptLanguage set in request metadata (--metadata / server settings), every Streamable HTTP request goes out with _meta = fr-CA beside Accept-Language: *. That is exactly the mismatch a strict server rejects.
Call localized_greeting from the CLI or TUI with request metadata { "io.modelcontextprotocol/acceptLanguage": "fr" }.
The result is an isErrorHeaderMismatch reporting Accept-Language header: *. The same call from the web client returns Bonjour, world!.
clients/web/src/test/integration/mcp/localized-greeting-fixture.test.ts pins this current behavior ("flags Node fetch's default * against an unmirrored _meta preference").
Expected
Direct HTTP connections mirror the preference exactly, as the web backend now does. #2979 adds acceptLanguageHeaderFor(message) in core/mcp/acceptLanguage.ts, which a direct-transport send path could reuse (e.g. via the per-send headers option, as the backend does).
Priority score: severity 3 (a feature is missing on two clients, and a strict server rejects the request) + urgency 2 (wanted eventually; SEP-2792 is still an open PR) + 1 (milestoned) = 6 → Medium.
Activity
cliffhall commentedon Nov 18, 2026
Priority score: severity 3 (a feature is missing on two clients, and a strict server rejects the request) + urgency 2 (wanted eventually; SEP-2792 is still an open PR) + 1 (milestoned) = 6 → Medium.
cliffhall commentedon Nov 18, 2026
Shipped in #2990 (merged to v2/main as a7eaab0).
feat(core): mirror SEP-2792 acceptLanguage on every Streamable HTTP send