claude-code - 💡(How to fix) Fix [BUG] MCP tools/call returns "Tool call failed: 500" against server that responds with HTTP 200 [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#54721Fetched 2026-04-30 06:37:52
View on GitHub
Comments
0
Participants
1
Timeline
4
Reactions
0
Author
Participants
Timeline (top)
labeled ×4

Error Message

Error Messages/Logs

Code Example

Claude Code surface:

Tool call failed: 500
Server-side (Honeycomb, ASP.NET Core + OTel instrumentation): zero HTTP 500s on /mcp/. All requests recorded as 200. So the "500" is being synthesized by Claude Code's MCP client; it does not correspond to any actual HTTP 500 on the wire.

Direct repro showing the server returns 200:

$ curl -isk -X POST https://quranx.com/mcp -H "Content-Type: application/json; charset=utf-8" -H "Accept: application/json, text/event-stream" --data-binary '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"get_verse_root_word_analysis","arguments":{"verseReference":{"chapter":4,"verse":34}}}}'
HTTP/1.1 200 OK
Content-Type: text/event-stream
...
event: message
data: {"result":{"content":[...],"structuredContent":{...}},"id":1,"jsonrpc":"2.0"}
(~33 KB body, ~150 ms.) The same payload returned for get_arabic_root_word_analysis with arabicRootWord: ضرب is ~104 KB. ChatGPT's MCP client receives and renders both responses without issue.
RAW_BUFFERClick to expand / collapse

Preflight Checklist

  • I have searched existing issues and this hasn't been reported yet
  • This is a single bug report (please file separate reports for different bugs)
  • I am using the latest version of Claude Code

What's Wrong?

Calling certain tools on a remote HTTP MCP server (https://quranx.com/mcp) from Claude Code returns Tool call failed: 500, even though the server itself responds with HTTP 200 and a valid JSON-RPC payload. The same calls succeed from direct curl, from a local MCP client, and from ChatGPT's MCP client — only Claude Code fails. Two specific tools fail consistently (get_verse_root_word_analysis, get_arabic_root_word_analysis); other tools on the same server work fine. The two failing tools are the ones that return the largest structured-content payloads (~33 KB and ~104 KB) and contain Arabic Unicode inside the structured content. Refreshing the MCP tool list does not fix it.

What Should Happen?

Claude Code should receive the same HTTP 200 / JSON-RPC structured-content response the server is actually returning, and surface it to the model as a normal tool result.

Error Messages/Logs

Claude Code surface:

Tool call failed: 500
Server-side (Honeycomb, ASP.NET Core + OTel instrumentation): zero HTTP 500s on /mcp/. All requests recorded as 200. So the "500" is being synthesized by Claude Code's MCP client; it does not correspond to any actual HTTP 500 on the wire.

Direct repro showing the server returns 200:

$ curl -isk -X POST https://quranx.com/mcp -H "Content-Type: application/json; charset=utf-8" -H "Accept: application/json, text/event-stream" --data-binary '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"get_verse_root_word_analysis","arguments":{"verseReference":{"chapter":4,"verse":34}}}}'
HTTP/1.1 200 OK
Content-Type: text/event-stream
...
event: message
data: {"result":{"content":[...],"structuredContent":{...}},"id":1,"jsonrpc":"2.0"}
(~33 KB body, ~150 ms.) The same payload returned for get_arabic_root_word_analysis with arabicRootWord: ضرب is ~104 KB. ChatGPT's MCP client receives and renders both responses without issue.

Steps to Reproduce

  1. Add https://quranx.com/mcp as a remote HTTP MCP server in Claude Code.
  2. Ask Claude to call get_verse_root_word_analysis for verse 4:34, e.g. "Use QuranX to get the word-by-word analysis of Quran 4:34."
  3. Observe Tool call failed: 500 in the tool result.
  4. Repeat with get_arabic_root_word_analysis for arabicRootWord: ضرب — also fails.
  5. Compare with get_verses for the same verse — succeeds.
  6. Run the curl above to confirm the server returns HTTP 200 with the full structured payload, and (optionally) make the same call from ChatGPT's MCP client to confirm it succeeds there too.

Claude Model

Opus

Is this a regression?

I don't know

Last Working Version

No response

Claude Code Version

1.5354.0

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

Windows Terminal

Additional Information

No response

extent analysis

TL;DR

The issue is likely due to Claude Code's MCP client failing to handle large JSON-RPC payloads with Arabic Unicode characters, resulting in a synthesized 500 error.

Guidance

  • Investigate Claude Code's MCP client implementation to see if there are any limitations or bugs related to handling large payloads or Unicode characters.
  • Verify that the issue is specific to the two failing tools (get_verse_root_word_analysis and get_arabic_root_word_analysis) and that other tools on the same server work as expected.
  • Consider increasing the payload size limit or implementing a more robust handling of Unicode characters in the MCP client.
  • Test the MCP client with smaller payloads or without Arabic Unicode characters to see if the issue persists.

Example

No code snippet is provided as the issue is more related to the implementation and configuration of the MCP client rather than a specific code snippet.

Notes

The issue may be specific to the Opus model or the Windows platform, and further testing may be needed to determine the root cause.

Recommendation

Apply a workaround by increasing the payload size limit or implementing a more robust handling of Unicode characters in the MCP client, as the issue seems to be related to the client's limitations rather than a server-side problem.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

claude-code - 💡(How to fix) Fix [BUG] MCP tools/call returns "Tool call failed: 500" against server that responds with HTTP 200 [1 participants]