MCP tool results not displayed to users — two rendering gates prevent output

Resolved 💬 2 comments Opened May 24, 2026 by Meldrey Closed Jun 25, 2026

Summary

MCP tool results are not displayed to users. When Claude calls an MCP tool, the model receives and can summarize the response, but the user sees no tool result output block. Built-in tools (Bash, Edit, Read, etc.) display output normally.

This affects all MCP servers — official plugins, project-level .mcp.json servers, everything.

Reproduction

  1. Register any MCP server (even a minimal one returning {"content":[{"type":"text","text":"Hello"}]})
  2. Ask Claude to call the tool
  3. Observe: tool call indicator appears, then Claude's text summary. No tool result block.
  4. Compare: ask Claude to run a Bash command — output renders normally

Root Cause

Two independent gates in the rendering pipeline:

1. Separate execution paths in toolExecution.ts

addToolResult() stores tool results for UI rendering. A guard prevents it from being called for MCP tools:

// TOOD(hackyon): refactor so we don't have different experiences for MCP tools
if (!isMcpTool(tool)) {
  await addToolResult(toolOutput, mappedToolResultBlock)
}

The TODO comment (with a typo — TOOD) suggests this was known and intended for refactoring.

2. Schema type mismatch in MCPTool.ts

export const outputSchema = lazySchema(() =>
  z.string().describe('MCP tool execution result'),
)

MCP tool results arrive as content arrays (objects), not strings. UserToolSuccessMessage validates against outputSchema before rendering — z.string().safeParse() on an array fails silently, and the renderer returns null.

Suggested Fix

toolExecution.ts: Remove the isMcpTool guard so all tools call addToolResult() through the same path. Remove the duplicate MCP-only addToolResult() call downstream.

MCPTool.ts: Change outputSchema from z.string() to z.any().

Net diff: +3 lines, -9 lines. The existing MCPTool.renderToolResultMessage() and OutputLine component work correctly once the results actually reach them.

Impact

  • Plugin/MCP server authors cannot provide user-visible output
  • Users have zero visibility into what MCP tools return
  • The MCP spec's content/annotation system is not surfaced in Claude Code
  • renderToolResultMessage exists and works — it just never gets reached

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗