Skip to content

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

  1. 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.

  2. Add the server to your agent

    Use the commands below. There is no key to copy.

  3. 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 /mcp and 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 Code
claude mcp add --transport http vitalrix https://api.vitalrix.com/api/v1/mcp
Cursor (.cursor/mcp.json) and other clients
{
  "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.

With an API key
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

MCP tools and the permission each needs
ToolWhat it returns or doesPermission
list_incidentsIncidents, newest first, open or resolved.incident.read
get_incidentOne incident with its summary, timeline and comments.incident.read
list_monitorsMonitors with their state, last response time and status code.monitor.read
get_monitorOne monitor with uptime, response-time percentiles and downtime.monitor.read
list_firing_alertsAlerts firing now.alert.read
search_logsLog 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_logsAn overview of all logs in a window: lines per service, level and environment, and the most common message patterns.log.read
list_tracesRecent traces, optionally failed or slow ones.trace.read
get_traceOne trace as spans, failing and slowest first.trace.read
list_errorsError groups with their counts and status.trace.read
get_errorOne error group with its latest stack traces, endpoint and release.trace.read
query_metricA metric over a recent window, optionally split by a label.metric.read
list_deploymentsRecent releases from telemetry or GitHub.trace.read
list_slosSLOs with budget left and burn rates.slo.read
who_is_on_callWho is on call now, per schedule.oncall.read
get_instrumentationHow to send APM traces, metrics, logs, infrastructure (server, Docker, Kubernetes pods) and real user monitoring from your code. Never includes a key.-
get_setup_templateSetup: the setup file format with an example of every section.-
plan_setupSetup: preview a setup file (what would be created or changed). Changes nothing.per object
apply_setupSetup, changes configuration: apply a previewed file, all or nothing.per object
acknowledge_incidentChanges data: mark a newly triggered incident as investigating, with an optional note. Never reopens a resolved incident.incident.update
resolve_incidentChanges data: resolve an incident with a resolution note.incident.update, incident.resolve
acknowledge_alertChanges 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

  1. 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).

  2. Instrument the code

    The agent calls get_instrumentation for APM, logs, infrastructure or real user monitoring and adds that code to your project. Code reads the ingest key from the VITALRIX_API_KEY environment variable: create that key yourself in Settings › API keys (for example with trace.write, log.write or metric.write) and put it in your .env or secret manager. Never paste it into the chat.

  3. 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_setup preview, and calls apply_setup once 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.