[FEATURE] Add per-MCP-server log files

Resolved 💬 2 comments Opened Mar 31, 2026 by maple5233 Closed May 4, 2026

Preflight Checklist

  • [x] I have searched existing requests and this feature hasn't been requested yet
  • [x] This is a single feature request (not multiple features)

Problem Statement

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)

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

Proposed Solution

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

Alternative Solutions

can get logs with cli command

claude mcp get logs

Priority

Medium - Would be very helpful

Feature Category

CLI commands and flags

Use Case Example

_No response_

Additional Context

_No response_

View original on GitHub ↗

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