[BUG] Undocumented breaking change in MCP tool output display (sometime between 2.0.10-2.0.22): structured content now prioritized over TextContent
Resolved 💬 8 comments Opened Oct 20, 2025 by gabiteodoru Closed Feb 1, 2026
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
Issue
In 2.0.22 and possibly earlier, but after 2.0.9, MCP tool results are displayed differently:
- Before (≤2.0.9): TextContent was displayed cleanly for human readability
- After (in 2.0.22 possibly earlier): Structured content is wrapped in JSON format, even when TextContent is available
Impact
- MCP servers designed with pretty-printed output (code, formatted data) now show JSON-wrapped results
- Significantly degrades readability and user experience
- Affects all servers using FastMCP 2.10+ (which returns both formats per MCP spec)
Example
Expected (2.0.9):
f:{[x]
:x+1
}
Actual (2.0.22):
{
"result": "f:{[x]\n :x+1\n }"
}
MCP Spec Context
The MCP 2025-06-18 spec states:
"For backwards compatibility, a tool that returns structured content SHOULD also return the serialized JSON in a TextContent block."
This suggests TextContent should be the primary display format for human readability.
What Should Happen?
Questions
- Was this display change intentional?
- If yes, why wasn't it documented in release notes?
- Should Claude Code prioritize TextContent when both formats are available?
Workaround
Using structured_output=False in FastMCP forces text-only output.
Error Messages/Logs
Steps to Reproduce
Use a plain Python MCP server without the additional decorator described and return string
Claude Model
None
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
2.0.22
Platform
Anthropic API
Operating System
Ubuntu/Debian Linux
Terminal/Shell
WSL (Windows Subsystem for Linux)
Additional Information
_No response_
This issue has 8 comments on GitHub. Read the full discussion on GitHub ↗