AceDocs

Ace MCP server

Give coding agents, code reviewers and other MCP clients read-only access to Ace's incident context, lessons from past fixes, your operating rules and the current state of a workload.

The Ace MCP server gives any Model Context Protocol client read access to what Ace knows about your incidents, so the agent that changes your code can see what happened in production, what was tried before and how your team wants the work done.

All tools are read-only, and the server can't change anything in Ace or in your systems. Ace changes live systems only through its own actions, under your approval policy.

Server URLhttps://app.tryace.dev/api/mcp
TransportStreamable HTTP (stateless, JSON responses)
AuthenticationBearer token in the Authorization header
Protocol versions2025-06-18, 2025-03-26, 2024-11-05
Tools5, all read-only

Common uses:

  • A coding agent loads an incident's root cause, evidence and proposed actions before it opens a pull request.
  • A reviewer checks whether a change repeats a fix that made a similar incident worse.
  • Agents read your operating rules before they diagnose or change anything.
  • You check a workload's open incidents, early warnings and recent changes before a deploy.

Before you start

  • Creating a token needs the admin role, because a token reads your whole organization. See Roles and permissions.
  • Your MCP client must support remote servers over Streamable HTTP with a custom Authorization header. For stdio-only clients, use the mcp-remote bridge under Other clients in Step 2.
  • Ace authenticates with access tokens, so skip any OAuth sign-in your client offers for this server.

Step 1: Create a token

  1. In Ace, open Settings > MCP.
  2. Under Create a token, name the token after its use, such as Claude Code - payments repo.
  3. Choose when it expires: in 30, 90 (the default), 180 or 365 days.
  4. Select Create token.
  5. Copy the token now, because Ace shows it once and stores only a hash. Tokens start with ace_mcp_.

Store the token as an environment variable in your shell profile or secret manager, then reference the variable in your client's configuration so the token stays out of config files:

export ACE_MCP_TOKEN="ace_mcp_..."

A token can read your whole organization

A token reads every incident, workload and operating rule in your Ace organization, whoever created it, so treat it as a production read credential. Keep it out of source control, issue one per client or person, and use the shortest expiry that works.

Step 2: Connect your client

Create .mcp.json in the repository root. Claude Code expands ${ACE_MCP_TOKEN} from your environment when it connects, so the file holds no secret and can be committed.

.mcp.json
{
  "mcpServers": {
    "ace": {
      "type": "http",
      "url": "https://app.tryace.dev/api/mcp",
      "headers": {
        "Authorization": "Bearer ${ACE_MCP_TOKEN}"
      }
    }
  }
}

Or use the CLI. The single quotes save the variable reference instead of its value, so the token itself never lands in the config:

claude mcp add --transport http ace https://app.tryace.dev/api/mcp --header 'Authorization: Bearer ${ACE_MCP_TOKEN}'

Run /mcp to check that ace is connected with five tools. On first use, Claude Code asks you to approve the project's servers.

Tools

ToolParametersWhat it does
get_incident_context
Read-only
  • incident (string, required): Incident ID or Ace incident reference such as INS-1018-ab12.
The complete Ace incident context: what happened, root cause with supporting and contradicting evidence, open questions, evidence timeline, topology, and every proposed or running action with its constraints and pull request. Use it before reviewing or changing code for an incident.
search_incidents
Read-only
  • query (string, optional)
  • status ("open" | "resolved" | "any", optional)
  • limit (integer, 1–25, optional)
Find Ace incidents by meaning (similar causes and fixes across the organization) and by text in the headline, reference or workload name. Returns references to pass to get_incident_context.
get_lessons
Read-only
  • incident (string, optional): Incident ID or Ace reference such as INS-1018-ab12.
  • query (string, optional): The problem in a sentence, to find similar incidents.
  • workload (string, optional): Workload name or ID.
  • limit (integer, 1–10, optional)
What Ace learned from verified outcomes: fixes that worked on a workload, fixes to avoid (they made an incident worse, or repeatedly did not recover), and similar past incidents with the actions taken and how each was judged. Give an incident, a description of the problem, or a workload. Use it before proposing a fix.
get_operating_rules
Read-only
  • applies_to ("all" | "diagnosis" | "remediation" | "code_change" | "live_operation", optional): Only the rules for this kind of work (rules for everything are always included).
The workspace's operating rules: how its administrators want diagnoses, recommendations, pull requests and live operations done. Follow them. They narrow what to do and never grant permissions.
get_workload_context
Read-only
  • workload (string, required): Workload name or ID.
A workload right now: its open incidents, its open early warnings (forecasts and capacity risks) and its changes (deploys, configuration, infrastructure) in the last 24 hours.

Pass an incident as its Ace reference, such as INS-1018-ab12, or its ID, and a workload as its name or ID. Lookups only see your organization.

get_incident_context

Returns the full incident as Markdown and as structured data, including:

  • headline, workload, severity, status and a link to the incident
  • what happened and what triggered it
  • the root cause with its confidence, supporting and contradicting evidence, and open questions
  • the evidence timeline, with source links where available
  • matched services and the dependency path, when known
  • notes from Ace and your engineers
  • every proposed or running action, with its progress, constraints and pull request link
Arguments
{ "incident": "INS-1018-ab12" }

search_incidents

Finds incidents by meaning and by text in the headline, reference or workload name. Matches by meaning come first with a similarity score, followed by the most recent text matches with severity and status. Each result includes the reference to pass to get_incident_context.

Without query, it lists the most recent incidents. status defaults to any and limit defaults to 10.

Arguments
{ "query": "orders stuck after a schema migration", "status": "resolved", "limit": 5 }

get_lessons

Returns what Ace learned from verified outcomes. Pass at least one of incident, query or workload, and limit defaults to 5. The result has three parts:

  • Fixes that worked lists fixes that recovered the workload and never made it worse, with counts.
  • Fixes to avoid lists fixes that made an incident worse, or that failed to recover the workload at least twice and never recovered it.
  • Similar past incidents, with the actions Ace took in each and how each was judged.

Fix history needs a workload, because Ace tracks fixes per workload. It takes the workload from workload, or from the workload of incident. See How memory works.

Arguments
{ "workload": "checkout-api", "query": "p99 latency spike after deploy" }

get_operating_rules

Returns your workspace's operating rules and the kinds of work each one covers. applies_to filters to one kind of work, and rules that apply to everything are always included.

Arguments
{ "applies_to": "code_change" }

get_workload_context

Returns a workload's open incidents and open early warnings, where each early warning is a forecast or a capacity risk with when the limit is expected to be hit. The result also lists up to 20 changes from the last 24 hours, such as deploys and configuration or infrastructure changes.

Arguments
{ "workload": "checkout-api" }

Example prompts

Each prompt lists the tools it should call, though most clients pick tools on their own once Ace is connected.

Fix an incident with full context

Load Ace incident INS-1018-ab12 and our operating rules for pull requests.
Then fix the root cause in this repository. Don't repeat any fix that Ace
lists under "Fixes to avoid" for this incident's workload.

Tools: get_incident_context, get_operating_rules with applies_to: "code_change", get_lessons with incident.

Review a pull request against past incidents

Review this diff. Use Ace to find past incidents on checkout-api that touched the
same code path, and flag anything this change repeats from a fix that made an
incident worse or didn't recover it.

Tools: search_incidents, get_lessons with workload.

Check a workload before you deploy

Before I deploy payments-worker, check Ace for open incidents, early warnings and
changes in the last day. Tell me if anything argues for waiting.

Tools: get_workload_context.

Write a post-incident summary

Summarize Ace incident INS-1018-ab12 for our incident review: what happened, the
root cause with its evidence, what was changed, and what's still unknown.

Tools: get_incident_context.

Security and access

  • All five tools are marked read-only in their MCP annotations.
  • A token belongs to the organization and reads all of its incidents, workloads and rules, whoever created it. Only admins can create, see and revoke tokens.
  • Ace stores only a hash of each token, and a token expires after the period chosen when it was created, at most 365 days.
  • Requests with a browser Origin header other than Ace's own get 403, so call the server from agents, IDEs and CLIs.
  • Ace logs each tool call with the token, the tool, the incident read and the result, and keeps the log for 90 days. Settings > MCP shows when each token was last used.
  • A tool result is capped at 200,000 characters. Longer incident context is cut off and ends with a link to the incident in Ace.

Treat incident content as untrusted

Incident context includes alert text, log lines, error messages, Slack replies and third-party pages, any of which can contain prompt injection. Keep tool-call approval on in your client, review what the agent does with the results, and don't let incident content alone justify a code or infrastructure change.

Revoke a token

  1. In Ace, open Settings > MCP.
  2. Under Tokens, select Revoke next to the token.

The next request with that token gets 401. Revoked and expired tokens stay in the list with their status, so you can see which clients need a new one.

Limits and errors

LimitValue
Calls per token120 per minute
Calls per organization, across all tokens600 per minute
Requests per client address300 per minute
Failed authentications per client address20 per minute
Request body64 KB
Tool result200,000 characters

Each request carries one JSON-RPC message, and batches aren't supported.

StatusMeaningWhat to do
401The token is missing, malformed, revoked or expired. The body is {"error": "Invalid Ace MCP token."}.Check the Authorization: Bearer ace_mcp_... header, and check that the environment variable is set where your client runs. If the token was revoked or has expired, create a new one.
403The request came from a web page (Origin header).Call the server from an agent, IDE or CLI.
413The request body is larger than 64 KB.Tool arguments are short strings, so this usually means a malformed request.
429A rate limit was reached. The retry-after header gives the seconds to wait.Wait that long before you retry. If you hit the organization limit, spread the work over time or run fewer agents at once.

Tool errors, such as an unknown incident or a missing argument, come back as a normal tool result with isError: true and a message, such as No incident INS-0000-xxxx in this organization. An unknown tool returns JSON-RPC error -32602, and an unknown method returns -32601.

Next steps

On this page