Skip to content
Download

Codex

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.

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 this block to ~/.codex/config.toml. Replace the address with the one from the Collectors page.

~/.codex/config.toml
[mcp_servers.loggerhead]
command = "loggerhead-mcp"
args = ["--backend-url", "http://127.0.0.1:54321"]

Restart Codex. The tools appear under loggerhead.

Ask Codex to find the slowest trace in the last hour. It calls query_traces with a minimum duration and reads the spans.

To 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.