Every risk team is being asked some version of the same question: can our AI assistants answer questions about exposure, margin and capital? The honest answer is usually "not safely". Risk results live in engines, cubes and PDF reports; access is all-or-nothing; and an agent with a database connection is a compliance incident waiting to happen. The Model Context Protocol gives us a better shape for this problem. Here are the principles we use to put a risk engine behind it.
What MCP is, in one paragraph
The Model Context Protocol (MCP) is an open protocol for connecting AI applications to external tools and data. A server publishes a list of tools — named operations with typed inputs and a description — and an MCP-capable client (a desktop assistant, an IDE, an agent framework) lets the model call them. The important property for regulated data is that the server decides what exists. The model cannot call an operation the server does not publish, and every call passes through code you control.
Why not just give the agent SQL?
It is tempting: point the agent at the risk data mart, hand it a read-only database user, and let it write queries. It demos well. It fails in production for three reasons:
- Correctness. Risk numbers do not add up naively. Summing trades before applying legal netting gives the wrong CVA. Add non-overlapping netting-set CVAs under consistent assumptions, without mixing parent aggregates and child rows. SA-CCR add-ons aggregate through hedging sets with offsets, and SIMM margins combine with correlations. A model writing
SUM()over the wrong grain will produce a confident, wrong number. - Governance. Row-level entitlements, legal-entity boundaries and desk segregation are usually enforced in the application, not the database. Raw SQL bypasses them.
- Explainability. When an auditor asks where a figure came from, "the model wrote a query" is not an answer anyone wants to give.
Seven principles
1. Read-only first
Start with tools that read results the engine has already computed and validated: universes, aggregation trees, workflow runs, audit events. Do not let the first version launch calculations or change data. Write actions — running a what-if, scheduling a batch — can come later, behind explicit human approval. In Everix the write tools are designed but deliberately not registered, so they cannot be called at all.
2. Deterministic tools over free-form queries
Each tool should do one well-defined thing with the engine's own aggregation logic: "get the aggregation tree for this universe at this level", not "run this query". The model chooses which tool to call and with which parameters; the numbers come from the same code path as the risk reports. That keeps answers consistent with what the risk team signs off.
3. Scoped keys, and a tool list that follows the scope
Agents authenticate with API keys tied to a service account and a set of scopes. The server filters the tool list by those scopes, so an agent that should only see workflow status never learns that exposure tools exist. Least privilege applies to tools, not just rows.
4. Audit every call
Every tool call records the service account, tool, argument hash, result size and outcome. A hash does not preserve the arguments, and result size does not preserve the response. Full-content retention depends on an agreed audit configuration.
5. Cap the payload
Language models are poor at reading 50,000 rows and good at asking follow-up questions. Hard limits on response size (Everix uses 256 KB and 500 rows) protect the model's context window and encourage drill-down. They cap each call, not cumulative extraction. Permitted result data reaches the selected model provider; bulk exports use separate REST endpoints and permissions.
6. Rate-limit per key
Agents loop. A per-key rate limit (120 calls per minute in our design) keeps a confused agent from hammering the engine and makes runaway behaviour visible in the audit trail instead of on the infrastructure bill.
7. Describe tools for the model, not for the developer
Tool descriptions are prompts. "Returns the aggregation tree" is a poor description; "Returns the hierarchy of risk results (e.g. CVA by legal entity → counterparty → netting set) for one universe and date; use list_universes first to find valid universe ids" tells the model when and how to use it. Good descriptions reduce wrong calls more than any amount of model tuning.
What this looks like in practice
A typical exchange with an agent connected to a risk engine this way:
- The user asks: "Which counterparties drove the CVA increase since last month-end?"
- The agent lists the available universes and picks the two month-end runs.
- It fetches the CVA aggregation tree for both at counterparty level — within the row cap.
- It compares them, then drills into the top three counterparties at netting-set level.
- It answers in plain language and cites the universes and tree nodes it used.
Every number in that answer came from the engine, every call is in the audit trail, and the agent never saw anything outside its key's scope. The model did the part models are good at — navigating, comparing, summarising — and nothing else.
What we are not claiming
An agent connected to a risk engine is not a risk manager. It does not validate models, sign off results or replace the controls around regulatory reporting. It makes validated results reachable, faster, for people who already have the right to see them. That is a narrower promise than most AI announcements, and a more useful one.
Where Everix stands
The Everix MCP server is read-only. In Everix Cloud IFR and Cloud Risk it reads capital, K-factors, findings, reports, VaR and runs; on installed Everix it reads calculation results, aggregation trees, workflow status and audit events. XVA has been in production since 2018; licensed ISDA SIMM, SA-CCR and IFR engines are validated and available.
If you want to connect your own agents to risk results, see the AI agents for risk and finance page, or the MCP reference.
Related on everix.io
The Everix note
Get the next article by email
IFR, CRR3, SIMM changes and AI-ready risk data. Roughly monthly, double opt-in.
More insights
SA-CCR worked example: EAD step by step
BCBS 279 Example 1 recomputed step by step: replacement cost 60, add-on 347, EAD 569. Supervisory duration, delta, hedging sets, multiplier and EU specifics.
K-TCD worked example: IFR counterparty capital
K-TCD under IFR Articles 25–32, step by step: replacement cost, PFE, collateral, risk factor and CVA factor, on two illustrative netting sets.