Local endpoints
Loggerhead is one native Swift app. The database, the OTLP receiver, the engines, and the MCP server all run inside it, so the app reads its own data through function calls, not through a web API.
Two endpoints stay open on 127.0.0.1 for other programs.
| Method and path | Purpose |
|---|---|
POST /mcp |
The MCP endpoint, over Streamable HTTP. Your AI coding tool talks to this. |
GET /api/health |
A liveness probe. It answers {"healthy":true}. |
Workspace and environment
Section titled “Workspace and environment”The app reads one environment at a time. POST /mcp takes two optional query items, ?workspace=&environment=,
that scope every tool of that request to the pair they name. Omitted, they mean the pair the app shows. A tool
argument with the same name wins over the query item. See
Tools reference.
The port
Section titled “The port”The app picks a free port on each launch and writes it to a file next to its database. The bundled
loggerhead-mcp bridge reads that file, so you never set a port by hand. See
MCP server setup.
Read your telemetry from a script
Section titled “Read your telemetry from a script”Use the MCP server. It is the supported way to read logs, metrics, traces, and linting findings from outside the app, and every MCP client already speaks it. The tools and their parameters are in the Tools reference.
The OTLP receiver
Section titled “The OTLP receiver”Telemetry arrives on the OTLP ports, not on these endpoints. The receiver prefers 4317 for gRPC and 4318 for HTTP, and moves along a ladder when a port is busy. The Collectors page shows the port in use. See Ports and the effective port.