MCP
Foam exposes an MCP server so AI coding agents can query your observability data — logs, traces, metrics, and issues (exceptions) — directly.
search_tracesFind distributed traces by service, status, duration, or attributessearch_logsQuery structured logs with filters across all servicessearch_metricsRetrieve time-series metrics with aggregationsget_issueFetch a Foam issue and its root cause analysislist_servicesDiscover all instrumented services and their metadatacount_eventsCount logs, traces, or spans matching a querylist_attribute_keysExplore available attributes for filteringlist_metric_namesDiscover available metric namesCursor
Add to .cursor/mcp.json in your project (or global settings):
Claude Code
Codex
Other
URL: https://sdk.api.foam.ai/mcp
Transport: Streamable HTTP
Header: Authorization: Bearer YOUR_TOKEN
Example usage
What's the trace for request abc-1234?
gateway → auth (3ms) → checkout (12ms) → payments (4,201ms timeout)
Show me card-store logs between 2:20pm and 2:25pm
[14:23:01] charge_id=cx_8f2k · duplicate=true · skip_write
[14:23:04] charge_id=cx_1a9j · pool_exhausted · retry_queued
What metrics spiked in the last hour for payments?
http.server.duration p99: 1.2s → 8.4s (+600%)
db.pool.active: 48/50 (96% saturated)