anthropics / anthropics/claude-ai-mcp
MCP Session re-initialization flow not properly supported in accordance with the MCP specification
- 主要语言
- 没有语言数据
- 星标
- 471
- 派生
- 76
- PR 合并指标
- 30 天内没有已合并 PR
描述
### What happened?
I am connecting to a bedrock agentcore runtime hosted MCP server.
Agentcore runtime implements MicroVMs which are managed by the Mcp-Session-Id. A microVM has a max timeout of 8 hours. After I had connected my MCP in claude.ai, once my agentcore runtime micro vm got terminated, my mcp server started returning 404 and any subsequent tool call was met with the same 404 error.
### What did you expect to happen?
The expected behavior, in accordance to the Session management part of the MCP specification, the MCP client (claude.ai) should have send a new initialization request, without an Mcp-Session-Id header and used the updated Mcp-Session-Id for any subsequent request instead of constantly giving 404 due to sending the old Mcp-Session-Id.
https://modelcontextprotocol.io/specification/2025-11-25/basic/transports#session-management:~:text=When%20a%20client%20receives%20HTTP%20404%20in%20response%20to%20a%20request%20containing%20an%20MCP%2DSession%2DId%2C%20it%20MUST%20start%20a%20new%20session%20by%20sending%20a%20new%20InitializeRequest%20without%20a%20session%20ID%20attached
### Steps to reproduce
1. Host an MCP server on AWS Bedrock Agentcore Runtime over the MCP protocol. Ensure cloudwatch log delivery is enabled for the runtime.
2. Set the idle timeout for the agentcore runtime to be < 5 mins for easier debugging.
3. Connect the MCP server in claude.ai Connectors.
4. In chat, ask a few questions to it to ensure working. Please not the Mcp-Session-Id being sent for the request in Cloudwatch Logs.
5. Wait the set timeout by not interacting with the MCP server.
6. After the set timeout is over, call a tool again from the same MCP without reconnecting or manually refreshing the tool list.
7. You MCP server will return 404 error for every tool call until you disconnect and reconnect to the MCP server or manually refresh the tools list from the connector page.
### Area
MCP Connector (adding/managing servers)
### MCP Server (if applicable)
Agentcore runtime MCP
### Error messages or logs
```shell
{"code": -32010, "message": "Received error (404) from runtime. Please check your CloudWatch logs for more information.", "data": null, "request_id": "req_011Cc4qYYuKChZJ4DUyeCmzG"}
```
### Additional context
_No response_
贡献指南
这个仓库没有索引到贡献指南
评估
这个 Issue 还没有评估数据。