Description
After connecting to a Streamable HTTP MCP server that requires OAuth, the OAuth dance completes successfully but subsequent POST requests to the server fail with:
MCP error -32099: Streamable HTTP error: Error POSTing to endpoint:
{"jsonrpc":"2.0","error":{"code":-32000,"message":"Not Acceptable: Client must accept both application/json and text/event-stream"},"id":null}
The Streamable HTTP transport spec requires clients to send Accept: application/json, text/event-stream on POST requests. Inspector 0.21.2 appears to send an Accept header that does not include both types, so the server's StreamableHTTPServerTransport.handleRequest rejects with -32000.
Reproduction
- Connect to any public MCP server using Streamable HTTP transport with OAuth (e.g., a server using
@clerk/mcp-tools).
- Complete the OAuth flow in the browser.
- After redirect back, Inspector attempts the
initialize request.
- The request fails with the -32000 "Not Acceptable" error.
Server-side verification
The same server returns a normal 401 (no token) when hit with curl using the correct Accept header, proving the server's Accept-validation is correct:
curl -i -X POST https://<server>/mcp \
-H "Accept: application/json, text/event-stream" \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"curl","version":"1"}}}'
Environment
- Inspector version: 0.21.2 (latest published as of filing)
- Server: HTTP MCP server using
@modelcontextprotocol/sdk wrapped by @clerk/mcp-tools, behind AWS API Gateway
Expected behavior
Inspector sends Accept: application/json, text/event-stream on all POST requests to a Streamable HTTP endpoint, per the spec.
Actual behavior
The Accept header is missing one of the two required types, causing the server to reject the request with -32000 after OAuth completes.
Description
After connecting to a Streamable HTTP MCP server that requires OAuth, the OAuth dance completes successfully but subsequent POST requests to the server fail with:
The Streamable HTTP transport spec requires clients to send
Accept: application/json, text/event-streamon POST requests. Inspector 0.21.2 appears to send an Accept header that does not include both types, so the server'sStreamableHTTPServerTransport.handleRequestrejects with -32000.Reproduction
@clerk/mcp-tools).initializerequest.Server-side verification
The same server returns a normal 401 (no token) when hit with curl using the correct Accept header, proving the server's Accept-validation is correct:
Environment
@modelcontextprotocol/sdkwrapped by@clerk/mcp-tools, behind AWS API GatewayExpected behavior
Inspector sends
Accept: application/json, text/event-streamon all POST requests to a Streamable HTTP endpoint, per the spec.Actual behavior
The Accept header is missing one of the two required types, causing the server to reject the request with -32000 after OAuth completes.