Add per-MCP-server log files (parity with Claude Desktop)

Resolved 💬 2 comments Opened Feb 26, 2026 by BlockSecCA Closed Mar 26, 2026

Summary

Claude Desktop creates per-server log files for MCP servers (mcp-server-<name>.log), which makes debugging straightforward. Claude Code has no equivalent — MCP server output disappears into the session context with no persistent, per-server log trail.

Current behavior

  • No log files created for MCP servers
  • stderr from STDIO-based servers is not captured anywhere persistent
  • Debugging MCP connection/runtime issues requires ad-hoc workarounds (wrapping commands to tee stderr, adding logging inside the server itself)

Expected behavior

Claude Code should capture stderr from each MCP server and write it to a per-server log file, similar to Claude Desktop:

~/.claude/logs/mcp-server-<name>.log

Why

  • STDIO servers already have stderr available (stdout is the JSON-RPC channel), so there's no technical blocker
  • MCP servers are a growing part of the Claude Code ecosystem — debugging them shouldn't require custom plumbing
  • Feature parity with Claude Desktop reduces friction for users who work with both

Environment

  • Claude Code CLI on Linux (Kali)
  • Multiple STDIO-based MCP servers registered globally and per-project

View original on GitHub ↗

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