Streamable-HTTP: Error: No connection established for request ID: 1
Describe the bug / To Reproduce
I am testing the Streamable-HTTP protocol by pointing the inspector to an API Proxy (hosted in GCP Apigee). The API Proxy is set to respond to the initialization request simply with:
Status Code:
200
Headers:
Content-Type: application/json
Body:
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"protocolVersion": "2024-11-05",
"capabilities": {
"logging": {},
"prompts": {},
"resources": {},
"tools": {}
},
"serverInfo": {
"name": "apigee-mcp",
"version": "1.0.0"
}
}
}
When I click "Connect" on the inspector,
I get the following error in the console:
[1]
[1] > @modelcontextprotocol/[email protected] dev
[1] > tsx watch --clear-screen=false src/index.ts
[1]
[0]
[0] > @modelcontextprotocol/[email protected] dev
[0] > vite --port 6274
[0]
[0]
[0] VITE v6.3.0 ready in 129 ms
[0]
[0] ➜ Local: http://localhost:6274/
[0] ➜ Network: http://10.0.0.30:6274/
[1] ⚙️ Proxy server listening on port 6277
[1] Received POST message for sessionId undefined
[1] New streamable-http connection
[1] Query parameters: [Object: null prototype] {
[1] url: 'https://34.160.129.252.nip.io/mcp',
[1] transportType: 'streamable-http'
[1] }
[1] Connected to Streamable HTTP transport
[1] Connected MCP client to backing server transport
[1] Created streamable web app transport b4a690ae-4aa9-4d2f-bca6-5d59c5b5fda7
[1] Error from inspector client: Error: No connection established for request ID: 1
[1] at StreamableHTTPServerTransport.send (/Users/miguelmendoza/inspector/node_modules/@modelcontextprotocol/sdk/src/server/streamableHttp.ts:574:13)
[1] at StreamableHTTPClientTransport.transportToServer.onmessage (/Users/miguelmendoza/inspector/server/src/mcpProxy.ts:26:23)
[1] at StreamableHTTPClientTransport.send (/Users/miguelmendoza/inspector/node_modules/@modelcontextprotocol/sdk/src/client/streamableHttp.ts:452:27)
[1] at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
I am using the main branch (as of 745991b8efe3b9fa4877bef751443cba993d40df) branch, and running the inspector locally with: npm run dev
Expected behavior Based on the documented lifecycle in the spec (https://modelcontextprotocol.io/specification/2025-03-26/basic/lifecycle) , I was expecting the inspector to establish a connection and send a sub-sequent POST request to the same endpoint with:
{
"jsonrpc": "2.0",
"method": "notifications/initialized"
}
But that never happened.
Logs If applicable, add logs to help explain your problem.
Additional context
For context, I am experimenting with creating an MCP Server as a GCP Apigee API Proxy, with the hope to eventually be able to generate these (API Proxies) dynamically from an input OpenAPI spec.