{"version":"2.1.311","anchor":"mcp-debug-log-files-can-be-skipped-via-env-var","canonical_anchor":"mcp-debug-log-files-can-be-skipped-via-env-var","heading":"New option to stop Claude Code writing per-server MCP debug log files","tier":"use","area":"MCP","scope":"individual","heads_up":false,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.311\/e\/mcp-debug-log-files-can-be-skipped-via-env-var","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.311","markdown":"### New option to stop Claude Code writing per-server MCP debug log files\n\nSetting `CLAUDE_CODE_SKIP_MCP_DEBUG_LOG_FILES` to true can stop Claude Code writing a debug log file for each MCP server\n\n**Unclear.** The second condition the variable depends on is not stated, so setting it may not take effect in every kind of session.\n\n**What**\n\nClaude Code now reads a new environment variable, `CLAUDE_CODE_SKIP_MCP_DEBUG_LOG_FILES`. An environment variable is a named value set in the shell or system that starts a program. MCP servers are add-on programs that give Claude extra tools, and Claude Code normally writes a separate debug log file for each one.\n\nWhen this variable is set to true and one further internal condition is met, Claude Code still writes its normal debug line but skips the entry in that server's own log file. Before, every MCP log line went to that server's file.\n\n**Why**\n\nThis can keep MCP debug log files off disk. That suits setups where Claude Code runs inside another program or without a person at the keyboard.\n\n- Area: MCP\n- Names: `CLAUDE_CODE_SKIP_MCP_DEBUG_LOG_FILES`\n- Tier: Use it now\n- Useful: 5\/5\n- Signal: 2\/5\n- Scope: individual\n- Heads-up: no"}