anthropics / anthropics/claude-ai-mcp

Claude.ai Web Connector — Tool Discovery Succeeds but CallToolRequest Never Sent

未关闭
#123 2 条评论 1 个 reaction 已指派 0 人 在 GitHub 查看
bug tool-search
主要语言
没有语言数据
星标
471
派生
76
PR 合并指标
30 天内没有已合并 PR

描述

### What happened?

Claude.ai's web connector (custom connector via Settings → Connectors) successfully discovers all tools from a remote MCP server via Streamable HTTP, but when Claude attempts to execute a tool (CallToolRequest), zero HTTP traffic reaches the server. The execution request is silently dropped inside Anthropic's infrastructure.
The same server works perfectly via the Messages API mcp_servers parameter (anthropic-beta: mcp-client-2025-11-20), confirming the server implementation is correct.

### What did you expect to happen?

Claude sends a CallToolRequest HTTP POST to the MCP server and displays the result.

### Steps to reproduce

Steps to Reproduce

Deploy a Streamable HTTP MCP server using the official Python SDK with 80+ tools
Expose via Tailscale Funnel (valid HTTPS, publicly reachable)
Verify with curl that initialize, notifications/initialized, and tools/list all return correct responses
Add as custom connector in Claude.ai Settings → Connectors
Start a new conversation — tools appear in Claude's tool list (discovery works)
Ask Claude to call any tool

### Area

MCP Connector (adding/managing servers)

### MCP Server (if applicable)

_No response_

### Error messages or logs

```shell
Server Logs — Discovery Phase (works)
160.79.106.11:0 - "POST /mcp?token=[redacted] HTTP/1.1" 200 OK ← initialize
160.79.106.11:0 - "GET /mcp?token=[redacted] HTTP/1.1" 200 OK ← SSE listener
160.79.106.11:0 - "POST /mcp?token=[redacted] HTTP/1.1" 202 Accepted ← notifications/initialized
Processing request of type ListToolsRequest
160.79.106.11:0 - "POST /mcp?token=[redacted] HTTP/1.1" 200 OK ← tools/list
Server Logs — Execution Phase (broken)
(empty — zero requests received)
Verification: Messages API Works
The same server works perfectly via the Messages API MCP connector:
json{
"model": "claude-sonnet-4-20250514",
"max_tokens": 4096,
"messages": [{"role": "user", "content": "Call the ha_status tool"}],
"mcp_servers": [{
"type": "url",
"url": "https://[redacted].ts.net/mcp?token=[redacted]",
"name": "my-mcp"
}],
"tools": [{"type": "mcp_toolset", "mcp_server_name": "my-mcp"}]
}
This returns tool results successfully, confirming the server is correctly implemented.
Configurations Tested (all show same behavior)
SettingResultstateless=True, json_response=TrueDiscovery OK, execution failsstateless=False, json_response=TrueDiscovery OK, execution failsAuth via path prefix (/mcp/TOKEN)Discovery OK, execution failsAuth via query param (/mcp?token=TOKEN)Discovery OK, execution failsNo auth at all (open endpoint)Discovery OK, execution fails
```

### Additional context

Analysis
The web connector appears to use separate code paths for tool discovery vs. tool execution. The discovery client (which runs at connector setup / conversation init) successfully communicates with the server. The execution client (which runs when Claude invokes a tool during conversation) silently fails to make the outbound HTTP request.
This is consistent with issue #1716 on modelcontextprotocol/modelcontextprotocol, where backend discovery succeeds but UI-side tool calls never fire.
Impact
Custom MCP connectors with Streamable HTTP transport cannot execute tools via the web UI, despite successful discovery. The Messages API workaround functions correctly but requires building a separate client interface.

贡献指南

这个仓库没有索引到贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。