Skip to content

MCP server

InfraSigns exposes its data to MCP clients — Claude Desktop, IDEs, agents — so you can ask an AI assistant questions about your infrastructure: "what's in this morning's digest?", "is anything firing right now?", "show me CPU for prod over the last 6 hours".

Two transports:

Transport How Tools
Streamable HTTP /mcp on the daemon, Authorization: Bearer <api.token> all, including trigger_digest
stdio infrasigns mcp --config <path> as a local process read-only set (no trigger_digest)

The HTTP endpoint exists only when api.token is configured — the tool set includes a state-changing trigger, so it shares the gate with POST /api/digest/trigger. The stdio mode talks to the same database and sources directly and is strictly read-only by design.

This page is about InfraSigns serving its tools to MCP clients. The reverse — the Q&A agent consuming tools from external MCP servers you run — is a separate feature; see External MCP tool servers.

The HTTP endpoint and the Q&A bots are self-hosted surfaces: they read the process configuration and its sources directly, so in the hosted (cloud sign-in / multi-tenant) mode they are suppressed — they would answer for the operator's data rather than a signed-in organization's. A per-organization AI surface is separate future work. The stdio mode is a self-hosted local process throughout.

The same tool registry powers the Q&A bot in-process: the bot sees the read-only set below (no trigger_digest), with identical schemas and input validation.

Tools

Tool Arguments Returns
get_source_health per-source: up, error, last collection time
get_latest_digest source? the newest digest: full text, alert count, criticality, delivery receipts, template-fallback flag
list_reports type? (digest/trends), source?, month? (YYYY-MM), limit? archive rows, newest-first (default 20)
get_active_alerts source? live scrape: firing/pending alerts correlated into incident groups; an unreachable source is reported as data, not an error
query_metrics source, query? (configured query name), window?, step? (Go durations) time series; capped at 500 points per series — widen the step for long windows
query_prometheus source, query (arbitrary PromQL), window?, step? (Go durations) instant query by default; passing window runs a range query. Responses are capped at 100 series and 500 points per series — cuts are reported as series_omitted / points_omitted (points are downsampled to real samples, never interpolated). Empty series means the query matched nothing (or yielded only non-finite values). Only offered for sources that support raw queries (Prometheus)
query_loki source, query (arbitrary LogQL log selector), window? (Go duration, default 1h), limit? (default 50, max 200) recent raw log lines, newest-first. truncated: true means the limit was hit and older lines may exist — narrow the query or window. Empty lines means the selector matched nothing. Log lines are sanitized (control characters stripped, length-capped) before they cross the wire. Only offered for sources that support raw log queries (Loki)
trigger_digest source? runs a digest cycle now (done / skipped_no_data / already_running). Makes a billable LLM call and sends real notifications. HTTP transport only

Claude Desktop

Remote daemon (all tools):

{
  "mcpServers": {
    "infrasigns": {
      "url": "https://infrasigns.example.com/mcp",
      "headers": { "Authorization": "Bearer <your api.token>" }
    }
  }
}

Local, no daemon required (read-only; needs the config file and database access):

{
  "mcpServers": {
    "infrasigns": {
      "command": "infrasigns",
      "args": ["mcp", "--config", "/etc/infrasigns/config.yaml"]
    }
  }
}

Notes

  • Read-only by default: every tool except trigger_digest only reads the store or queries a source, matching the product's safe-by-default posture.
  • get_active_alerts performs a live scrape per call — expect it to take as long as a normal collection for the queried sources.
  • Metric values are returned as bare numbers: sources run arbitrary configured queries, so units are whatever the query yields.
  • Metrics: infrasigns_mcp_requests_total{status}status is served (authenticated request handed to the MCP transport) or unauthorized. The mount also reports readiness under the mcp key in /readyz.