Skip to main content
Glama
Invariance MCP

Invariance MCP

Official
by Hardik-Singh

@invariance/mcp

An MCP (Model Context Protocol) server that connects AI coding agents to the Invariance observability platform. It gives tools like Claude Desktop, Cursor, and Claude Code direct access to your runs, nodes, monitors, signals, findings, reviews, and more.

MCP is an open protocol that lets AI assistants use external tools and data sources. This server implements it for Invariance, so your AI assistant can query observability data, investigate issues, and analyze agent behavior without leaving the conversation.

Install

npm install -g @invariance/mcp

Or run directly with npx (recommended for MCP client configs):

npx @invariance/mcp

Related MCP server: Claude Code Starter Kit MCP

Setup

Environment variables

Variable

Required

Default

Description

INVARIANCE_API_KEY

Yes

—

Your Invariance API key

INVARIANCE_API_URL

No

https://api.useinvariance.com

API base URL (deprecated alias: INVARIANCE_BASE_URL)

INVARIANCE_MCP_TRANSPORT

No

stdio

Transport mode: stdio or http (sse is accepted as a deprecated alias for http)

INVARIANCE_MCP_PORT

No

3000

Port for SSE/HTTP transport

INVARIANCE_TIMEOUT

No

30000

Request timeout in milliseconds

Get your API key at platform.useinvariance.com/settings/api-keys. For headless agents, issue a one-time bootstrap token from the dashboard and redeem it with inv login --bootstrap <token> before starting the MCP server.

Claude Desktop

Add to your Claude Desktop config (~/Library/Application Support/Claude/claude_desktop_config.json on macOS):

{
  "mcpServers": {
    "invariance": {
      "command": "npx",
      "args": ["-y", "@invariance/mcp"],
      "env": {
        "INVARIANCE_API_KEY": "your-api-key"
      }
    }
  }
}

Claude Code

Add to your Claude Code config (.claude/settings.json or ~/.claude/settings.json):

{
  "mcpServers": {
    "invariance": {
      "command": "npx",
      "args": ["-y", "@invariance/mcp"],
      "env": {
        "INVARIANCE_API_KEY": "your-api-key"
      }
    }
  }
}

Cursor

Add to your Cursor MCP settings (.cursor/mcp.json):

{
  "mcpServers": {
    "invariance": {
      "command": "npx",
      "args": ["-y", "@invariance/mcp"],
      "env": {
        "INVARIANCE_API_KEY": "your-api-key"
      }
    }
  }
}

Available tools

The server exposes 150 tools (plus 6 legacy aliases) covering Invariance API workflows. Names follow invariance_<resource>_<action>.

See ../COVERAGE_MATRIX.md for the cross-surface (TS / Python / CLI / MCP) coverage matrix, and AGENTS.md for an agent-facing tool guide.

Every tool carries MCP annotations (readOnlyHint, destructiveHint, openWorldHint) so agent clients (Claude Desktop, etc.) can distinguish inspection tools from state-changing ones without parsing prose descriptions.

For instrumentation setup, make this the default sequence in agent instructions:

  1. Call invariance_doctor to verify the API key and platform reachability.

  2. Create or reuse a workflow instance with invariance_case_create.

  3. Start a run linked to that case with invariance_run_start.

  4. Call invariance_node_write for each LLM call, tool call, retrieval, decision, handoff, external action, and error.

  5. Call invariance_workflow_event_create for semantic business facts operators should filter on.

  6. Finish or fail the run with invariance_run_finish or invariance_run_fail.

  7. Inspect invariance_workflow_observability_get, create useful dashboard panels with invariance_saved_view_create, and ask Cortex with cortex_ask.

Good first saved views are task usage by action_type, failed tool calls, cost by model, stale open executions, review queue by severity, and workflow outcomes. Cortex can also suggest dashboard panels; ask it what a workflow operator should see, inspect the SQL-like structured query shape, then persist the useful query as a saved view.

Cases (invariance_case_*) create, get, list, update, close, evidence, events_list, event_create — workflow instances that group runs as evidence (create with workflow_key / tenant_id / end_user_id; attach evidence and events; close with an outcome).

Workflows (invariance_workflow_*) list, get, create, update, delete, event_list — the workflow definitions that cases instantiate.

Runs (invariance_run_*) start, get, list, finish, fail, verify, metrics, operational_graph, llm_calls, node_types, node_type_metrics, fork, inspect

Nodes (invariance_node_*) write, list

Monitors (invariance_monitor_*) create, list, get, update, pause, resume, evaluate, executions, findings

Signals (invariance_signal_*) emit, list, get, acknowledge, resolve

Findings (invariance_finding_*) list, get, update

Reviews (invariance_review_*) list, get, claim, unclaim, resolve

Agents (invariance_agent_*) me, set_key, create, list, get

Operators (invariance_operator_*) me, create, list, get — the unified actor model. Every Claude Code session, autonomous agent, and human teammate is an operator. Use operator_type='agent' for autonomous workers, operator_type='human' for teammates whose screen recordings, microphone capture, meetings, and Granola notes feed the company brain.

Sessions (invariance_session_*) create, list, get, append_note, attach_run, record_summary_to_kb — capture sessions that group runs, notes, and KB summaries under a single operator's work.

Captures (invariance_capture_*) create, list, get, update, link, links, unlink — standalone evidence (sessions, conversations, traces). link attaches a capture to any evidence-graph target: pass run_id for the legacy run link, or target_type (run | case | workflow_event | node, defaults to run) + target_id to create a richer link with an optional link_type. links lists all links; unlink takes link_id to detach a specific link (or clears run_id when omitted).

Memory (invariance_memory_*) read, write — record what the agent looked up or wrote about a subject (customer, account, policy, …).

Evals (invariance_eval_*) dataset_create, dataset_seed_suite, dataset_list, dataset_get, dataset_append_example, dataset_examples_list, scorer_create, scorer_list, scorers_list_builtin, suite_create, suite_list, suite_get, case_create, case_create_from_run, case_list, suite_run, run_get, run_results, experiment_run, experiment_compare — author datasets/scorers/suites, kick off eval runs against agents or recipes, score them with built-in scorers (exact_match, contains, numeric_tolerance, json_match, levenshtein), and diff a candidate run against a baseline. Prefer dataset_seed_suite when an agent has JSON examples and needs a runnable suite in one tool call.

Insights invariance_narrative_get (LLM-synthesized run summary), invariance_ask (turn-based Q&A over your KB + runs), invariance_kb_pages_list, invariance_kb_page_get, invariance_kb_page_create, invariance_kb_page_update, invariance_kb_page_delete, invariance_kb_session_create, invariance_kb_session_delete, invariance_kb_session_list_messages, invariance_kb_session_append_message.

Operational debugging — agent-friendly views over runs. invariance_run_operational_graph (entities, edges, findings, and a completeness score for a run), invariance_run_llm_calls (paginated LLM calls for a run), invariance_run_node_types / invariance_run_node_type_metrics (typed-node aggregates), invariance_run_fork (branch a run from a node for replay/what-if), invariance_run_inspect (composite triage view: run + metrics + narrative + recent nodes + open findings, mirrors inv run inspect).

Cross-run metrics invariance_metrics_overview (total runs / nodes / errors / cost over a window), invariance_metrics_agents (per-agent usage rollup).

Workflow observability (invariance_workflow_observability_*) — read list (rollups across all workflows), get (one workflow's rollup), executions (per-execution health: status, stale flag, reasons, evidence mix). All read-only.

Divergences (invariance_divergence_*) list (read; filter by run/kind/severity/status), get (read), update (write — transition status: open | accepted | dismissed | converted_to_monitor).

Saved views (invariance_saved_view_*) list (read), get (read), create (write), update (write), run (write — pass EITHER saved_view_id OR source+spec), delete (destructive).

Receipts (invariance_receipt_*) create (write), batch (write), list (read), get (read) — proofs that external actions happened. create and batch require an agent API key (operator tokens get 403).

Guardrails (invariance_guardrail_*) list (read; filter by status/recipe_id), get (read), create (write), update (write), promote (write — lifecycle: suggested → accepted → shadow → active_monitor → rejected).

Recipes (invariance_recipe_*) list (read), get (read; by ID or slug), update (write — enabled, default_mode). Built-in operational-check registry; promote one into a guardrail with invariance_guardrail_create.

Cortex (cortex_*) cortex_ask, cortex_launch, cortex_list_jobs, cortex_retry_job, cortex_job_runs, cortex_run_job, cortex_run_eval, cortex_run_counterfactual, cortex_get_job, cortex_get_result — ask governed, cited operational questions; create Cortex jobs; poll status/results; inspect attempt history.

Health invariance_doctor — server + API + auth health check. Mirrors inv doctor --json. Use this first when an agent connects to verify its setup before issuing other calls.

For complex object arguments (monitor body, signal data, node input/output, run metadata) tools accept JSON-encoded strings, which the server parses before dispatching to the API.

Legacy tool aliases

The original 6 tool names from earlier versions are kept as aliases so existing client configs keep working: invariance_create_run, invariance_get_run, invariance_list_runs, invariance_write_node, invariance_list_nodes, invariance_verify_run.

HTTP transport

To run the server over Streamable HTTP instead of stdio:

INVARIANCE_MCP_TRANSPORT=http INVARIANCE_MCP_PORT=3000 npx @invariance/mcp

The server exposes a Streamable HTTP endpoint at http://127.0.0.1:3000/mcp and a health check at http://127.0.0.1:3000/health.

Authentication (HTTP)

Unlike stdio (which reads INVARIANCE_API_KEY from the environment, single-tenant), the HTTP transport authenticates per session from the client request. Each MCP client must send its own API key in the Authorization: Bearer … header on the initialize request. That key is bound to the resulting session and used for every tool call made through that session.

This means a single hosted MCP server can serve multiple distinct customers; each connecting client provides its own bearer and only sees data scoped to that key. INVARIANCE_API_KEY is not required in the environment for HTTP mode.

MCP clients that support HTTP transport can connect using the /mcp endpoint URL with their own API key as the bearer.

Troubleshooting

"INVARIANCE_API_KEY environment variable is required"

Make sure you've set the INVARIANCE_API_KEY environment variable in your MCP client configuration. See the setup guides above.

Server not appearing in your MCP client

  1. Verify the config file path is correct for your client

  2. Restart the client after editing the config

  3. Check that npx @invariance/mcp runs without errors in your terminal

Authentication errors

Verify your API key is valid at platform.useinvariance.com/settings/api-keys.

Connection timeouts

If using a custom INVARIANCE_API_URL, verify the URL is reachable.

Contributing

See CONTRIBUTING.md.

License

MIT

Available Tools

159 tools
cortex_askA

Ask the READ-ONLY Cortex analyst (complex_query) an operational question and get a cited answer. Use this for questions like "Were refund SLAs met last week?", "Why did this run diverge?", "Which agents touched case_123?". The analyst is governed and EVIDENCE-CITED: every id in evidence_refs / affected_entities was observed through a read tool, and the runtime FAILS CLOSED against fabricated or cross-project ids (no answer is invented and no other tenant's data can leak). It only reads — it never mutates state. Returns the validated ComplexQueryResult {short_answer, reasoning_plan, evidence_refs, affected_entities, confidence, restricted_evidence_count, recommended_action, follow_up_questions}. mode="sync" (default) blocks for the answer; mode="async" enqueues then polls until the job is terminal. Note: the analyst only executes when the platform CORTEX_TOOL_RUNTIME_ENABLED flag is on.

Inputs: question (required), project_id (required), mode, target_ref, +1 more.

cortex_get_jobA
Read-only

Get a Cortex job's metadata and status (no artifacts). Returns the same safe-field projection as cortex_run_job: ids, status, target, actor, criteria, timestamps, error. Use cortex_get_result to fetch the structured result body.

Inputs: job_id (required).

cortex_get_resultA
Read-only

Get a Cortex job's structured result. Returns {job_id, status, result?}. The result is validated against the known per-kind schemas (workflow_eval / counterfactual_eval / outcome_attribution / complex_query / divergence_error_tracking). Raw artifacts (prompt input, raw model output) are NOT returned by this tool — they remain private on the platform.

Inputs: job_id (required).

cortex_job_runsA
Read-only

List the attempt history (audit-trail runs) for a Cortex job — one row per execution attempt, with status, model, metrics, timings, and any error. Read-only. Raw prompt/model artifacts are NOT included. Returns {runs: CortexJobRun[]}.

Inputs: job_id (required).

cortex_launchA

Launch a Cortex job through the GOVERNED launcher (POST /v1/cortex/jobs/launch) — the preferred path for the read-only complex_query analyst and divergence_error_tracking. The actor is resolved server-side from the API key and all evidence is ACL-filtered before prompt construction (fails closed against cross-project leak). mode="sync" runs now and embeds result/error; mode="async" enqueues — poll with cortex_get_result or cortex_job_runs. Returns {job_id, status, mode, deduplicated, result?, error?}. Idempotent when idempotency_key is supplied.

Inputs: mode (required), job_kind (required), project_id (required), target_ref (required), +3 more.

cortex_list_jobsA
Read-only

List Cortex jobs across accessible projects, newest first. Filter by status and/or kind. Read-only. Returns {data: CortexJob[], next_cursor}. Pass next_cursor back as cursor to page.

Inputs: kind, limit, cursor, status.

cortex_retry_jobA

Re-queue a failed or dead Cortex job for one more attempt (POST /v1/cortex/jobs/:id/retry). Returns {job_id, status}.

Inputs: job_id (required).

cortex_run_counterfactualA

Convenience wrapper around cortex_run_job for job_kind="counterfactual_eval": estimates what MIGHT have happened under a hypothetical change. Result is a HYPOTHESIS, not fact — it carries assumptions, evidence_refs, confidence, and uncertainty. question is required.

Inputs: question (required), project_id (required), target_ref (required), target_type (required), +4 more.

cortex_run_evalB

Convenience wrapper around cortex_run_job for job_kind="workflow_eval": checks whether a run/case/workflow met its criteria (e.g. SLA, policy compliance, action-item ownership). Returns the same job shape as cortex_run_job.

Inputs: project_id (required), target_ref (required), target_type (required), options, +4 more.

cortex_run_jobA

Enqueue a generic Cortex job (evals, counterfactuals, experiments, attributions). The actor is resolved server-side from the API key (a key bound to an agent_id runs as that agent; otherwise as the api_key actor). The platform ACL-filters input_refs and target access before prompt construction. Returns {job_id, status} plus, when a synchronous MVP runner completes the job inline, the validated result.

Inputs: job_kind (required), project_id (required), target_ref (required), target_type (required), +5 more.

invariance_agent_createA

Create a new agent inside one of the caller's projects. Requires a user-session JWT bearer (not an agent API key) — see invariance-cli inv auth signup / inv auth signin to obtain one.

Inputs: name (required), project_id (required), public_key.

invariance_agent_getA
Read-only

Fetch a single agent by ID. Requires a user-session JWT bearer.

Inputs: id (required).

invariance_agent_listA
Read-only

List agents inside one of the caller's projects. Requires a user-session JWT bearer.

Inputs: project_id (required).

invariance_agent_meA
Read-only

Show the agent identity and API key associated with the current credentials. Useful for confirming which agent context the MCP server is operating as.

Inputs: no named parameters.

invariance_agent_set_keyA

Register or rotate the calling agent's Ed25519 public key. Once set, every node written by this agent must be signed with the matching private key (the server uses this key to verify signatures during invariance_run_verify).

Inputs: public_key (required).

invariance_askB
Read-only

Ask a question against the agent's runs / knowledge base (turn-based session)

Inputs: message (required), model, max_turns, session_id.

invariance_capture_createA

Create a Capture — a standalone evidence record (session, conversation, trace). Captures don't need an execution upfront; link a capture to a run later with invariance_capture_link. Returns the capture session.

Inputs: source (required), tags, model, title, +5 more.

invariance_capture_getA
Read-only

Get a capture by id. Captures are standalone evidence; they don't need an execution upfront; link a capture to a run later with invariance_capture_link.

Inputs: id (required).

invariance_capture_listA
Read-only

List captures (paginated). Captures are standalone evidence; they don't need an execution upfront. Filter by project_id, operator_id, session_type, source, run_id, or tags.

Inputs: tags, limit, cursor, run_id, +4 more.

invariance_capture_updateA

Update a capture: change status, reassign run_id, or merge metadata. Captures are standalone evidence; they don't need an execution upfront; link a capture to a run later with invariance_capture_link.

Inputs: id (required), tags, run_id, status, +1 more.

invariance_case_closeA

Close a case with an outcome — the common path. Equivalent to invariance_case_update with status="closed" + outcome + outcome_value_usd.

Inputs: id (required), outcome (required), closed_at, value_usd.

invariance_case_createA

Create a workflow-instance Case. A case owns many runs across time, agents, and humans (one loan, one audit, one claim). Returns the case; use its id when starting runs with invariance_run_start to link them.

Inputs: workflow_key (required), tags, owner, opened_at, +3 more.

invariance_case_event_createA

Attach a semantic workflow event to a case, e.g. "support.customer.escalated", "approval.granted", or "docs.received". Prefer this for meaningful workflow facts; keep raw execution trace data in runs/nodes.

Inputs: id (required), type (required), tags, payload, +5 more.

invariance_case_events_listA
Read-only

List semantic workflow events attached to one case. These are the queryable facts over the run/node evidence layer.

Inputs: id (required), limit, cursor.

invariance_case_evidenceA
Read-only

Show normalized evidence for a case: the case, linked runs, nodes, workflow events, actors, and outcome. Use this when you need the full workflow execution record instead of only the case row.

Inputs: id (required).

invariance_case_getA
Read-only

Get a case by id, including its linked runs (newest first, capped at 100). Use to inspect status, outcome, owner, custom_attrs, and the runs the case has accumulated.

Inputs: id (required).

invariance_case_listA
Read-only

List cases visible to the calling agent (paginated). Filter by tenant_id, end_user_id, workflow_key, status ("open" | "closed"), outcome, or tags.

Inputs: tags, limit, cursor, status, +4 more.

invariance_case_updateA

Update a case: change owner, merge custom_attrs (shallow), or transition status. Use invariance_case_close for the common "set outcome + close" path.

Inputs: id (required), tags, owner, status, +4 more.

invariance_create_runD

Alias of invariance_run_start

Inputs: name.

invariance_divergence_getB
Read-only

Get a divergence by ID.

Inputs: id (required).

invariance_divergence_listB
Read-only

List divergences (expected-vs-observed gaps) visible to the caller. Filter by run, kind, severity, status.

Inputs: kind, limit, cursor, run_id, +2 more.

invariance_divergence_updateB

Transition a divergence status: open | accepted | dismissed | converted_to_monitor.

Inputs: id (required), status (required).

invariance_dna_accept_edge_candidateA

Accept a proposed DNA edge candidate, making it eligible for promotion into a durable semantic link.

Inputs: id (required).

invariance_dna_list_edge_candidatesA
Read-only

List Company DNA edge candidates — discovered relationships between objects awaiting review. Filter by status (proposed/accepted/rejected/expired/promoted), object_id, or relation_kind. Output: {data: DnaEdgeCandidate[], next_cursor}.

Inputs: limit, cursor, status, object_id, +2 more.

invariance_dna_list_edgesA
Read-only

List durable Company DNA edges — relationships between objects, e.g. the operational graph derived from a run (refund -[REQUIRED]-> policy). Filter by run_id, kind, or entity_id. Output: {data: DnaEdge[], next_cursor}.

Inputs: kind, limit, cursor, run_id, +1 more.

invariance_dna_list_object_mentionsA
Read-only

List Company DNA object mentions — extracted references (in events or chunks) that may resolve to a DNA object. Filter by event_id, chunk_id, object_id, or mention_type. Output: {data: DnaObjectMention[], next_cursor}.

Inputs: limit, cursor, chunk_id, event_id, +3 more.

invariance_dna_list_objectsB
Read-only

List Company DNA objects — the canonical operational entities in a project's DNA graph (e.g. tickets, services, policies). Filter by kind or a free-text query q. Output: {data: DnaObject[], next_cursor}.

Inputs: q, kind, limit, cursor, +1 more.

invariance_dna_promote_edge_candidateA

Promote an accepted DNA edge candidate into a durable semantic link. The candidate must be accepted, carry a semantic_similarity signal, and have at least two evidence chunks (otherwise the API returns 422). Idempotent: re-promoting returns the existing link with already_promoted=true. Set dry_run=true to preview the would-be link without writing.

Inputs: id (required), dry_run.

invariance_dna_reject_edge_candidateA

Reject a DNA edge candidate so it is never promoted.

Inputs: id (required).

invariance_doctorA
Read-only

Run a health check on this MCP server: verifies API key auth, API reachability, and reports server name/version. Mirrors inv doctor --json from the CLI. Returns {checks: [{name, status, message}], summary: {pass, fail, warn}}.

Inputs: no named parameters.

invariance_eval_case_createC

Add a case (input + expected) to an eval suite.

Inputs: body (required), suite_id (required).

invariance_eval_case_create_from_runA

Snapshot an existing production run as a new eval case in a suite (captures the run's input + output as expected).

Inputs: body (required), suite_id (required).

invariance_eval_case_listB
Read-only

List cases for an eval suite (paginated).

Inputs: suite_id (required), limit, cursor.

invariance_eval_dataset_append_exampleA

Append a single example row (input + expected output) to an existing dataset.

Inputs: id (required), body (required).

invariance_eval_dataset_createB

Create a reusable eval dataset (a named collection of input/expected example rows used to drive experiments).

Inputs: body (required).

invariance_eval_dataset_examples_listB
Read-only

List example rows for a dataset (paginated).

Inputs: id (required), limit, cursor.

invariance_eval_dataset_getA
Read-only

Get a single eval dataset by ID.

Inputs: id (required).

invariance_eval_dataset_listA
Read-only

List eval datasets visible to the calling agent (paginated).

Inputs: limit, cursor.

invariance_eval_dataset_seed_suiteA

One-call eval setup for agents: create a dataset, append rows, create a linked suite, create one case per row, and optionally start the eval run. This is the preferred MCP path for turning JSON examples into runnable evals.

Inputs: body (required).

invariance_eval_experiment_compareA
Read-only

Compare two scored eval runs case-by-case (CompareResponse: per-case ScoreDelta entries + aggregate deltas per scorer). Use to surface regressions vs. a baseline.

Inputs: id (required), baseline (required).

invariance_eval_experiment_runA

Execute an experiment against an existing eval run: applies a list of scorer specs to every case result and (optionally) records a baseline run for later compare. Populates eval_results.scores. Built-in scorer names: exact_match, contains, numeric_tolerance (config.tolerance: number), json_match, levenshtein.

Inputs: id (required), body (required).

invariance_eval_run_getB
Read-only

Get an eval run by ID (status, aggregate counts, timestamps, scorer specs).

Inputs: id (required).

invariance_eval_run_resultsA
Read-only

List per-case results for an eval run (paginated). Each result has output, expected, scores (per-scorer 0..1), and pass/fail.

Inputs: id (required), limit, cursor.

invariance_eval_scorer_createA

Register a scorer (named scoring rule that maps an output+expected pair to a 0..1 score). Built-in scorer kinds: exact_match, contains, numeric_tolerance, json_match, levenshtein.

Inputs: body (required).

invariance_eval_scorer_listA
Read-only

List scorers visible to the calling agent (paginated).

Inputs: limit, cursor.

invariance_eval_scorers_list_builtinA
Read-only

List the built-in scorer kinds available on the platform (name + config schema). Use this to discover what you can pass in scorer_specs to invariance_eval_experiment_run.

Inputs: no named parameters.

invariance_eval_suite_createA

Create an eval suite (the legacy grouping for cases + runs). New work should generally prefer datasets; suites remain for back-compat and curated case sets.

Inputs: body (required).

invariance_eval_suite_getC
Read-only

Get an eval suite by ID.

Inputs: id (required).

invariance_eval_suite_listB
Read-only

List eval suites visible to the calling agent (paginated).

Inputs: limit, cursor.

invariance_eval_suite_runA

Kick off an eval run: executes every case in the suite against a target (agent / recipe / inline override) and stores per-case results.

Inputs: suite_id (required), body.

invariance_finding_getA
Read-only

Get a finding by ID.

Inputs: id (required).

invariance_finding_listB
Read-only

List findings (durable, structured issues raised by monitors or agents) visible to the caller, paginated.

Inputs: limit, cursor.

invariance_finding_updateA

Transition a finding to a new status: "open" (active), "review_requested" (escalated to a human/agent reviewer), "resolved" (fixed), or "dismissed" (intentionally ignored / false positive).

Inputs: id (required), status (required).

invariance_get_runC

Alias of invariance_run_get

Inputs: id (required).

invariance_guardrail_createB

Create a guardrail (from a recipe or finding). Required: title. Optional: recipe_id, finding_id, rule, mode, status.

Inputs: title (required), mode, rule, status, +3 more.

invariance_guardrail_getA
Read-only

Get a guardrail by ID.

Inputs: id (required).

invariance_guardrail_listA
Read-only

List per-agent guardrails. Filter by status or recipe_id.

Inputs: limit, cursor, status, recipe_id.

invariance_guardrail_promoteA

Promote a guardrail to a new lifecycle status: suggested → accepted → shadow → active_monitor → rejected.

Inputs: id (required), to (required).

invariance_guardrail_updateC

Patch a guardrail (mode, status, monitor_id).

Inputs: id (required), mode, status, monitor_id.

invariance_kb_page_createA

Create a knowledge-base page

Inputs: body (required), path (required), title (required), kind, +1 more.

invariance_kb_page_deleteC
Destructive

Delete a knowledge-base page

Inputs: id (required).

invariance_kb_page_getB
Read-only

Get a knowledge-base page by ID

Inputs: id (required).

invariance_kb_pages_listC
Read-only

List knowledge-base pages

Inputs: kind, limit, cursor, search.

invariance_kb_page_updateC

Update fields on a knowledge-base page

Inputs: id (required), body, kind, title, +1 more.

invariance_kb_session_append_messageC

Append a message to a KB ask session

Inputs: id (required), content (required), role.

invariance_kb_session_createB

Create a multi-turn ask session for the agent KB

Inputs: model, title.

invariance_kb_session_deleteB
Destructive

Delete a KB ask session

Inputs: id (required).

invariance_kb_session_list_messagesA
Read-only

List all messages in a KB ask session in order

Inputs: id (required).

invariance_list_nodesD

Alias of invariance_node_list

Inputs: run_id (required).

invariance_list_runsC

Alias of invariance_run_list

Inputs: no named parameters.

invariance_memory_readA
Read-only

Record a memory read by an agent against a subject (customer/account/policy/...) and return the current MemoryRecord (if any). Use this whenever an agent consults a remembered belief — it produces an auditable MemoryAccess event tying that belief to a node in the run, which the divergence detectors use to flag stale or unsupported memory.

Inputs: key (required), used_for (required), subject_id (required), subject_type (required), +2 more.

invariance_memory_writeA

Record a memory write by an agent: set or update a belief (claim) about a subject. Returns the new MemoryAccess + MemoryRecord. Defaults: source="agent_write", confidence=1.0. Provide provenance (EvidenceRef[] as JSON) when the claim is derived from authoritative records (CRM/ticket/policy doc) so downstream divergence checks can verify it.

Inputs: key (required), value (required), used_for (required), subject_id (required), +7 more.

invariance_metrics_agentsA
Read-only

Per-agent usage rollup over a time window: run counts, node counts, cost. Useful for agent-by-agent comparison.

Inputs: window_hours.

invariance_metrics_overviewA
Read-only

Cross-run rollup over a time window: total runs, nodes, errors, cost, latency, etc. Use this to ground "what is happening across my agents" questions.

Inputs: window_hours.

invariance_monitor_createA

Create a monitor that evaluates an event-shaped predicate against nodes/runs and optionally emits signals, findings, or reviews when matched.

Inputs: body (required).

invariance_monitor_evaluateA

Manually evaluate a monitor right now against an explicit input scope (returns the resulting execution plus any signals/findings/reviews produced).

Inputs: id (required), input.

invariance_monitor_executionsC
Read-only

List past evaluation executions for a monitor (each has status, trigger, matched_node_ids, timing).

Inputs: id (required), limit, cursor.

invariance_monitor_findingsA
Read-only

List findings produced by a monitor across all of its executions.

Inputs: id (required), limit, cursor.

invariance_monitor_getB
Read-only

Get a monitor by ID

Inputs: id (required).

invariance_monitor_listA
Read-only

List monitors visible to the calling agent (paginated).

Inputs: limit, cursor.

invariance_monitor_pauseA

Disable a monitor so it stops firing (preserves the spec; use invariance_monitor_resume to re-enable).

Inputs: id (required).

invariance_monitor_preview_evaluatorA
Read-only

Dry-run a monitor evaluator against history to see which nodes it would match and why. Writes nothing. Returns {sampled, matched, matches:[{run_id,node_id,matched,reason,observed_value?}]}.

Inputs: body (required).

invariance_monitor_preview_targetA
Read-only

Dry-run a monitor target against history to see which runs/nodes it would inspect. Writes nothing. Returns {run_ids, node_ids, counts:{runs,nodes}, truncated}.

Inputs: body (required).

invariance_monitor_resumeA

Re-enable a paused monitor so it begins firing again.

Inputs: id (required).

invariance_monitor_updateA

Patch an existing monitor (partial update; only included fields change).

Inputs: id (required), patch (required).

invariance_narrative_getA
Read-only

Fetch (or regenerate) the LLM-synthesized narrative for a run

Inputs: run_id (required), refresh.

invariance_node_listB
Read-only

List nodes for a run in append order (paginated).

Inputs: run_id (required), limit, cursor.

invariance_node_writeA

Append a single node (one unit of work) to an open Invariance run. Use this to record tool calls, LLM calls, logs, context attachments, or handoffs as they happen.

Inputs: run_id (required), action_type (required), type, error, +4 more.

invariance_operator_createA

Create a new operator in one of the caller's projects. Operators are the actors whose work shows up in the company brain — create operator_type='agent' for an autonomous worker (Claude Code, a scripted agent, a coding bot) and operator_type='human' for a teammate whose screen recordings, microphone capture, meetings, and Granola notes you want to ingest. Requires a user-session JWT bearer.

Inputs: name (required), project_id (required), operator_type (required).

invariance_operator_getA
Read-only

Fetch a single operator by ID. Requires a user-session JWT bearer.

Inputs: id (required).

invariance_operator_listA
Read-only

List operators inside one of the caller's projects. Filter by operator_type to find all human teammates or all autonomous agents. Requires a user-session JWT bearer.

Inputs: project_id (required), operator_type.

invariance_operator_meA
Read-only

Show the operator identity associated with the current credentials. An "operator" is the unified actor model — every Claude Code session, autonomous agent, AND human teammate is an operator. Use this to confirm which operator context the MCP server is acting as (e.g. before recording session events, attaching runs, or writing notes to the company brain).

Inputs: no named parameters.

invariance_receipt_batchB

Record many external receipts in one call. Requires an AGENT API key (operator tokens get 403).

Inputs: receipts (required).

invariance_receipt_createA

Record one external receipt (proof an external action happened). Requires an AGENT API key (operator tokens get 403).

Inputs: receipt (required).

invariance_receipt_getB
Read-only

Get an external receipt by ID.

Inputs: id (required).

invariance_receipt_listB
Read-only

List external receipts. Filter by run, node, source, kind, external_id, business object.

Inputs: kind, limit, cursor, run_id, +5 more.

invariance_recipe_getA
Read-only

Get a recipe by ID or slug.

Inputs: id (required).

invariance_recipe_listA
Read-only

List built-in operational-check recipes (registry of controls). Promote one into a guardrail via invariance_guardrail_create.

Inputs: limit, cursor.

invariance_recipe_updateB

Patch a recipe (enabled, default_mode).

Inputs: id (required), enabled, default_mode.

invariance_review_claimA

Claim a pending review for the calling agent — sets status to "claimed" so other agents do not pick it up. Pair with invariance_review_resolve when done, or invariance_review_unclaim to release.

Inputs: id (required), notes.

invariance_review_getA
Read-only

Get a review by ID.

Inputs: id (required).

invariance_review_listA
Read-only

List reviews (work items requesting agent/human adjudication of a finding or run) in the queue, paginated.

Inputs: limit, cursor.

invariance_review_resolveA

Close a review by recording a decision: "passed" (looks good, no action), "failed" (issue confirmed, should not ship), or "needs_fix" (issue confirmed, fix-and-retry).

Inputs: id (required), decision (required), notes.

invariance_review_unclaimA

Release a previously-claimed review back to "pending" so another agent can pick it up. Does not record a decision — use invariance_review_resolve for that.

Inputs: id (required), notes.

invariance_run_failA

Close a run with failure — sets status to "failed" and stores the optional error string in metadata.error. Use this when the agent aborted due to an exception or unrecoverable error. For successful completion, use invariance_run_finish.

Inputs: id (required), error.

invariance_run_finishA

Close a run successfully — sets status to "completed". Use this when the agent finished its work without errors. For failures, use invariance_run_fail instead.

Inputs: id (required).

invariance_run_forkA

Fork a run from a specific node — creates a new run that branches off the parent at from_node_id. Useful for "what-if" replays during agent debugging.

Inputs: id (required), from_node_id (required), name, metadata.

invariance_run_getA
Read-only

Get details of an Invariance run (status, metadata, aggregate counts, timestamps).

Inputs: id (required).

invariance_run_inspectA
Read-only

Composite triage view for a run — fetches run, metrics, narrative, recent nodes, and open findings in parallel and returns {run, metrics, narrative, recent_nodes, open_findings}. Mirrors inv run inspect. Best first call when an agent is asked to debug a run.

Inputs: id (required), limit.

invariance_run_listB
Read-only

List runs visible to the calling agent in reverse-chronological order (paginated).

Inputs: limit, cursor.

invariance_run_llm_callsA
Read-only

List LLM calls for a run in append order (paginated). Each entry includes model, tokens, cost, latency, and the underlying node_id.

Inputs: run_id (required), limit, cursor.

invariance_run_metricsB
Read-only

Aggregate metrics for a run: total_input_tokens, total_output_tokens, total_cache_read/write, total_cost_usd, llm_call_count, tool_call_count, error_count, total_latency_ms.

Inputs: id (required).

invariance_run_node_type_metricsA
Read-only

Aggregate metrics for a single typed-node kind within a run (counts, latency stats, custom-field roll-ups).

Inputs: type (required), run_id (required).

invariance_run_node_typesA
Read-only

List the typed-node kinds present in a run (one row per registered type with a count). Pair with invariance_run_node_type_metrics for per-type aggregates.

Inputs: run_id (required).

invariance_run_operational_graphB
Read-only

Get the operational graph for a run — entities, edges, findings, a completeness score (business_object_linked, policy_context_found, owner_found, approval_context_found, downstream_state_change_found), and a missing_evidence list naming the unsupported dimensions.

Inputs: run_id (required).

invariance_run_startA

Start a new Invariance run (the container for a sequence of nodes). The returned run is in status "open" — you must close it later with invariance_run_finish (success) or invariance_run_fail (error).

Inputs: name, case_id, metadata, tenant_id, +1 more.

invariance_run_verifyA
Read-only

Verify the cryptographic proof chain for a run — recomputes node hashes and Ed25519 signatures end-to-end. Returns {valid, node_count, head_hash, first_invalid_node_id, reason}.

Inputs: id (required).

invariance_saved_view_createC

Create a saved query view over executions/events/runs/nodes/captures.

Inputs: name (required), spec (required), source (required), viz, +1 more.

invariance_saved_view_deleteB
Destructive

Delete a saved view by ID.

Inputs: id (required).

invariance_saved_view_getA
Read-only

Get a saved view by ID.

Inputs: id (required).

invariance_saved_view_listA
Read-only

List saved query views (name, source, spec, viz, visibility).

Inputs: no named parameters.

invariance_saved_view_runA

Run a query and return the result. Pass EITHER saved_view_id OR source+spec (exactly one).

Inputs: spec, source, saved_view_id.

invariance_saved_view_updateB

Patch a saved view (partial; only included fields change).

Inputs: id (required), viz, name, spec, +2 more.

invariance_session_append_noteA

Append a freeform text note to an existing session as a custom event with payload {text}. USE THIS WHEN: jotting a thought during a Claude Code task ("trying approach X next"), capturing a meeting takeaway, annotating a screen recording, or recording a partial transcript chunk from microphone capture. The note becomes part of the company brain timeline for that session.

Inputs: text (required), session_id (required).

invariance_session_attach_runA

Attach an existing run to an existing agent-session (PATCH). USE THIS when a Claude Code task that started a session later starts producing a run — call this to link the run's graph back to the session timeline so the brain can correlate transcript/notes with operational nodes.

Inputs: run_id (required), session_id (required).

invariance_session_createA

Open a new agent-session — the canonical container for an operator's bounded chunk of work in the company brain. CALL THIS at the START of: a new Claude Code task (source='api'), a screen recording for a teammate (source='screen_recording'), a mic capture session (source='microphone'), a meeting (source='meeting'), ingestion of a Granola note (source='granola_note'), or a manual note-taking session (source='manual_note'). Events (transcript chunks, tool calls, screenshots, notes) are appended to this session via invariance_session_append_note or the events sub-route. Link a session to a run via agent_id+run_id (or call invariance_session_attach_run later).

Inputs: source (required), external_session_id (required), title, run_id, +3 more.

invariance_session_getA
Read-only

Fetch a single agent-session by ID, including its source, timestamps, attached run/agent, and metadata.

Inputs: id (required).

invariance_session_listA
Read-only

List agent-sessions, optionally filtered by source, agent, run, or status. Use this to find all Claude Code work for an agent (source="api"), all meetings ingested today (source="meeting"), or all screen recordings for a human teammate.

Inputs: run_id, source, status, agent_id.

invariance_session_record_summary_to_kbA

Persist a summary of an agent-session as a knowledge-base page (so it becomes searchable, durable company brain content beyond the raw session timeline). USE THIS at the END of a Claude Code task, after a meeting wraps, or once a screen-recording has been reviewed — to capture the takeaways. The KB page is created under path 'sessions/<session_id>' by default.

Inputs: body (required), title (required), session_id (required), path, +1 more.

invariance_signal_acknowledgeA

Acknowledge a signal — moves status from "open" to "acknowledged" (someone has seen it). Use invariance_signal_resolve to mark fully resolved.

Inputs: id (required).

invariance_signal_emitA

Emit a manual signal (alert/notification) — typically attached to a run/node and used to flag noteworthy events for review or downstream automation. severity defaults to "info" if omitted. run_id/node_id auto-fill from INVARIANCE_RUN_ID/INVARIANCE_NODE_ID env vars when present.

Inputs: title (required), data, type, run_id, +3 more.

invariance_signal_getB
Read-only

Get a signal by ID.

Inputs: id (required).

invariance_signal_listA
Read-only

List signals visible to the calling agent (paginated, newest first).

Inputs: limit, cursor.

invariance_signal_resolveA

Resolve a signal — moves status to "resolved" (the underlying issue has been addressed).

Inputs: id (required).

invariance_verify_runD

Alias of invariance_run_verify

Inputs: id (required).

invariance_workflow_createB

Create a workflow definition with typed fields, expected steps, allowed outcomes, and custom metrics.

Inputs: key (required), display_name (required), description, custom_metrics, +3 more.

invariance_workflow_deleteA
Destructive

Delete a workflow definition. Existing cases/runs/events are retained.

Inputs: key (required).

invariance_workflow_event_createA

Record a semantic workflow event on a case (e.g. "refund.issued", "approval.approved", "human.handoff"). Links case/run/node evidence + external refs and is bridged into DNA. Pass idempotency_key to make external retries safe.

Inputs: type (required), case_id (required), payload, actor_id, +5 more.

invariance_workflow_event_listB
Read-only

List semantic workflow events across cases. Filter by case, workflow, tenant, actor, type, or time window.

Inputs: to, from, type, limit, +7 more.

invariance_workflow_getA
Read-only

Get one workflow definition by workflow key.

Inputs: key (required).

invariance_workflow_listA
Read-only

List workflow definitions: typed fields, expected steps, allowed outcomes, and custom metrics.

Inputs: no named parameters.

invariance_workflow_observability_executionsA
Read-only

List per-execution health for a workflow (status, stale flag, health, reasons, evidence mix, cost/tokens).

Inputs: workflow_key (required).

invariance_workflow_observability_getB
Read-only

Get the observability rollup for one workflow by key.

Inputs: workflow_key (required).

invariance_workflow_observability_listA
Read-only

List workflow observability rollups (per workflow_key: execution/open/closed counts, evidence mix, cost & token totals).

Inputs: no named parameters.

invariance_workflow_updateA

Patch a workflow definition. Existing cases/runs/events keep their workflow_key.

Inputs: key (required), description, display_name, custom_metrics, +3 more.

invariance_write_nodeD

Alias of invariance_node_write

Inputs: run_id (required), action_type (required), input, output.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    C2.5/5.0

    Scored across 159 tools

    Disambiguation2/5

    Several tools are explicit aliases (list_runs/run_list, create_run/run_start, write_node/node_write) and others intentionally overlap (capture_link vs capture_update, cortex_run_job vs cortex_run_eval/counterfactual, case_event_create vs workflow_event_create). These duplicates make it genuinely hard to know which tool to select despite mostly clear resource boundaries.

    Naming Consistency3/5

    The dominant invariance_<resource>_<action> pattern is readable and mostly snake_case, but there are many deviations: aliases invert the order (list_runs vs run_list), noun-phrase names appear (invariance_monitor_findings, invariance_run_node_types), and the cortex_* family follows its own conventions. It is consistent enough to guess, but not predictable across a 159-tool surface.

    Tool Count1/5

    159 tools is far beyond a well-scoped MCP server; the calibration guidance treats 50+ as an extreme mismatch. The count is inflated by aliases, overlapping wrappers, and many near-duplicate subdomain endpoints, making the toolset unwieldy regardless of individual tool quality.

    Completeness3/5

    Coverage is broad across runs, monitors, cases, evals, sessions, DNA, Cortex, and more, so core workflows exist. However, several subdomains have lifecycle dead ends: eval datasets/scorers/suites have create/read/append but no update/delete, agents/operators/captures lack update or delete paths, and monitors cannot be deleted. These are workable gaps but noticeable in a 159-tool API.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      D
      maintenance
      Connects AI assistants to Warpmetrics telemetry data to monitor AI agent performance, execution runs, and LLM costs. It allows users to query success rates, latency, and spend metrics directly through natural language interfaces.
      20
      80 npm
      MIT
    • F
      license
      Not graded
      quality
      D
      maintenance
      Enables AI-driven incident response by connecting Claude to monitoring tools like Prometheus, Grafana, Loki, PagerDuty, and Slack for automated investigation and runbook generation.
      9
      -
    • A
      license
      Not graded
      quality
      B
      maintenance
      Connects AI-powered tools to the Confident AI platform for evaluating, observing, and iterating on AI quality, enabling cloud evaluations, dataset management, prompt versioning, production tracing, and human annotations directly from editors like Cursor and Claude Code.
      2
      MIT