MCP Server
Zharp runs a Model Context Protocol server, so an AI assistant like Claude or Cursor can read your monitors and incidents and answer questions about them.
What an assistant can do
The server is read-only: an assistant can look at one workspace's monitors and incidents, but never create, change, acknowledge or resolve anything. It has five tools:
| Tool | Returns |
|---|---|
get_status_overview | How many monitors are in each status, which monitors are down, and the open incidents. |
list_monitors | Monitors with their status, type, target and last check. Filters by status; up to 200 at a time (100 by default). |
get_monitor | One monitor: its settings, 24-hour and 7-day uptime, open incidents and its 10 most recent check results. |
list_incidents | Incidents, newest first, with status, root cause, affected monitor and timestamps. Filters by status; up to 50 (20 by default). |
get_incident | One incident: description, root cause, who acknowledged and resolved it, the AI post-mortem if there is one, and the full timeline. |
Things to ask once it's connected:
- “What's down in Zharp right now?”
- “Show me the timeline of the last incident on the Checkout API.”
- “What was the 7-day uptime of each of my API monitors?”
Endpoint
| Setting | Value |
|---|---|
| Endpoint | https://api.zharp.io/api/v1/mcp |
| Transport | Streamable HTTP, stateless — every request is a POST |
| Auth header | Authorization: Bearer zh_mcp_… |
Get a token
Each assistant gets its own token, so you can cut one off without touching the others. Only the workspace owner can add clients.
- 1Open MCP
Go to Integrations & API → MCP. The page shows the endpoint and the clients that already have tokens.
- 2Add a client
Click Add client, name it after the assistant (for example “Claude Desktop”), and click Add client.
- 3Copy the token
The token, starting with
zh_mcp_, is shown once. Pick your assistant — Claude Code, Claude Desktop, Cursor or VS Code — and copy its snippet, with the token already filled in, before you click Done. The snippets are the ones below.
The client names itself the first time it connects, and its row under Connected clients shows when it was last used. Open a client to see its recent requests, restrict it to certain IP addresses under Allowed IPs, Roll key or Revoke it.
Connect your assistant
Replace zh_mcp_YOUR_TOKEN with your token in each snippet.
claude mcp add --transport http zharp https://api.zharp.io/api/v1/mcp \ --header "Authorization: Bearer zh_mcp_YOUR_TOKEN"
{
"mcpServers": {
"zharp": {
"url": "https://api.zharp.io/api/v1/mcp",
"headers": {
"Authorization": "Bearer zh_mcp_YOUR_TOKEN"
}
}
}
}Claude Desktop starts local servers from its config file, so it reaches Zharp through the mcp-remote bridge (it needs Node.js). Open Settings → Developer → Edit Config and add:
{
"mcpServers": {
"zharp": {
"command": "npx",
"args": [
"-y",
"mcp-remote",
"https://api.zharp.io/api/v1/mcp",
"--header",
"Authorization:${ZHARP_AUTH}"
],
"env": {
"ZHARP_AUTH": "Bearer zh_mcp_YOUR_TOKEN"
}
}
}
}Restart Claude Desktop afterwards. Don't paste a url and headers entry into claude_desktop_config.json: Claude Desktop doesn't read remote servers from that file. The token sits in env because some systems split an argument at the space in Bearer ….
{
"servers": {
"zharp": {
"type": "http",
"url": "https://api.zharp.io/api/v1/mcp",
"headers": {
"Authorization": "Bearer zh_mcp_YOUR_TOKEN"
}
}
}
}Check the connection
Ask the server for its tools directly. A working token gets back the five tools listed above:
curl -X POST https://api.zharp.io/api/v1/mcp \
-H "Authorization: Bearer zh_mcp_YOUR_TOKEN" \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'| Response | Meaning |
|---|---|
| 401 | No token, or the token is invalid, revoked, disabled or expired — or it's a REST key without the read scope. |
| 403 | The token has an IP allow-list and this address isn't on it. |
| 405 | A GET or DELETE. The server is stateless; send POST. |
| 429 | More than 1,000 requests in a minute on this token. |