-
Notifications
You must be signed in to change notification settings - Fork 2
Reference MCP Server
Cairn ships a built-in Model Context Protocol server so AI assistants and
scripts can read and manage GRC data directly. It speaks JSON-RPC 2.0 over
Streamable HTTP, protocol version 2025-03-26, authenticates with OAuth 2.0,
and enforces the same RBAC permissions and scope-based tenancy as the web
interface.
This page is the transport and authentication contract. The tool catalogue is generated from the registry and is never maintained by hand.
| Endpoint | Purpose |
|---|---|
POST /api/v1/mcp |
The JSON-RPC 2.0 MCP endpoint |
GET /api/v1/mcp/.well-known/oauth-protected-resource |
Protected-resource metadata (RFC 9728), for client discovery |
GET /.well-known/oauth-authorization-server |
Authorization-server metadata (RFC 8414) |
GET /authorize |
Authorization endpoint (authorization code + PKCE) |
POST /api/v1/oauth/register/ |
Dynamic client registration |
POST /api/v1/oauth/token/ |
Token endpoint (authorization code and refresh grants) |
GET, POST /api/v1/oauth/applications/
|
Manage your registered applications |
The two .well-known documents sit where the specifications require them : the
authorization-server metadata at the host root, the protected-resource metadata
next to the MCP endpoint. A compliant client needs no configuration beyond the
base URL.
The authorization server advertises:
| Capability | Value |
|---|---|
| Response types | code |
| Grant types |
authorization_code, client_credentials
|
| PKCE | S256 |
| Client authentication |
none (public clients, with PKCE), client_secret_post
|
| Scopes | claudeai |
A client that supports dynamic registration needs nothing set up in advance : it registers itself, runs the authorization-code flow with PKCE, and the user approves it from the consent screen. Applications approved this way are listed and revocable under the account's OAuth applications.
Tokens carry the granting user's identity. Every tool call runs as that user, which is what makes the permission and scope checks meaningful : an assistant connected with your token can do exactly what you can do, and nothing else.
| Method | Behaviour |
|---|---|
initialize |
Returns the protocol version, capabilities and server info |
ping |
Returns {}
|
tools/list |
Returns every registered tool with its name, description and JSON Schema |
tools/call |
Runs a tool as the authenticated user |
Batch requests are supported : send an array, receive an array of the responses
that have an id. Notifications (a request with no id) return nothing.
A tool result comes back as MCP content, with the payload as JSON text. A tool
that refuses returns isError: true and a JSON body carrying the reason, rather
than a JSON-RPC error : a permission refusal is a result the model should read
and act on, not a transport failure.
An unexpected server-side failure is logged with its stack trace and returned as
a bare Internal error. That is deliberate : a tool call never leaks internals
to a connected assistant.
Most entities expose the same generated surface, which is why the server registers several hundred tools rather than a curated handful.
| Operation | Tool name | Notes |
|---|---|---|
| List | list_{entity}s |
Paginated, with search, filters and limit / offset
|
| Get | get_{entity} |
By UUID |
| Create | create_{entity} |
|
| Batch create / upsert | batch_create_{entity}s |
Up to 500 objects, non-atomic with partial success. Pass match_on (a list of field names) to update matching records instead of duplicating, which makes a re-run idempotent |
| Update | update_{entity} |
Partial |
| Delete | delete_{entity} |
Only from a lifecycle step marked deletable |
| Transition | {entity}_transition |
Moves the lifecycle state, enforcing permissions, mandatory comments and side effects |
| Allowed transitions | {entity}_allowed_transitions |
What this caller may do from the current state |
| History | get_{entity}_history |
Field diffs, approvals and lifecycle events, paginated |
Ask for {entity}_allowed_transitions before attempting a transition. It is the
difference between a model that respects a governance gate and one that
discovers it by failing.
| Reference | Contents |
|---|---|
| Index | Every tool, grouped by module, with its permission and description |
| Governance and context | Scopes, issues, stakeholders, objectives, SWOT, roles, activities, indicators |
| Assets | Essential and support assets, dependencies, suppliers, contracts, certificates |
| Compliance | Frameworks, requirements, assessments, findings, action plans, mappings |
| Risks | Risk assessments, risks, threats, vulnerabilities, EBIOS RM, treatment, acceptance |
| Incidents | Events, incidents, evidence, custody, notifications, filings, breaches, reviews |
| Reports | Report generation and the management review |
| Trust Center | Certifications, subprocessors, measures, documents, requests |
| System | Users, groups, permissions, company settings |
| General | Saved filters, help, the assistant |
A live server answers the same question authoritatively through tools/list.
See sdk/mcp-tool.md.
Built from docs/ at v0.36.0. Edits made here are overwritten by the next release : open a pull request against the source instead.
- Administration
- Ask Cairn
- Assets and suppliers
- Compliance
- The dashboard
- Finding your way
- Getting started
- Incidents
- How records move
- Organisational context
- Reports and management review
- Risks
- Trust Center
- Architecture
- Configuration
- Contributing
- The documentation system
- Installation
- Internationalisation
- Operations
- Release process
- Security
- Testing
- Adding an assistant provider
- Adding a dashboard widget
- Adding a domain entity
- Declaring a lifecycle
- Adding an MCP tool
- Adding a REST endpoint
- Adding a report
- Interface conventions
- Dashboard widgets
- Lifecycles
- MCP tools
- MCP tool parameters : Assets
- MCP tool parameters : Compliance
- MCP tool parameters : Governance and context
- MCP tool parameters : General
- MCP tool parameters : Incidents
- MCP tool parameters : Reports and management review
- MCP tool parameters : Risks
- MCP tool parameters : System and administration
- MCP tool parameters : Trust Center
- Management commands
- Models
- Permissions
- REST endpoints
- Environment variables
- MCP server
- REST API
- Assistant module (Ask Cairn)
- Module 0: User Management and Access Control
- Module 1: Context and Organization
- Module 2: Asset Management
- Module 3: Compliance
- Module 4: Risk Management
- Module 4 bis - EBIOS Risk Manager
- Module 5 : Trust Center
- Module 6 : Security Incident Management
- Management review : ISO 27001:2022 compliance (clause 9.3)