Skip to content

MCP server

Plug Subsidia into Claude Code, Cursor, n8n or any MCP client: sourced answers, Cortex search, verification, postes and Reflex flows as tools, with one API key.

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"

Authentication is the same API key as the rest of the API (Authorization: Bearer sk_live_... or x-api-key), created in the console. On a self-hosted install, replace the host with your own.

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.lightOne question
cortex_searchHybrid search over the knowledge base. Returns passages with source, page and a retrieval trace. Read-only.knowledgeFree
subsidia_verifyGives every claim of a text a verdict against the passages you send (or Cortex dossiers). Deterministic, no model call, signed.proofOne control
poste_runRuns a poste on one dossier: RAS or findings tied to pieces. Returns a proof id.agentsQuestions
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