/v1/* routes
the dashboard uses — with just an API key and the gateway URL, no ClickHouse credentials.
Set CLICKHOUSE_URL to read ClickHouse directly instead, for a self-hosted or local
Tracelane stack.
Run it
Build it from a clone:TRACELANE_API_KEY and — with no CLICKHOUSE_URL set — is also where every trace read
goes:
Configure Claude Desktop
Add to~/Library/Application Support/Claude/claude_desktop_config.json
(macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):
Configure Claude Code
Add to.mcp.json in your project root:
Self-host (ClickHouse) instead
SetCLICKHOUSE_URL to read ClickHouse directly rather than through the gateway — for a
self-hosted or local Tracelane stack. TRACELANE_GATEWAY_URL is still needed; it is where
TRACELANE_API_KEY is validated (/v1/auth/whoami) even though trace reads go to
ClickHouse instead:
Available tools
list_traces
trace_id, root_name, start_time,
duration_us, span_count, error_count, intervention, model).
get_trace
get_span
trace_id is required when reading through the gateway (Cloud mode) — there is no
span-by-id gateway route, so the span is located via the trace’s span list. Self-host
(ClickHouse) mode accepts span_id alone.
Returns: single span with all attributes and predictive verdict detail. Input and
output content appears only if content capture is enabled for the
workspace (see Security); it is off by default.
search_traces
explain_guardrail_block
list_evals
get_eval_result
replay_trace
Transport
Start in HTTP mode:
Auth
V1:TRACELANE_API_KEY env var — the tlane_* key is validated against the
gateway’s /v1/auth/whoami. In gateway (Cloud) mode the key also authenticates every
subsequent trace read; the gateway resolves tenant_id from the key’s claims and scopes
every route to it server-side. In self-host mode, the resolved tenant_id scopes every
ClickHouse query this server issues.
V2: OAuth 2.1 PKCE — tenant_id extracted from the JWT claim only, never
from tool arguments.
Security invariants
- Read-only: no write tools are exposed — enforced at the
@modelcontextprotocol/sdkhandler level. - Gateway mode: every read is a tenant-scoped gateway route; this server never sends or sees a tenant id. Self-host mode: every ClickHouse query includes
WHERE tenant_id = {tenantId: String}(parameter-bound). tenant_idfrom env/JWT only — MCP tool arguments cannot override it in either mode.- A non-2xx gateway response is a tool error, never an empty result — a revoked key, a key missing the
readscope, or another tenant’s trace id all surface the gateway’s own status and message. - No raw SQL in tool arguments — all filters are parsed into typed query parameters.