AI agents (MCP)
Connect Claude Code, Cursor and other AI agents to VitalRix through the Model Context Protocol: read incidents, logs, traces and errors, and find the cause of a problem safely.
What it does
VitalRix has a Model Context Protocol (MCP) server. Connect an AI agent such as Claude Code or Cursor to it and the agent can read your open incidents, the failing monitor, the logs, traces and error stack traces around them, recent deployments and who is on call. Working in your repository, it can then find the cause of a problem and propose a fix.
It can also set a project up. Ask, for example, "Set up VitalRix for this project: APM, logs, real user monitoring with session replay, pod CPU alerts, and an SLO with an SLA": the agent adds the instrumentation to your code, writes a setup file, shows you the preview and applies it when you agree.
VitalRix never sees or changes your code: changes to it happen in your agent, on your machine. VitalRix gives it the facts and, only if you allow it, lets it update incidents or apply a setup file.
Turn it on
Allow MCP access
In the Monitor app go to Settings › AI access (MCP) and turn on Allow MCP access. It is off for every organization until someone with permission to change organization settings turns it on. An API key can never turn it on.
Add the server to your agent
Use the commands below. There is no key to copy.
Sign in and allow
The first time the agent connects, your browser opens VitalRix. Sign in, pick the organization and what the app may do, and choose Allow. In Claude Code, run
/mcpand choose Authenticate if the browser does not open by itself. Each approval creates an API key for you with no more than your own permissions, valid for 90 days, listed in Settings › API keys.
claude mcp add --transport http vitalrix https://api.vitalrix.com/api/v1/mcp{
"mcpServers": {
"vitalrix": {
"url": "https://api.vitalrix.com/api/v1/mcp"
}
}
}Clients without browser sign-in (CI, scripts) can use an API key instead: create one in Settings › AI access (MCP) and send it as a Bearer token.
claude mcp add --transport http vitalrix https://api.vitalrix.com/api/v1/mcp \
--header "Authorization: Bearer pk_YOUR_MCP_KEY"The server speaks MCP over HTTP (Streamable HTTP, one JSON response per request) and signs agents in with OAuth 2.1 (authorization code with PKCE, dynamic client registration), as the MCP specification describes. Then ask your agent, for example: "What incidents are open in VitalRix? Look at the logs and traces, find the cause in this repository and propose a fix."
Tools
| Tool | What it returns or does | Permission |
|---|---|---|
list_incidents | Incidents, newest first, open or resolved. | incident.read |
get_incident | One incident with its summary, timeline and comments. | incident.read |
list_monitors | Monitors with their state, last response time and status code. | monitor.read |
get_monitor | One monitor with uptime, response-time percentiles and downtime. | monitor.read |
list_firing_alerts | Alerts firing now. | alert.read |
search_logs | Log lines by text, service, level, environment or trace id, in a window up to 30 days or between two dates; page through all of them with the returned cursor. | log.read |
summarize_logs | An overview of all logs in a window: lines per service, level and environment, and the most common message patterns. | log.read |
list_traces | Recent traces, optionally failed or slow ones. | trace.read |
get_trace | One trace as spans, failing and slowest first. | trace.read |
list_errors | Error groups with their counts and status. | trace.read |
get_error | One error group with its latest stack traces, endpoint and release. | trace.read |
query_metric | A metric over a recent window, optionally split by a label. | metric.read |
list_deployments | Recent releases from telemetry or GitHub. | trace.read |
list_slos | SLOs with budget left and burn rates. | slo.read |
who_is_on_call | Who is on call now, per schedule. | oncall.read |
get_instrumentation | How to send APM traces, metrics, logs, infrastructure (server, Docker, Kubernetes pods) and real user monitoring from your code. Never includes a key. | - |
get_setup_template | Setup: the setup file format with an example of every section. | - |
plan_setup | Setup: preview a setup file (what would be created or changed). Changes nothing. | per object |
apply_setup | Setup, changes configuration: apply a previewed file, all or nothing. | per object |
acknowledge_incident | Changes data: mark a newly triggered incident as investigating, with an optional note. Never reopens a resolved incident. | incident.update |
resolve_incident | Changes data: resolve an incident with a resolution note. | incident.update, incident.resolve |
acknowledge_alert | Changes data: acknowledge a firing alert. | incident.update |
The incident and alert changes appear only when Allow changes to incidents and alerts is on and the key holds their permissions. The setup tools appear only when Allow setup through MCP is on; the setup service then checks each object against the key's permissions. There are no tools that delete anything, or that touch members, roles, API keys, billing, single sign-on or settings.
Set up a project
Allow setup
In Settings › AI access (MCP) turn on Allow setup through MCP and create a new MCP key (it then also gets the setup permissions).
Instrument the code
The agent calls
get_instrumentationfor APM, logs, infrastructure or real user monitoring and adds that code to your project. Code reads the ingest key from theVITALRIX_API_KEYenvironment variable: create that key yourself in Settings › API keys (for example withtrace.write,log.writeormetric.write) and put it in your.envor secret manager. Never paste it into the chat.Preview and apply the setup
The agent writes a setup file (monitors, alerts, SLIs, SLOs, SLAs, RUM sites with session replay, status pages, dashboards, on-call), shows you the
plan_setuppreview, and callsapply_setuponce you agree. Applying is all or nothing.
Security
- Off until an admin turns it on, and only a signed-in person can change that setting: an agent cannot give itself more access.
- Sign-in is OAuth 2.1 with PKCE: the app never sees your password, an approval code works once and only for the app and address it was issued to, and the key issued has at most your own permissions. Apps may only return to https addresses, this computer, or their own app scheme.
- API keys only on the MCP endpoint itself. Requests from browsers (with an Origin header) and signed-in sessions are refused.
- A key sees only the tools its permissions cover, and every call is checked again by the service that owns the data, exactly as in the app. A key can never hold permissions its creator lacks.
- Read-only by default. Incident changes and setup are two more switches; setup applies only a file the user previewed (same plan hash), never sections with secrets or about people and access.
- Ingest keys and other secrets never pass through MCP: instrumentation reads them from environment variables the user sets.
- Results are marked as untrusted data with a one-time marker, and the server tells the agent not to follow instructions found in them, so text planted in a log or an error cannot steer it.
- Secrets are always masked before results leave VitalRix (tokens, passwords, API keys, JWTs, cloud keys, private keys, card numbers, credentials in URLs). Email and IP addresses are partly masked unless you turn that off.
- Arguments are checked strictly (types, ranges, ids, allowed values); results are size-capped; each key is limited to 60 tool calls a minute.
- Every tool call is recorded in the audit log under its key. Revoke the key to cut access immediately.
Something unclear or missing? Open VitalRix and use the in-app setup guides, or read Troubleshooting.