MCP tool results with text content type are displayed as empty on Windows
Resolved 💬 2 comments Opened Apr 5, 2026 by Maybe3141 Closed May 15, 2026
Bug Description
On Windows, MCP tool calls that return content: [{type: "text", text: "..."}] responses are displayed as empty {"result":{"type":"text"}} to the model. The actual text field content is silently dropped, making all MCP tools that return text content effectively unusable.
Environment
- OS: Windows 11 Pro (10.0.26200)
- Shell: Git Bash (bash)
- Claude Code version: Latest (Desktop app, Windows)
- MCP Server:
mcp-ssh-tool@1.3.1(stdio transport)
Steps to Reproduce
- Configure an MCP server in
.mcp.jsonusing stdio transport:
{
"mcpServers": {
"ssh-nas": {
"command": "mcp-ssh-tool",
"env": {
"SSH_HOST": "192.168.0.101",
"SSH_USER": "root",
"SSH_PRIVATE_KEY": "C:\Users\user\.ssh\id_ed25519"
}
}
}
}
- Call any MCP tool (e.g.
get_metrics,ssh_list_sessions,ssh_open_session) - All tool results show
{"result":{"type":"text"}}with no actual content
Expected Behavior
The full text content should be visible, e.g.:
{"result": {"content": [{"type": "text", "text": "{\"sessions\":{\"created\":0,...}}"}]}}
Actual Behavior
All MCP tool results display as:
{"result": {"type": "text"}}
The text field is completely missing from the displayed result.
Verification
I manually tested the MCP server via stdio and confirmed it returns valid, complete responses:
printf '{"jsonrpc":"2.0","id":1,"method":"initialize",...}\n{"jsonrpc":"2.0","id":3,"method":"tools/call","params":{"name":"get_metrics","arguments":{}}}\n' | mcp-ssh-tool 2>&1
The server returns full JSON-RPC responses with content: [{type: "text", text: "..."}] — but Claude Code strips the text field when presenting results to the model.
Additional Context
- The same MCP server works correctly in other MCP clients (e.g. OpenCode) using the same configuration but invoked via PowerShell instead of bash.
- This may be related to how Claude Code on Windows (using Git Bash) handles stdio communication with MCP server processes, possibly a character encoding or stream parsing issue specific to the bash shell environment.
- HTTP-transport MCP servers (like
context7andgh-grep) work fine — the issue appears specific to stdio-based MCP servers on Windows.
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗