MCP server

Let an AI agent read logs through a read-only, audited, rate-limited MCP server.

Verified against v1.0.0-rc.1 · sources

On this page

drillo-mcp lets an MCP client query Drillo over stdio. It is a thin HTTP client of the Drillo API. It stores no data, holds no ClickHouse credentials and can do only what its token's role can do. It is optional and free on every plan.

Tools#

Six read-only tools: search_logs, get_event_context, list_alerts, get_alert_evidence, run_dashboard, create_report. create_report only formats markdown from events re-read through the API. Nothing is stored.

Limits per token#

30 calls per minute, 2 concurrent, the same query three times returns repeat_query, 30 s query budget, readonly ClickHouse, 24 h range clamp, 200 rows, 2 KiB per field.

Setup#

  1. MCP is free on every plan; no licence feature is needed.
  2. As the user whose access the agent should have, create a token with kind: "mcp", scopes search (and optionally saved), and a short TTL (default 7 days, maximum 30). The secret is shown once.
  3. Store the token in a keychain. drillo-mcp refuses --token on the command line.
  4. Register the server in your MCP client:
json
{"mcpServers":{"drillo":{"command":"/usr/local/bin/drillo-mcp",
  "env":{"DRILLO_API_URL":"http://127.0.0.1:8080","DRILLO_MCP_TOKEN":"<from keychain>"}}}}

DRILLO_API_URL must be http://localhost, 127.0.0.1 or [::1] in this build. For a remote server use a local TLS-terminating proxy.

At start the server calls GET /me and refuses to run unless the token is kind mcp, its scopes are within search and saved, and the licence feature is active. drillo-mcp --print-tools-hash prints a SHA-256 of the tool catalogue so you can pin it and detect description changes.

Audit#

Every call writes an API audit row and an audit_mcp record in its own hash chain, covered by the signed audit anchors. If the audit write fails, no data is returned. Output is sanitised and labelled untrusted_content: true.

Errors#

auth_failed, forbidden, not_found (same text for foreign and missing ids), feature_off, invalid_request, rate_limited (with retry_after_ms), repeat_query, timeout, audit_unavailable, licence_required, unavailable.

What MCP does not protect#

  • Prompt injection. Log lines are attacker-influenced. Drillo labels and sanitises output and offers only read tools, but it cannot stop the client agent from obeying text in logs with its other tools (shell, mail, browser).
  • Data sent to the model provider. Results go to whatever model the agent uses. Local stdio does not mean private.
  • Undetected secrets and PII. Masking is best-effort.
  • A stolen token. It works until it expires or is revoked. Keep the TTL short.
  • A compromised host or client. The token sits in the server's environment.
  • Phishing through create_report. Output carries an untrusted banner, but a person can still copy links from it.
  • Compliance. No GDPR, HIPAA, PCI or SOC 2 claim.
  • Planned, not done: signed release, external pen-test, TLS build.

Sources

This page was checked against: docs/mcp/README.md, docs/mcp/test-matrix.md, crates/mcp, crates/api/src/handlers.rs.

Report an inaccuracy (opens a new issue in the Drillo repository; nothing is sent from this page)