Skip to main content
Moda’s MCP server is a hosted, remote Model Context Protocol server that exposes moda CLI commands as MCP tools — 34 tools (29 registered by default; see Toolsets), each mirroring one CLI command and calling the same Data API, control-plane, and ingest endpoints the CLI calls. Some remote-capable commands have no tool yet; CLI parity lists them. It runs stateless on Cloudflare Workers: every request carries its own API key, and the server stores no credentials and keeps no session state. Each tool’s manifest entry names the CLI command it mirrors (dev.moda/cli_command), so anything you know about a moda command transfers directly.
This server lets your tools query Moda. The dashboard’s MCP servers page is the reverse direction — it registers your agents’ MCP servers so Moda can observe them.

Endpoint

The transport is Streamable HTTP. One endpoint serves both the stateless MCP 2026-07-28 core and 2025-era legacy Streamable HTTP clients; there is no SSE-only transport and no session to establish or resume. A fresh server instance is built per request with your API key bound to it. An unauthenticated health check lives at /health:
Output

Authentication

Every request carries an API key (called an ingestion key in the dashboard) in a header — Authorization: Bearer moda_sk_... preferred, or x-api-key. Unlike the Data API and Ingestion API, which each read only one of those headers, the MCP server accepts either.
Keys travel in headers only — the server never accepts a key in the URL, so it cannot leak into logs, browser history, or MCP client config screenshots of the endpoint field. Authentication is per request: there is no login step, no session, and no server-side key storage. The tenant is embedded in the signed key, so every tool call is scoped to that key’s tenant and nothing can re-point it.
Get a key from the dashboard at Settings → Ingestion keys (shown once at creation), or mint one with the CLI: moda provision for headless environments, or moda init during project setup. See Authentication for key management. A connection without a key still initializes and lists tools; calling any tool then returns an in-band error with setup instructions (where to get a key, how to configure the header) instead of a transport failure, so agents and client UIs surface exactly what to fix. An invalid or revoked key returns the same kind of in-band guidance on every call.

Connect from clients

Clients that only speak stdio (Claude Desktop among them) connect through mcp-remote, which proxies stdio to the remote endpoint. In every snippet, the endpoint URL also accepts a ?toolsets= query parameter to shrink the tool surface — see below.

Toolsets

The toolsets covered in this documentation mirror the CLI’s command areas: By default (no ?toolsets=) the endpoint registers 29 tools: the data and meta toolsets plus search_tools and execute_tool, which reach the prompt, skill, and harness tools on demand (see Lean mode). Append ?toolsets= with a comma-separated list to register exactly those toolsets instead:
meta is always included even when not requested — whoami, doctor, status, and manifest are the connection-diagnosis surface. Unknown toolset names are ignored; if nothing valid remains, the default surface is served. The prompts, skills, and harness toolsets are not registered by default but stay reachable through search_tools and execute_tool. Tools are registered in deterministic name order, so client prompt caches stay warm across requests.

Lean mode

?toolsets=lean serves 12 tools: the 10 core tools (overview, search, conversations, context, ask, problems, problem, frustrations, tool_failures, whoami) plus two catalog meta-tools:
  • search_tools — keyword-searches the tool catalog (every toolset) and returns matching names, descriptions, and input schemas.
  • execute_tool — runs any tool from that catalog by name with a JSON arguments object, validated against the target tool’s schema before dispatch.
This is progressive disclosure: agents keep a small prompt footprint for the common flows and reach the long tail on demand. Because execute_tool can reach write tools, it does not advertise a read-only annotation.

Prompts, resources, and instructions

On connect, the server publishes instructions that teach the Moda data model (traces, clusters, detections, problems) and the canonical investigation flows — overview → problems → problem → context, search → context — so agents chain tools correctly instead of guessing at entity relationships.

Investigation prompts

Five MCP prompts package Moda’s investigation playbooks as slash-commands in clients that support them:

Trace transcripts as resources

The resource template moda://conversations/{conversation_id} returns a windowed markdown transcript of one ingested trace (5 messages centered on the latest). Search-style tools return trace IDs (conversation_id); clients can attach or preview the transcript by id without spending a tool call. For a specific window, use the context tool with msg_index and window.

Result shape

  • Tool results are JSON by default. Heavy read tools accept response_format: "concise" | "detailed"; concise returns a compact markdown rendering instead of the full payload.
  • Results are capped at roughly 25k tokens. Oversized results are truncated with an explicit hint to narrow the query (limit, days_back, time_range, an id) — never silently cut.
  • Unknown ids return an empty result plus a warning, not an error, matching the Data API’s convention.
  • Every read tool carries a readOnlyHint: true annotation (plus idempotentHint); write tools declare themselves non-read-only, so clients can gate them behind approval.
  • Errors come back as recovery instructions — what failed, why, and what to do next — never a bare status code.
  • Transcript excerpts, user quotes, and world-state values inside results are end-user data from your production traffic. The server quarantines them under untrusted_data in structured results and fences them in resource markdown, so agents treat them as data, never as instructions.

CLI-only commands

Not every moda command is a tool. Commands that open a browser, manage local credentials, or read and write your repo (moda init, moda provision, moda auth *, …) stay CLI-only. Some remote-capable commands (custom signals, detection reviews, users, and others) have no tool yet. The manifest tool returns the tool-to-command map, the reason each CLI-only command is excluded (cli_only), and the commands not yet exposed (not_yet_exposed); CLI parity lists both.
On the roadmap: OAuth 2.1 resource-server authentication and a listing in the official MCP registry. Header-based API key authentication is the supported path today.

Next steps

  • MCP tool reference — every tool with its parameters and example output.
  • CLI parity — the tool-to-command map, which commands stay CLI-only, and which have no tool yet.
  • CLI overview — the same surface from the terminal, and how to mint API keys.
  • Data API overview — the HTTP API behind the data toolset.