anthropics / anthropics/claude-ai-mcp

claude.ai connector advertises MCP 2026-07-28 but surfaces a state-only InputRequiredResult as "Error occurred during tool execution" and never retries

Aperta
#1,027 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
Nessun dato sulla lingua
Stelle
471
Fork
77
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

## Summary

The claude.ai MCP client (`clientInfo` name `Anthropic/ClaudeAI`, version `1.0.0`) sends 2026-07-28 requests and handles ordinary `resultType: "complete"` results, but when a `tools/call` returns a state-only `InputRequiredResult` (`resultType: "input_required"` with `requestState` and no `inputRequests`) it shows the user "Error occurred during tool execution" and never re-issues the request with `requestState`. The official TypeScript and Python SDK clients retry the same response automatically and complete the call.

MRTR is a core message pattern in 2026-07-28 ("All implementations MUST support the base protocol, versioning, and the message patterns"), and the state-only shape is explicitly allowed (MRTR server requirement 6: at least one of `inputRequests` or `requestState`). Servers that use it for long-running writes are unusable from claude.ai.

## Reproduction against Anthropic's own server SDK

Server: `@modelcontextprotocol/server` 2.x (`McpServer` + `createMcpHandler`, `@hono/node-server`), one tool `slow_write` that returns `inputRequired({ requestState: codec.mint(...) })` on the first entry and completes when the state is echoed. Exposed over HTTPS, no auth, added as a custom connector.

Server log, claude.ai session (UTC):

```
22:06:04.464 server/discover clientInfo=Anthropic/ClaudeAI/1.0.0 proto=2026-07-28 -> 200 complete
22:06:04.853 tools/list clientInfo=Anthropic/ClaudeAI/1.0.0 proto=2026-07-28 -> 200 complete
22:06:40.411 tools/call fast_write hasRequestState=false -> 200 complete (shown to user)
22:06:44.435 tools/call slow_write hasRequestState=false -> 200 input_required
(no further request for this call; user sees "Error occurred during tool execution")
```

Same server, official TypeScript client (`@modelcontextprotocol/client` 2.x, default options), minutes earlier:

```
21:29:46.631 tools/call slow_write hasRequestState=false -> 200 input_required
21:29:47.111 tools/call slow_write hasRequestState=true -> 200 complete
```

The response body sent to both clients was identical:
`{"resultType":"input_required","requestState":"","_meta":{"io.modelcontextprotocol/serverInfo":{...}}}`.

## Real-world impact

Reported against a Hubitat MCP server (kingpanther13/Hubitat-local-MCP-server#421): every write that used continuation failed from claude.ai with the generic error while working from Claude Code and from the SDK clients. The server has since been changed to complete fast writes in the first request (kingpanther13/Hubitat-local-MCP-server#422), but long-running writes still return `requestState` and claude.ai still shows the error while the work finishes server-side.

## Expected

Retry the original request with `requestState` echoed (MRTR client requirement 2), as the official SDK clients do, or at minimum surface the result to the model as a pending continuation rather than an error.

## Environment

claude.ai web, custom connector, no auth, Streamable HTTP. Client capabilities declared only the `io.modelcontextprotocol/ui` extension.

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Direzione di ricerca

Start at the claude.ai connector's tools/call handling and trace how a state-only InputRequiredResult with requestState is processed. Compare that path with the official TypeScript and Python SDK behavior and the MRTR client requirement 2. Done means a 2026-07-28 tools/call response is retried with requestState, or is surfaced as a pending continuation instead of a generic error.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
python, typescript
Ambito
api, backend-api-design
Tipo di issue
Bug
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Attiva
Chiarezza
Abbastanza chiara
Idoneità per principianti
42/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.