AI assistants (MCP)
Avrel has an MCP server, so you can use your own AI assistant with your organization's data: Claude (Claude Code, Claude Desktop, claude.ai), Cursor, or any other client that speaks the Model Context Protocol. The assistant reads the same verified data you see in the app, and can propose hardware or record a release with the access you give it. It runs on your AI account, not Avrel's.
Connect an assistant#
There are two ways. Sign-in is the easiest for a person; a key is for CI pipelines and scripts that run with nobody there.
With sign-in (recommended)#
Avrel supports MCP authorization (OAuth 2.1), so you connect with a button instead of pasting a key.
- Add Avrel to your assistant as a custom connector with the address
https://app.getavrel.com/mcp. - Claude (claude.ai and Claude Desktop): Settings, Connectors, Add custom connector. Paste the address and choose Connect.
- Claude Code:
claude mcp add --transport http avrel https://app.getavrel.com/mcp, then run/mcpand choose Authenticate. - Cursor: add
{"mcpServers": {"avrel": {"url": "https://app.getavrel.com/mcp"}}}tomcp.json, then choose Connect next to Avrel in Cursor's MCP settings. - Your assistant opens an Avrel page. Sign in if asked.
- Pick the organization and the access (the page offers no more than the assistant asked for), and choose Connect. Only owners of an organization can connect an assistant to it.
The connection then appears in Settings > AI assistants, with when it was last used, and Disconnect ends it at once. Behind the scenes the assistant holds an access token that lasts one hour and a refresh token that lasts 30 days and is replaced every time it is used. Signing in again after 30 days of no use is expected.
With a key#
- In the app, open Settings (the cog at the bottom of the sidebar) and choose AI assistants (
/settings/ai-assistants). Only owners of an organization see this. - Under Key for CI and scripts, name the key (for example "CI pipeline"), pick its access, and press Create key.
- Copy the key straight away. It starts with
ava_and is shown once. Avrel keeps only a fingerprint of it. Keys do not expire, so revoke one when it is no longer used. - Add the server to your assistant or pipeline. The app shows both forms ready to copy:
For Claude Code:
claude mcp add --transport http avrel https://app.getavrel.com/mcp --header "Authorization: Bearer ava_..."
For clients configured with JSON (Claude Desktop, Cursor and others):
{
"mcpServers": {
"avrel": {
"type": "http",
"url": "https://app.getavrel.com/mcp",
"headers": { "Authorization": "Bearer ava_..." }
}
}
}
Then ask, for example, "Is our current release safe to ship?" or "What happened in the last incident?".
What a key or connection can reach#
A key or a connection belongs to one organization and acts as the person who created it. It cannot name or reach any other organization. If that person leaves the organization, or stops being an owner, it loses what they lost; a connection stops working altogether. The app shows when each was last used, and Revoke or Disconnect stops it at once.
Each one has one of three access levels:
| Access | What the assistant can do |
|---|---|
| Read | See the site, hardware, safety audit, release gate verdict, incidents, telemetry, collectors and their health, alerts, saved runs, the verification matrix and readiness records. It changes nothing. |
| Propose | Everything in Read, and propose hardware, requirements and evidence for a person to review. A proposal is never accepted by the assistant. |
| Operate | Everything in Propose, and record a release, run the release checks, set the list of systems, save a run, record a test result and open a readiness record. Use it for a CI pipeline. |
Recording a release and setting the systems also need the key's creator to be an owner.
Tools#
| Tool | Access | What it does |
|---|---|---|
get_site | Read | Systems, the current and earlier releases, setup progress, collectors and open incidents. |
get_hardware | Read | The declared components, power cables, data links and start-up fail-safe. |
audit_hardware | Read | Runs the safety audit on the declared hardware, or on a draft without saving it. |
check_release | Read | "Is this hardware and this release safe to ship?" The verdict with every check and what clears a failure. With a candidate release it checks that release and records nothing. |
list_incidents, get_incident | Read | Recorded incidents with their rule-based analysis and accepted investigations. |
get_telemetry | Read | Stored readings from one system between two times. |
list_collectors, get_collector_health | Read | Collectors, when each last reported, and the likely cause when one goes quiet. |
get_alerts | Read | Alert history and open problems. |
list_saved_runs, get_saved_run | Read | Windows of readings people saved. |
get_verification_matrix | Read | Every requirement with its verification method, evidence and verdict, plus readiness records. See Requirements and readiness records. |
get_readiness_record | Read | One readiness record: its snapshot, approvals, status and whether its signatures check out. Its JSON export is served by this tool. |
propose_hardware | Propose | Proposes the hardware, for example after the assistant reads a wiring photo itself. |
read_hardware_from_files | Propose | Has Avrel read photos or PDFs into a hardware proposal with its own model. |
investigate_incident | Propose | Has Avrel draft a root cause for an incident. The draft is returned, not saved. |
propose_requirements | Propose | Proposes requirements, for example read from a specification. They wait for a person to accept them. |
import_requirements_csv | Propose | Proposes a whole verification matrix from CSV. |
propose_evidence | Propose | Proposes a test result, analysis, inspection or review against a requirement, for a person to accept. |
record_release | Operate | Records the release now running, with the gate's verdict stored next to it. |
run_release_checks | Operate | Runs the release gate now. |
set_systems | Operate | Replaces the list of systems the organization watches. |
save_run | Operate | Saves readings from one system as a named run. |
record_test_result | Operate | Records a test result from CI against a requirement, accepted at once. A pass outside its limits is refused. |
open_readiness_record | Operate | Freezes the matrix and release gate into a readiness record for people to sign. |
Hardware proposals#
When an assistant proposes hardware, nothing changes in your declared hardware. The proposal waits in Describe the hardware, with who sent it and when. An owner presses Load the proposal, checks each row (rows the assistant was unsure of are marked), and saves it, or presses Discard it. A newer proposal replaces an older one that nobody loaded.
Everything is recorded#
Every tool call is written to the organization's audit log, with the person the assistant acts for, the key or connection it used, and whether it was done, refused or failed. Reads are recorded too. Owners see the log in Settings > Audit log and can export it; see Security and data.
What assistants cannot do#
Some actions stay with people on purpose, and the server has no tool for them:
- see members' names and email addresses, or invite and remove people;
- create, list or revoke agent keys, collector keys or connections;
- read the audit log;
- change alert channels, which hold addresses and webhook URLs, or alert settings;
- accept a proposed draft, add a release-gate check from an incident, or delete saved data;
- accept or reject proposed requirements or evidence, or retire a requirement;
- approve or reject a readiness record, which is a person's signature.
Each new feature in the app is either added as a tool or listed here as held back. Avrel's tests fail if a feature is neither.
For developers#
The server speaks MCP Streamable HTTP at POST /mcp with JSON-RPC 2.0, protocol versions 2025-11-25, 2025-06-18 and 2025-03-26. It is stateless: each request is answered with one JSON response, and the key or token is checked on every request. A missing, expired or revoked one gets 401 with a WWW-Authenticate header that points to the protected resource metadata.
Sign-in follows the MCP authorization specification:
- Protected resource metadata (RFC 9728):
/.well-known/oauth-protected-resource/mcp. - Authorization server metadata (RFC 8414):
/.well-known/oauth-authorization-server. - Dynamic client registration (RFC 7591):
POST /oauth/register. Redirect addresses must behttps, a loopbackhttpaddress, or an app's own scheme. - Authorization code flow with PKCE (
S256only) at/oauth/authorizeand/oauth/token, with theresourceparameter (RFC 8707) set to the/mcpaddress. Scopes areread,proposeandoperate. - Refresh tokens rotate on every use. Reusing an old one, or reusing an authorization code, ends the whole connection.
- Revocation (RFC 7009):
POST /oauth/revoke.
Every operation in the app and every tool goes through one registry in server/control_plane.py, so the app, MCP and keys share the same code and the same permission checks.