Documentation
API keys
An API key gives a program read access to the project's data: alerts and rules. A key belongs to one project. A key can't change anything in the project.
On this page
The key works only with the SmartAlert MCP server: with a key an AI assistant sees your project's data, without one only the open tools. The REST API doesn't accept keys.
Who can use them
| Plan | Business and Enterprise. The trial doesn't include keys |
|---|---|
| Role | A project member who can change settings. With view-only access, keys are hidden |
| How many | Up to 10 active keys per project, on any plan |
If the project leaves Business, its keys stop working: a request with a key gets "API keys are on Business and above". You can revoke them on any plan.
Create a key
- Open Settings → API keys.
- Click Create key and name it after where it will run, for example "Grafana" or "Report script". 1 to 60 characters.
- Copy the key and store it right away.
The key is shown once. SmartAlert keeps only its hash, so nobody can show it again. Lost a key? Revoke it and create a new one.
The list shows the key as its start and last 4 characters, for example sa_live_…ab12, and the time of its last request to the minute.
Send the key
A key starts with sa_live_. Secret scanners recognise it by that prefix if a key ends up in a repository by mistake.
Send the key in the Authorization header:
Authorization: Bearer sa_live_…A key in the URL, the request body or a cookie is not accepted.
Keep the key like a password: in a secret manager or an environment variable, not in code.
Revoke a key
Settings → API keys, Revoke next to the key, then confirm. The key stops working at once and leaves the list. A revoked key can't be restored.
Connect to Claude / Cursor
SmartAlert MCP server: https://mcp.smart-alert.io/mcp. A ready config with your key is in Settings → API keys, the "Connect to Claude / Cursor" block.
Claude Code, file .mcp.json:
{
"mcpServers": {
"smartalert": {
"type": "http",
"url": "https://mcp.smart-alert.io/mcp",
"headers": { "Authorization": "Bearer sa_live_…" }
}
}
}Cursor, file ~/.cursor/mcp.json — the same without the "type" line. Without headers only the open tools work.
Tools
All tools only read.
| Tool | Key | What it returns |
|---|---|---|
find_contract | not needed | Public catalogue contracts by address or name, up to 10 |
contract_activity | not needed | A catalogue contract's activity: totals per event, overall and for 24 hours |
project_status | not needed | A published status page: contracts, their state and incidents |
list_alerts | needed | The project's alerts for a period, 7 days by default, up to 100 per request |
explain_alert | needed | Why it fired: the value against the threshold or norm, the rule, the contract, whether it resolved |
list_rules | needed | The project's rules and their noise: how often they fired, how many were false. A metric rule has its metric id |
metric_series | needed | A project metric's series over a period: 7 days by default, up to 200 points. Function count, sum, avg, min or max, split by a label |
find_contractcontract_activityproject_statuslist_alertsexplain_alertlist_rulesmetric_seriescount, sum, avg, min or max, split by a labelA key of a project below Business doesn't open the private tools: the assistant gets "API keys work on the Business plan and above".
Limits
| Without a key | 60 requests a minute per IP |
|---|---|
| With a key | 120 requests a minute per key |
Over the limit — 429 with a Retry-After header: how many seconds to wait.
Errors
| Response | Meaning |
|---|---|
401 | An unknown or revoked key |
429 RATE_LIMITED | Too many MCP requests. Retry after Retry-After seconds |
403 PLAN_REQUIRED | The project's plan is below Business |
429 LIMIT_EXCEEDED | On create: the project already has 10 keys. Revoke one you don't need |
401429 RATE_LIMITEDRetry-After seconds403 PLAN_REQUIRED429 LIMIT_EXCEEDEDFound a mistake or didn’t find an answer? Write to us