The agent
MCP
Primary interface. Query traces, SQL, logs, services. Investigate a failure without opening the UI.
An agent that writes code without seeing the running system is guessing. LocalTrace is a local APM: ingest what your SDKs already emit, store it in SQLite, and let the agent inspect what actually happened.
How it sits on the machine
Your app
Existing SDKs
This machine
LocalTrace
Primary interface
MCP
Ingest on :4318 (HTTP / Sentry / Datadog / MCP / UI) and :4317 (OTLP gRPC). Nothing leaves the box.
Why agent-first
The agent
Primary interface. Query traces, SQL, logs, services. Investigate a failure without opening the UI.
Your existing SDKs
Zero new instrumentation. Point OTLP, Sentry, or dd-trace at localhost. No LocalTrace SDK.
Agent + UI
Same services as MCP. Deterministic, filterable, local. Compact payloads built for agents.
You
A human overlay on the same data. The agent does not need it. MCP is the product.
Native connectors
| Connector | Point at LocalTrace | Ingested |
|---|---|---|
| OpenTelemetry HTTP | OTEL_EXPORTER_OTLP_ENDPOINT=http://127.0.0.1:4318 | Traces, logs, metrics — JSON or protobuf |
| OpenTelemetry gRPC | OTEL_EXPORTER_OTLP_ENDPOINT=http://127.0.0.1:4317 | OTLP Export RPCs on the gRPC port |
| Sentry | SENTRY_DSN=http://local@127.0.0.1:4318/1 | Transactions → traces, errors → logs |
| Datadog | DD_TRACE_AGENT_URL=http://127.0.0.1:4318 | dd-trace / ddtrace traces, HTTP logs, metrics |
Sending gRPC to :4318 returns 415 with a hint. Use :4317, or set OTEL_EXPORTER_OTLP_PROTOCOL=http/protobuf.
The product
Cursor · .cursor/mcp.json
{
"mcpServers": {
"localtrace": {
"url": "http://127.0.0.1:4318/mcp"
}
}
}Claude Code · .mcp.json
{
"mcpServers": {
"localtrace": {
"type": "http",
"url": "http://127.0.0.1:4318/mcp"
}
}
}Quick start
Open http://localhost:4318. Data lives in the localtrace-data volume. Early and local-only — wipe and re-ingest when the schema moves. That is intentional.
docker run --rm -p 4318:4318 -p 4317:4317 \
-v localtrace-data:/app/data \
ghcr.io/skaznowiecki/localtrace:0.4.0