# MCP endpoint

The app serves the [Model Context Protocol](https://modelcontextprotocol.io) itself, so an AI assistant can read and work on your registers with the same checks as the REST API. Each MCP tool calls the REST route it names, in-process: a tool call **is** the REST call, with its validation, permissions, plan limits, rate limits, idempotency, concurrency check, webhooks and audit trail.

| Property | Value |
| --- | --- |
| URL | `https://mcp.riskregister.com/mcp`, the endpoint's own host. `https://riskregister.com/mcp` is the same endpoint on the app's host, and keeps working |
| Profiles | `/mcp`: every tool but the admin ones. `/mcp/full`: all 45 |
| Transport | Streamable HTTP, stateless: spec revision 2026-07-28, and 2025-era clients (`initialize`) on the same URL. No sessions, no batches, no `subscriptions/listen` |
| Authentication | `Authorization: Bearer …`, with a [personal access token](https://riskregister.com/docs/authentication.md#personal-access-tokens) or an [organisation API key](https://riskregister.com/docs/authentication.md#organisation-api-keys). Clients that connect by signing in (claude.ai, Claude Desktop, ChatGPT) use OAuth sign-in instead, on `mcp.riskregister.com`: see [Connect an AI assistant](https://riskregister.com/docs/connect-assistants.md#claudeai-claude-desktop-and-chatgpt) |
| Limits | A request body of 1 MiB plus 64 KiB for the protocol's envelope, so a document at the document save's 1 MiB limit fits; 180 seconds per request |

## Connecting

Connect with a personal access token. Create one at `https://riskregister.com/account/personal-access-tokens`, where each client's setup is ready to copy (VS Code also has an **Install in VS Code** button). The assistant acts as you: your role, and the registers you can open. Any client that can send a header to a remote MCP server connects the same way: the URL and the `Authorization: Bearer` header. [Connect an AI assistant](https://riskregister.com/docs/connect-assistants.md) has the setup for Claude Code, VS Code, Cursor, Gemini CLI and Codex CLI, where each keeps the token, and what to do if it doesn't connect. claude.ai, Claude Desktop and ChatGPT connect by signing in to Risk Register (OAuth), with no token to copy: the same page has their setup.

Clients connect from a server or a desktop app, not a browser page: a request carrying another origin's `Origin` header is refused with a `403`, and no CORS headers are served (so a browser-based inspector's direct mode can't connect).

A missing or unknown token gets a `401` with `WWW-Authenticate: Bearer realm="riskregister"` (plus `error="invalid_token"` for an unknown one), before any tool runs. If the organisation is suspended, a plan or operator switch closes the API to the token, or a rate limit is hit, the endpoint answers as the REST API does (`403`, or `429` with `Retry-After`).

## Tools

| Group | Tools | Profiles |
| --- | --- | --- |
| Workspace | `get_workspace_context`: who the token acts as, the plan, its caps and what is left; `get_my_work`: what is waiting for that person across every register they can read; `list_members`: the people in the workspace, or those a register's work can be given to, to find the id that a request naming a person needs | both |
| Registers | `list_registers`, `get_register`, `get_register_document`, `get_changes` (since a revision: each risk changed, what was done to it and each field's from and to), `get_review_queue` (what waits for a person), `list_proposals` and `get_proposal` (what a person decided), `get_treatment_plan` (every action across the register, and decisions with nothing open), `get_statement_of_applicability` (the ISO/IEC 27001 or ISO/IEC 42001 Annex A position the register implies, with the organisation's recorded decisions; it only reads, and decisions are recorded in the app; Team and above), `get_register_health` (what needs a person's attention: reviews overdue or out of cadence, risks without an owner, risks whose controls changed since they were last assessed, each with the screen that puts it right; it only reads, and fixes go through `propose_register_changes` or the single-record tools, with a person deciding; only where the register health check is turned on), `export_register` (CSV or Markdown), `generate_register_from_context` | both |
| Templates | `list_templates`, `get_template_document`, `create_register_from_template` | both |
| Saving work | `create_register_draft` (a whole register, from a v5 document, as a draft), `propose_register_changes` (changes to an accepted register, for a person to decide) | both |
| Risks | `search_risks` (across registers), `list_risks`, `get_risk`, `create_risk`, `assess_risk`, `treat_risk` | both |
| Reviews | `list_risk_reviews`, `get_risk_review`, `request_review`, `complete_review`, `record_review` (a review just done, with no request first), `cancel_review`. Completing or recording a review takes up to five evidence links, http or https, which every read of the review returns | both |
| Controls | `list_controls`, `get_control`, `list_control_implementations`, `get_control_implementation`, `review_control_implementation` | both (implementations: Business plan and above) |
| Scopes | `list_scopes`, `get_scope` | both (Business plan and above) |
| Reference | `list_risk_categories` | both |
| Webhooks | `list_webhook_endpoints`, `get_webhook_endpoint`, `list_webhook_deliveries` | full (owners and admins, Business plan and above) |
| Audit | `list_audit_log` | full (owners and admins) |
| Connected assistants | `list_connected_assistants`: the apps members connected by signing in, their live personal access tokens and the apps an organisation owner disconnected, each with its member, access level and dates (never a secret). It is what Settings > Connected assistants shows the organisation's owners and admins; each member manages their own apps at `/account/connected-apps` | full (owners and admins) |

**Which tools a token is offered** depends on its access ([Authentication](https://riskregister.com/docs/authentication.md)), which its owner can change at any time: a `read` (Read only) token gets only the reads (`export_register` included); a `propose` (Ask me first) token also gets `create_register_draft`, `create_register_from_template`, `propose_register_changes` and `generate_register_from_context` (whose register is then a draft); a `write` (Make changes) token gets every tool its profile has. `tools/list` lists only those, so an assistant isn't offered calls that would be refused. A client keeps the list it was given, and the endpoint keeps no session to tell it of a change, so after the access changes, reconnect the app, or start a new conversation, so it sees the tools the new level allows. A tool called by name anyway is unknown, and its route would refuse it in any case (`403`, `INSUFFICIENT_SCOPE`).

**What the server tells the assistant.** The handshake carries `instructions`, written for the token's access: call `get_workspace_context` first; with a `propose` token, what you save waits for a person to review it; with a `write` token (Make changes), a change the user asks for is made with the tool that makes it, and only what no tool makes (a title, a description, an owner, a control link), or what the user wants looked at first, is proposed; give the user the `reviewUrl` of a draft or proposal; never invent a score, owner or source; never set a risk to `accepted`; and that a generated register is a draft, to tell the user about before generating. Each names only the tools that access is offered.

Every tool states a title and all four annotations. A read is `readOnlyHint` and `idempotentHint`. A write is neither, and a write that changes an existing record is `destructiveHint`, conservatively, even where the audit log keeps the old value. Only `generate_register_from_context` is `openWorldHint`: the description you give it goes to a third-party AI model.

The tools don't delete anything, and don't expose every write the REST API has. No tool edits a risk's title, description, owner or control links once the risk exists (propose those with `propose_register_changes`), adds or changes a treatment plan's actions, records or revokes a formal acceptance, creates an empty register, edits or archives a register, sets its risk appetite, creates or changes a control, a scope or a control implementation, or changes how long the audit log is kept. Those are done in the app or over REST: the [API overview](https://riskregister.com/docs/overview.md) lists the routes.


## How a tool call behaves

- **Results.** A read returns `data` as JSON text. A paged list adds `nextCursor` and `hasMore` (`list_risk_categories` is one short list, in one call). A single record adds its `etag` where the route versions it: registers, risks, reviews, controls, implementations and scopes. A `search_risks` result names its register, with its state and its revision at the moment of that page.
- **Size.** A result carries at most 60,000 bytes (Claude Code refuses one over 25,000 tokens by default). Past that, a read first tries a smaller form (see **Smaller forms** below); if none fits, it is a tool error, `PAYLOAD_TOO_LARGE` with subcode `RESULT_TOO_LARGE` and no `status` (no route refused it), which names a `limit` that fits or another way to read the record (a large register's document: its risks a page at a time with `search_risks`). A write is never refused after the fact: its change is made, so its result keeps what names the record (ids, refs) and says the rest is left out. An error that big keeps its status and message, without its details.
- **Pages.** For the next page, call again with the **same arguments** plus `cursor: nextCursor`. The cursor keeps a position, not your filters. A sorted `list_risks` is one page, up to `limit`, with no cursor.
- **Errors.** A REST error comes back as a tool error (`isError`) the model can read: the `status`, `code`, `subcode`, `message`, `details` and `requestId`, and `retryAfterSeconds` on a `429`. A plan limit is told apart from a permission refusal by its subcode: `PLAN_LIMIT` (with the limit and the cap), `OPERATOR_LIMIT` (the same, set by an operator: upgrading won't lift it), `FEATURE_NOT_ENABLED` (the plan lacks the feature) or `FEATURE_TURNED_OFF` (an operator turned it off). Arguments that don't fit a tool's schema (a wrong type, a value outside its list, or a field it doesn't know) are refused before any route is called (`Input validation error: …`). A misspelled field is never dropped silently.
- **Idempotency.** Every write takes an `idempotencyKey`, sent as `Idempotency-Key`. A retry with the same key and arguments writes once and returns the record as it now stands. `generate_register_from_context`, `create_register_draft`, `create_register_from_template` and `propose_register_changes` require one: their work can outlast a client's timeout and still finish, so retry with the same key to get its result. See [Idempotency](https://riskregister.com/docs/idempotency.md).
- **No tool adopts anything.** A draft becomes an accepted register, and a proposal changes one, only when a person adopts it in the app. The draft tools return the draft's review URL. `generate_register_from_context` returns its register's `reviewUrl` too: the register is a draft at every access level. `propose_register_changes` returns the proposal's `reviewUrl`, the register's Proposals tab, where a person sees each change field by field and adopts or declines it; everyone else who can adopt it is emailed that link, at most once a day per register, and everyone who can adopt a proposal still open eight days after it was made is reminded, once. When a new draft is saved, the person it was saved for is emailed its link. Each person can turn these off under Drafts and proposals in their notification settings. No tool adopts, accepts or decides, and a document save can't mark a risk accepted.
- **Files.** `export_register` returns two parts: what the file is (its filename, content type and size, and whether it is cut short), then its text (CSV or Markdown). A file past the size limit is cut after its last whole row, never refused: the export has already been counted and audited.
- **Smaller forms.** A read past the size limit may come back in a smaller form that fits, saying in `omitted` what it leaves out and where to read it. Each read tries its forms most complete first, and is refused only when none fits. A template's read drops its guide, then its risks' rationales, then their descriptions. A register's document drops each risk's description, then comes as one line per risk, then as a summary (counts by category, status and treatment, and every risk's key and title) that isn't a document and can't be saved back.
- **Unknown tools.** Calling a tool the profile doesn't serve (an admin tool on `/mcp`) is a JSON-RPC error, `Tool … not found`, not a tool error.
- **What a tool reads.** What its token reads: an owner's or admin's token reads every register, and a member's token the registers they've been added to. Another register's data is a `403` tool error, and `list_registers` shows only the member's registers. An organisation key reads as the person who minted it, with their role at the time of the call. See [What a token reads](https://riskregister.com/docs/authentication.md).
- **Concurrency.** `ifMatch` is optional: without it no version check happens. `assess_risk` and `treat_risk` take an `ifMatch`: the `etag` from `get_risk`. `complete_review` and `cancel_review` take one from `get_risk_review`. If the record has changed since, the call fails with a `412` and writes nothing. Unlike the REST error, the tool error leaves out the record's current etag: read the record again. The value goes as `x-rr-if-match`; see [ETag concurrency](https://riskregister.com/docs/etag-concurrency.md).
- **Rate limits.** Every MCP request counts against the token's read limit, as every REST request does. A tool call's own route call then counts as it would over REST, so a tool call costs one read more than the REST call. See [Rate limits](https://riskregister.com/docs/rate-limits.md).
- **Audit.** A write's audit row names the token, as over REST. Its user agent reads `riskregister-mcp/app (<the client's user agent>)`.

## When the endpoint is paused

Risk Register can pause the endpoint without touching the web app or the REST API, for an incident or to stop runaway cost. There are two modes, and in both the answer is `503` with code `SERVICE_UNAVAILABLE`, and nothing is done:

- **Changes paused** (subcode `MCP_WRITES_PAUSED`): the tool list and every read work as usual; a tool that would change something (a save, a proposal, a risk or review change, a generation, and an export, which is recorded and counted) comes back as a tool error, before anything is written. Tell the person the change wasn't made; they can make it in the app, or ask again later.
- **Endpoint paused** (subcode `MCP_PAUSED`): every request is refused before its token is checked, so a client can't connect.

A pause lasts until it is lifted: don't retry in a loop. Drafts and proposals already saved stay, for people to review in the app.
