Skip to content

MCP server

Plug Subsidia into Claude Desktop (sign-in with OAuth), Claude Code, Cursor, n8n or any MCP client: sourced answers, Cortex search, verification, postes and Reflex flows as tools.

The Gateway lets any AI client use Subsidia as its model. The MCP server lets it use Subsidia's capabilities: ask the firm's documents, search Cortex, verify a text, run a poste, start a Reflex flow. The client keeps its own model; Subsidia answers as a set of tools, with the same key, scopes, metering, proofs and audit as the REST API.

It speaks the Model Context Protocol over Streamable HTTP, in stateless mode: one POST per JSON-RPC message, JSON in, JSON out, nothing kept between calls.

Connect a client

One URL, one key
claude mcp add --transport http subsidia https://api.subsidia.protypa.fr/mcp \
--header "Authorization: Bearer $SUBSIDIA_API_KEY"

For these clients, authentication is the same API key as the rest of the API (Authorization: Bearer sk_live_... or x-api-key), created in the platform. On a self-hosted install, replace the host with your own. Claude Desktop uses a sign-in instead, described next.

Claude Desktop (OAuth)

In Claude Desktop and on claude.ai you do not paste an API key: you add Subsidia as a remote connector and sign in to your Subsidia account. Under the hood Subsidia is an OAuth 2.1 authorization server for this one door (authorization code with PKCE S256, dynamic client registration, refresh tokens); the connector ends up holding an ordinary Subsidia key, so everything below the sign-in is the same as the API-key path.

  1. 1
    Add the connector

    In Claude, open Settings › Connectors and add a connector (the exact label depends on your Claude version). Paste the server URL:

    text
    https://api.subsidia.protypa.fr/mcp
  2. 2
    Sign in to Subsidia

    Claude opens a Subsidia window. Sign in to your Subsidia account if you are not already, and choose the workspace the connector should work in.

  3. 3
    Consent

    The window lists what the connector will be allowed to do. Accept, and you are sent back to Claude. Refuse, and nothing is created.

What the connector can reach. The same tools and the same walls as a key limited to light, knowledge, proof and agents: subsidia_ask, cortex_search, subsidia_verify and poste_run. It never gets the Reflex tools or the Gateway. It acts with your real role in the workspace, not as an owner: a dossier you cannot open stays closed to it, and if you leave the workspace the connector stops answering. Its certificates, the Registre and the access journal are the same as for any key; the journal labels the client as the Claude connector.

What you control. The connector appears in the keys screen as Claude (connecteur), with your first name. Revoke it there and /mcp answers 401 straight away and its refresh token stops working; connecting again later is a new consent. The access token lasts one hour and is renewed silently while the connector is in use.

Which path to use. Claude Desktop and claude.ai use the OAuth connector. Claude Code, Cursor, n8n and scripts keep using an API key as shown above (a Claude Desktop that only speaks stdio can use mcp-remote with a key).

What Claude is told. At connection the server sends short instructions that Claude keeps for the conversation: call subsidia_ask for any question about a client, a dossier or a document; keep the sources and the certificate line; run subsidia_verify on a text it wrote from the documents, replace every contradicted value with the one the document gives, and say which sentences remain unprovable. Each tool also carries the MCP hints (readOnlyHint, destructiveHint, openWorldHint), so Claude can group the read-only tools apart from poste_run and flow_run. These are instructions, not a guarantee: Claude still decides whether to call a tool.

Tools

ToolWhat it doesKey scopeCost
subsidia_askAnswers a question strictly from the workspace documents, with numbered sources and a proof id. A question the documents do not cover gets an honest refusal.lightTokens
cortex_searchHybrid search over the knowledge base. Returns passages with source, page and a retrieval trace. Read-only.knowledgeFree
subsidia_verifyGives every sentence of a text a verdict against the passages you send (or Cortex dossiers): proven, partial, contradicted (with the value the document gives instead), opinion or unprovable. Deterministic, no model call, signed.proofOne control
poste_runRuns a poste on one dossier: RAS or findings tied to pieces. Returns a proof id.agentsTokens
flow_listLists the Reflex flows with state, schedule and last run. Read-only.reflexFree
flow_runStarts a manual run of a flow and returns the run id.reflexPer the flow
run_statusStatus of a run: steps, errors and any approval waiting on a person. Read-only.reflexFree
approvals_listLists the approvals waiting for a person. Read-only.reflexFree

Results come back both as readable text (content) and as structured data (structuredContent: sources, verdicts, proofId, runId). Tools that return an AI answer return the proof id the engine already issued for it; check it against the certificate.

What a key can reach

Each tool checks its own scope, exactly as the matching REST route would. tools/list only shows the tools your key can call: a key limited to knowledge sees cortex_search and nothing else, so a client never offers its model a tool that will be refused. A key with none of the capability scopes is a legacy key and sees everything, as it does on REST.

A readonly key keeps the tools that only read (subsidia_ask, cortex_search, subsidia_verify, flow_list, run_status, approvals_list) and loses poste_run and flow_run. The key's monthly question ceiling stops subsidia_ask and poste_run; a verification or a search is never stopped by it.

Errors

A failure of a tool is a normal result with isError: true, so the calling model can read it and adapt. The result carries the same code the REST API uses, in structuredContent.code.

`code`Meaning
scope_deniedThe key does not have the scope this tool needs.
read_only_keyThe key is read-only and this tool changes something or spends questions.
invalid_argumentsAn argument is missing or has the wrong type. The message names it.
API_KEY_BUDGET_EXCEEDEDThe key reached its monthly question ceiling.
QUESTION_LIMIT, PLAN_UPGRADE_REQUIRED, …The billing codes of the error reference, unchanged, with their details.
not_found, invalid_requestA flow or run does not exist, or a flow must be fixed before it can run (the validation issues are included).
poste_not_found, not_a_posteThe poste is not installed in this workspace, or the key is not a poste.
retrieval_failedThe search in the documents did not complete: nothing was answered. Try again.

An unknown tool name or a malformed message is a JSON-RPC error (-32602, -32601, -32600). Missing or invalid keys, rate limits and suspended accounts are HTTP errors on the request itself (401, 429, 403), as everywhere else in the API.

Protocol notes

  • Methods: initialize (protocol version 2025-06-18), tools/list, tools/call, ping; notifications are accepted and answered with 202 and no body. Batches are accepted.
  • Capabilities: tools only. No resources, prompts or sampling.
  • GET /mcp answers 405: there is no server-initiated stream.
  • Every call is written to the access journal (mcp.tool, tool name, key id). The text of questions and documents is not.
  • Writing into Cortex from a third-party agent is not offered: ingestion goes through a proposal a person validates.

Related