Skip to main content

MCP Server

A read-only MCP server for coding agents. It reads one project with the project's API key.

The Risicare MCP server lets a coding agent read the data of one project. It speaks the Model Context Protocol (MCP). It is read-only: each of its 25 tools reads, and no tool changes anything. Its only credential is a project API key. Every read of project data needs a Secret key. An Ingest key, the class of the first key of a new project, cannot read traces, sessions, agents, cost, releases or detections.

Set up

Use a Secret key. The first key of a new project is an Ingest key, which cannot read traces. Make a Secret key in Settings → API Keys. See Which key.

Claude Code

claude mcp add --transport http risicare https://app.risicare.ai/api/mcp \
  --header "Authorization: Bearer rsk-..."

Cursor

Add this to .cursor/mcp.json in your project:

{
  "mcpServers": {
    "risicare": {
      "url": "https://app.risicare.ai/api/mcp",
      "headers": {
        "Authorization": "Bearer rsk-..."
      }
    }
  }
}

The file holds the key. Do not commit it to version control.

Other MCP clients

Any MCP client that supports the streamable HTTP transport can connect.

SettingValue
Addresshttps://app.risicare.ai/api/mcp
TransportStreamable HTTP. Each request is a POST.
HeaderAuthorization: Bearer rsk-...
SessionNone. The server keeps no session and gives no session id.
AnswerJSON. The server sends no event stream.

A GET or a DELETE request gets 405 with a JSON-RPC error.

Authentication

The key in the Authorization header is the only credential. Send it as Bearer rsk-.... The server reads no cookie. A sign-in to the dashboard gives no access here. The server reads only the Authorization header. A key in X-API-Key gets 401.

The key sets the project. Each tool reads the data of the project that the key belongs to.

  • A request with no Authorization: Bearer rsk-... header, or with a value in another form, gets HTTP 401 and a JSON-RPC error with the code -32001.
  • The server does not check the key itself. A key that has the right form but is not valid gets HTTP 200. Each tool call then fails with The API key is not valid.

Which key

DataKeyScope
Traces, sessions, agents, cost, releases and detectionsA secret keyprojects:read
RunsA secret keyevaluations:read
DatasetsA secret keydatasets:read
Alert rules and their historyA secret keyalerts:read
A prompt, with resolve_promptAny key that holds the scope: ingest or secretprompts:read
The model price table, with price_tableAny keyNone

An ingest key gets an error that names the missing scope, for example This key does not hold the scope evaluations:read. Create a Secret key in Settings, API keys. Create keys in Settings → API Keys. Only an owner or an admin can create a key. See Key Classes and Scopes.

Use a Secret key, and keep it out of your application

A secret key reads the traces, sessions and agents of its project. When content capture is on (the default), get_trace returns the messages and the tool calls of each span. Keep the key out of code that other people can read, and out of the application that sends your spans. That application needs an ingest key, which cannot read traces.

Tools

ToolWhat it returnsKey
list_tracesTraces, newest first by default: the id, the root span name, the start time, the duration, the span count, the error count, tokens, cost, the session, the environment and the releasesecret
get_traceOne whole trace: the summary, and every span with its timing, status, model, tokens, cost, error, messages and tool callssecret
get_trace_by_spanThe trace that holds a span, from the span id (16 hex characters). It needs a time rangesecret
list_sessionsSessions, newest first: the id, the user, the start time, the duration, the trace count, the error count, tokens and costsecret
get_sessionOne session: its summary and its tracessecret
get_session_messagesThe messages that the agents of a session sent to each other and to the model, oldest first. At most 1,000 (the default is 100). This list has no cursorsecret
list_agentsAgents with traces, invocations, success rate, latency, errors, tokens and costsecret
get_agentOne agent: its performance, error rate and tools, and its top and recent errorssecret
get_agent_toolsThe tools that one agent calls, with the calls, errors and latency of each toolsecret
cost_breakdownCost and tokens over a time window, grouped by one dimension, for example the model, the agent or the release. The groups with the highest cost are listed, and the rest are summed in othersecret
top_modelsThe models with the most calls, tokens and costsecret
price_tableThe model price table that the cost figures use, or the price that one model name resolves toAny
resolve_promptThe content of one prompt version, by name and by a label or a version. This is the read that get_prompt (npm: getPrompt) makesAny
list_runsRuns, newest first: the status, the dataset, the release, the pass rate, and the failed and missing countssecret
get_runOne run: the status, the dataset, the release, the case and trial counts, the pass rates with their intervals, and the settingssecret
get_run_verdictThe verdict of a run against a baseline: compare.verdict (regressed, improved, no_change or no_verdict), gate.result (pass, fail or no_verdict), the pass rates, the change and the reasonssecret
list_run_casesThe cases of a run, with the trials, the pass share and the failure class of each case. On a holdout run, an API key gets no input preview and no failure classsecret
list_datasetsDatasets with their size, version and tagssecret
get_datasetOne dataset: its name, tags, version and up to 1,000 cases, at the newest version or at an earlier one. Each case has a preview of its input of 280 characters. A holdout case has no previewsecret
list_dataset_versionsThe versions of a dataset, newest first, with the author, the time and the operation of eachsecret
list_alert_rulesAlert rules with their metric, threshold, window, severity and statesecret
get_alert_ruleOne alert rulesecret
alert_historyThe times that alert rules fired, newest first, with the value and the thresholdsecret
list_releasesThe releases seen in a time range: the first and last time seen, the trace count, the reference release, the detections, and how many behaviour counters are outside their bandssecret
list_detectionsBehaviour detections, for example a loop, a limit exit or a tool that failed, with the trace, the release and the counter of eachsecret

Each tool describes its arguments to the client. Most list tools take limit. The default is 20. The most is 100, except for cost_breakdown (50), list_detections (200) and get_session_messages (1,000). A tool that pages also takes cursor: pass the next_cursor of an answer to read the next page. Several tools take filter, a filter string in the filter language.

Answers and Limits

  • A tool answers with one text block. The text is the JSON of the Risicare API, as the API sent it. Its keys are in snake_case.
  • An answer holds at most 200,000 characters. A longer answer is cut, and it stays valid JSON.
  • A cut answer has "truncated": true and a truncation_note. The note says what to do: use a smaller limit and read on with cursor, or use a narrower filter or a shorter time range.
  • When the cut removes items from a page, next_cursor is null. The cursor of the full page would skip the cut items.
  • An answer with no list to cut holds preview: the start of its JSON text.
  • A tool call waits at most 30 seconds for the Risicare API.

Errors

Each tool calls the Risicare API behind the server. A failed tool call answers with one sentence and marks the result as an error (isError: true).

CauseSentence
The Risicare API answers 401The API key is not valid.
The Risicare API answers 403 and names the missing scopeThis key does not hold the scope evaluations:read. Create a Secret key in Settings, API keys. With two or more scopes: This key does not hold the scopes <a>, <b>. and the same advice
The Risicare API answers 403 and names no scopeThis key may not read this: <message> with the message of the API. Without a message: This key may not read this. Create a Secret key in Settings, API keys.
The Risicare API answers 404Not found: <id>. with the id or the name that you asked for. Without one: Not found.
The Risicare API answers 429Rate limit. Try again after <n> seconds. When the API gives no wait time: Rate limit. Try again later.
The Risicare API answers another 4xxUpstream error <status>: <message> with the message of the API. Without a message: Upstream error <status>.
The Risicare API answers a 5xxUpstream error <status>.
No answer within 30 secondsThe Risicare API did not answer in time.
Any other failure, for example no connectionThe Risicare API could not be reached.

The sentence never holds the body of a 5xx answer or the key. A bad argument gets its own sentence. For example, resolve_prompt with both a label and a version gets Give exactly one of label and version.

Not Available

  • No tool writes. The server cannot create, change or delete anything.
  • These reads have no tool: the prompt list, one prompt, prompt versions, labels and label events, the dashboards, and the run series. They need a signed-in person. No API key can make them. Use the dashboard.
  • The server takes no OAuth sign-in. Every person who connects uses a project API key.

Next Steps