MCP server for AI agents
Let an agent ask a person before it does something irreversible, and see who is on call.
@treason/mcp is a Model Context Protocol server. Any MCP client (Claude, Cursor, your own agent) can then ask a human to approve an action before taking it, page someone, and look at on-call, with treason.app's delivery guarantee behind each call: the person is reached by push, text and phone call, with escalation and carrier failover.
#Set it up
Create an alert API key (Integrations → API keys). Not an admin key: see "What an agent cannot do" below.
{
"mcpServers": {
"treason": {
"command": "npx",
"args": ["-y", "@treason/mcp"],
"env": { "TREASON_API_KEY": "trk_...", "TREASON_API_URL": "https://api.treason.app" }
}
}
}Add "--read-only" to args for an agent that should look but never page anyone.
#Tools
| Tool | Does |
|---|---|
request_approval | Ask a person to approve something before doing it. Blocks up to wait_seconds (default 50) for the answer. Pass alert_id when it is about an alert you are working on. |
check_approval | The current state of an approval: still_waiting, approved, denied, expired, cancelled. |
page_human | Raise an alert and page whoever is on call, for things a person must look at. |
who_is_on_call | The person on call for a team, now or at a time. |
list_alerts, get_alert | Read alerts, their timeline, and why each person was paged. |
check_readiness | Whether whoever is on call can be reached, plus coverage gaps (needs a read key). |
add_alert_note | Leave a note on an alert's timeline. |
#How an agent should use request_approval
The tool result is built to be hard to misread. approved: true is the only thing the agent may act on:
{ "approved": false, "status": "still_waiting", "approval_id": "…", "message": "A person has been paged and has not answered yet. Do NOT proceed. Call check_approval with this approval_id later." }Clients time tool calls out, so the call returns still_waiting rather than blocking for an hour; the agent checks again with check_approval. A denial, a timeout or a cancellation all say do not proceed. The server's instructions tell the model the same.
#What an agent cannot do
There is no tool to approve, acknowledge or close anything. Those are a person's decisions. And the API enforces it independently of the tool list: deciding an approval needs an admin key, so an agent holding an alert key is refused even if it calls the HTTP API directly. A compromised or misled agent can ask; it cannot answer for the human.
Scopes are not a ladder: an alert key creates alerts and approvals and reads alerts and on-call; a read key reads everything and changes nothing.
#Without MCP
The same thing from code is treason.approvals.ask({ title, context }) (Approvals), and examples/agent-approval wraps any tool function with it.