Where clients write MCP logs
- Spec
2026-07-28- Evidence
- E3Tested in a real clientarm64
- MCP Inspector
@modelcontextprotocol/inspector@2.12.0- Verified
When a stdio server fails, the reason is almost always in its own stderr output, and the client keeps that output somewhere. This page lists where. Over Streamable HTTP, the client never sees the server’s stderr: read the logs of the server process itself.
| Client | Where to look | Checked by us |
|---|---|---|
| Claude Code | ~/.cache/claude-cli-nodejs/<project>/mcp-logs-<server>/ on Linux; /mcp in a session |
Yes, Linux 2.1.312 |
| Claude Desktop | macOS ~/Library/Logs/Claude/mcp*.log; Windows %APPDATA%\Claude\logs\mcp*.log |
No |
| Codex | Inline in codex exec; plaintext log only with -c log_dir=… |
Partly, 0.164.0 |
| Cursor | Output panel → MCP Logs | No |
| Cherry Studio | The server’s details in Settings → MCP | No |
| MCP Inspector | Your terminal | Yes, 2.12.0 |
Claude Code
Section titled “Claude Code”Claude Code writes one JSON Lines file per connection attempt:
~/.cache/claude-cli-nodejs/<project path with / replaced by ->/mcp-logs-<server name>/<timestamp>.jsonlWe found this location on Linux. It did not move when we set CLAUDE_CONFIG_DIR. We have not checked macOS or Windows.
Each line is one event. For a server that exited because a variable was missing, the file contained, among others:
{"debug":"Starting connection with timeout of 30000ms", …}{"error":"Server stderr: needs-env: DEMO_API_KEY is not set\n", …}{"debug":"Connection failed after 401ms, 402ms of it awake (CONNECTION_CLOSED): Connection closed", …}A successful connection logs the negotiated protocol, for example "protocolEra":"modern","negotiatedProtocolVersion":"2026-07-28".
Quicker ways to see the same problem:
claude mcp get <name>prints anIssue:line, such asCONNECTION_CLOSED: Connection closedorENOENT: Executable not found in $PATH: "…"./mcpin a session shows each server’s status and the same issue text.claude --debug-file /tmp/claude-debug.logwrites Claude Code’s own debug log to a file.
Claude Desktop
Section titled “Claude Desktop”From the MCP documentation, not tested by us:
# macOStail -n 20 -F ~/Library/Logs/Claude/mcp*.log# Windowstype "$env:AppData\Claude\logs\mcp*.log"The files match mcp*.log; the documentation says they record connection events, configuration problems, runtime errors and message exchanges. For errors in the app itself, the documentation describes turning on Chrome DevTools with {"allowDevTools": true} in developer_settings.json in the Claude configuration folder, then pressing Command-Option-I (macOS) or Ctrl+Alt+I (Windows).
-
codex execprints messages to the terminal instead of a log file.RUST_LOGcontrols how much it prints;codex execshows only errors unless you set a more verbose value such asRUST_LOG=debug. -
Interactive
codexrecords diagnostics in local stores in~/.codex(or$CODEX_HOME) by default. A plain text log is opt-in:Terminal window RUST_LOG=debug codex -c log_dir=./.codex-logtail -F ./.codex-log/codex-tui.log
Cursor
Section titled “Cursor”From Cursor’s documentation, not tested by us: open the Output panel (Cmd+Shift+U on macOS) and choose MCP Logs in the drop-down. It shows server startup, tool calls and errors.
Cherry Studio
Section titled “Cherry Studio”From Cherry Studio’s documentation, not tested by us: open Settings → MCP, then the failing server’s details, and read its log there. The documentation recommends reading and fixing the logged error before deleting and re-adding a server.
MCP Inspector
Section titled “MCP Inspector”The Inspector starts the server itself and prints the server’s stderr in your terminal, followed by its own result or error. This makes it the fastest way to see why a server exits:
npx -y @modelcontextprotocol/inspector@2.12.0 --cli \ node /absolute/path/to/server.js --protocol-era auto --method tools/listSee Test a server with the MCP Inspector.
Logs contain secrets
Section titled “Logs contain secrets”Connection logs can include commands, arguments, environment variable names and server error text. Before you paste a log into an issue or a chat, remove tokens, keys, internal URLs and personal paths.
Related
Section titled “Related”Sources
MCPDev is community documentation. It is not affiliated with the Model Context Protocol project or with the vendors of the clients it covers.