MCP server
DisruptAPI runs a remote Model Context Protocol (MCP) server at /mcp. It gives AI assistants and agents 14 tools that call the same code as the REST API, with the same data, errors and plan limits. Connect it with your normal API key.
What does it speak?#
- Transport: MCP Streamable HTTP, stateless. Every message is a
POSTtohttps://app.disruptapi.com/mcpand gets a plain JSON response. There is no server-sent event stream and no session id, soGETandDELETEreturn 405, which the specification allows. - Protocol versions:
2025-06-18,2025-03-26and2024-11-05. If the client asks for another version, the server answers with2025-06-18. - Capabilities: tools only.
resources/list,resources/templates/listandprompts/listreturn empty lists. The server sends no notifications. - Auth: your API key as
Authorization: Bearer dk_live_...orX-API-Key. There is no OAuth flow. - Batches: JSON-RPC batches of up to 20 messages.
Connect a client#
Keep the key in an environment variable (DISRUPT_KEY below) rather than in a config file you might commit or share.
claude mcp add --transport http disrupt https://app.disruptapi.com/mcp \
--header "Authorization: Bearer $DISRUPT_KEY"// ~/.cursor/mcp.json (or .cursor/mcp.json in a project)
{
"mcpServers": {
"disrupt": {
"url": "https://app.disruptapi.com/mcp",
"headers": { "Authorization": "Bearer ${env:DISRUPT_KEY}" }
}
}
}// .vscode/mcp.json
{
"servers": {
"disrupt": {
"type": "http",
"url": "https://app.disruptapi.com/mcp",
"headers": { "Authorization": "Bearer ${env:DISRUPT_KEY}" }
}
}
}// claude_desktop_config.json, through the mcp-remote bridge (needs Node.js)
{
"mcpServers": {
"disrupt": {
"command": "npx",
"args": ["-y", "mcp-remote", "https://app.disruptapi.com/mcp",
"--header", "Authorization:${DISRUPT_AUTH}"],
"env": { "DISRUPT_AUTH": "Bearer dk_live_..." }
}
}
}# pip install "mcp>=1.8"
import asyncio
import os
from mcp import ClientSession
from mcp.client.streamable_http import streamablehttp_client
async def main() -> None:
headers = {"Authorization": f"Bearer {os.environ['DISRUPT_KEY']}"}
async with streamablehttp_client("https://app.disruptapi.com/mcp", headers=headers) as (read, write, _):
async with ClientSession(read, write) as session:
await session.initialize()
tools = await session.list_tools()
print([t.name for t in tools.tools])
result = await session.call_tool("list_signals", {"min_severity": "severe", "limit": 5})
print(result.structuredContent or result.content[0].text)
asyncio.run(main())Other clients work if they support Streamable HTTP with a custom Authorization header. For clients that only launch local (stdio) servers, use the mcp-remote bridge as in the Claude Desktop example. To check the server by hand:
# initialize
curl https://app.disruptapi.com/mcp \
-H "Authorization: Bearer $DISRUPT_KEY" \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-d '{"jsonrpc": "2.0", "id": 1, "method": "initialize",
"params": {"protocolVersion": "2025-06-18", "capabilities": {},
"clientInfo": {"name": "curl", "version": "1"}}}'
# call a tool
curl https://app.disruptapi.com/mcp \
-H "Authorization: Bearer $DISRUPT_KEY" \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-d '{"jsonrpc": "2.0", "id": 2, "method": "tools/call",
"params": {"name": "check_exposure",
"arguments": {"items": [{"id": "hub-SEA", "kind": "place", "airport": "SEA"}]}}}'Which tools are there?#
Each tool's JSON Schema comes from tools/list; item fields are the same as in exposure checks. Read-only tools are annotated readOnlyHint: true; the three watchlist write tools are not, and remove_watchlist_item is marked destructive.
| Tool | Inputs | Returns the same as |
|---|---|---|
check_exposure | items (required, 1 to 500 items), min_severity (default moderate) | Same as POST /v1/exposure/check |
list_signals | type (array of types), min_severity, country, airport, provider, since, status (active, resolved, all), limit (1 to 100, default 20), offset | GET /v1/signals |
get_signal | signal_id (required) | GET /v1/signals/{id}, with the impact forecast |
get_forecast | failure_layer (required), provider | GET /v1/forecast |
get_airport | iata (required) | GET /v1/airports/{iata} |
get_carrier | code (required, IATA airline code) | GET /v1/carriers/{code} |
list_providers | none | GET /v1/providers |
list_events | provider, failure_layer, anchor_only, limit (1 to 100, default 20) | GET /v1/events (first page only) |
list_watchlists | none | GET /v1/watchlists |
get_watchlist | watchlist_id (required), limit (1 to 1,000, default 100) | GET /v1/watchlists/{id} |
get_watchlist_exposure | watchlist_id (required), min_severity (default moderate) | GET /v1/watchlists/{id}/exposure |
create_watchlist | name (required), description, items (up to 1,000) | POST /v1/watchlists |
add_watchlist_items | watchlist_id, items (both required, 1 to 1,000 items) | POST /v1/watchlists/{id}/items |
remove_watchlist_item | watchlist_id, item_id (both required) | DELETE /v1/watchlists/{id}/items/{item_id} |
The server also sends instructions on initialize, telling the assistant to use check_exposure for "is this affected?" questions, to mention n and low_confidence when it reports a forecast, and that DisruptAPI does not report individual flight status.
What does a tool return?#
A successful call returns the REST response body twice: as compact JSON text in content[0].text, and as an object in structuredContent. Errors that the assistant can act on (bad input, unknown ids, plan limits, rate limits) come back as a normal result with isError: true and the message as text, so the model can read it and try again.
{
"jsonrpc": "2.0",
"id": 2,
"result": {
"content": [
{
"type": "text",
"text": "{\"data\":[{\"item_id\":\"hub-SEA\",\"trip_id\":\"hub-SEA\",\"kind\":\"place\",\"risk_level\":\"high\",\"match_count\":1,\"matches\":[...]}]}"
}
],
"isError": false,
"structuredContent": {
"data": [
{
"item_id": "hub-SEA",
"trip_id": "hub-SEA",
"kind": "place",
"risk_level": "high",
"match_count": 1,
"matches": ["..."]
}
]
}
}
}{
"jsonrpc": "2.0",
"id": 3,
"result": {
"content": [{ "type": "text", "text": "no watchlist with this id" }],
"isError": true
}
}Limits and billing#
- Each
tools/callcounts as one request against your per-minute rate limit and monthly quota, and appears inGET /v1/usageasMCP <tool name>. - An HTTP request without any
tools/call(for exampleinitialize,tools/listorping) is also counted once against the rate limit and quota, so a client that reconnects often uses a little quota. list_signalsandlist_eventscount their rows against the daily record budget, like the REST list endpoints.limitis capped at 100, or your plan's page size if smaller (Sandbox: 50); larger values are lowered, not refused.check_exposureandget_watchlist_exposureneed exposure checks in your plan, which every current plan includes.
Protocol errors#
| HTTP | JSON-RPC code | Cause |
|---|---|---|
| 401 | -32001 | Missing, unknown or revoked API key. The response has a WWW-Authenticate: Bearer header. |
| 400 | -32700 | The body is not JSON. |
| 400 | -32600 | Not a JSON-RPC 2.0 message, an empty batch, or more than 20 messages in a batch. |
| 200 | -32601 | Unknown method. |
| 200 | -32602 | Unknown tool name in tools/call. |
| 429 | -32000 | Rate limit or quota reached on a request with no tools/call in it. |
| 405 | none | GET or DELETE on /mcp. The server is stateless and has no event stream; the header Allow: POST is set. |
Notifications (messages without an id) get 202 Accepted with an empty body.
Last updated 2026-11-18. Questions or a mistake on this page? Contact us.