Claude Code
Loggerhead ships an MCP server. It gives your coding tool five read-only tools: search logs, query metrics, search traces, get one trace, and get the receiver addresses. The server talks to the Loggerhead engine on your Mac over 127.0.0.1. Nothing leaves the machine.
Find the engine address
Section titled “Find the engine address”Open Collectors → Local OTLP receiver → Connection. The API row shows the address the MCP server needs, for example http://127.0.0.1:54321. The port changes when the app restarts, so copy it fresh.
Add the server
Section titled “Add the server”Run this once in a terminal. Replace the address with the one from the Collectors page.
claude mcp add loggerhead -- loggerhead-mcp --backend-url http://127.0.0.1:54321Restart Claude Code. Type /mcp to confirm that loggerhead shows as connected.
Try it
Section titled “Try it”Ask Claude Code:
checkout is returning 500s locally. why?
Claude Code calls query_logs with the service and severity, then get_trace on the trace ID it finds, and answers from what your app actually did.
Remove it
Section titled “Remove it”claude mcp remove loggerheadTo send the project’s own logs, metrics, and traces to Loggerhead, paste the prompt from Connect your project with one prompt.
See Tools reference for what each tool accepts.