The Model Context Protocol (MCP) lets AI assistants — Claude Desktop, Cursor, or any MCP-compatible client — read and manage your Stector monitoring setup using natural language, instead of you writing REST calls by hand.
Stector's MCP server exposes a set of tools — one for each thing you can do through the REST API: listing monitors, creating an incident, resolving one, and so on. When you ask your AI assistant something like "pause the checkout monitor," it calls the matching tool, which runs the same operation the REST API would.
The MCP server isn't a separate service with its own data access — it's mounted inside the same Fastify service as the REST API, and every tool call runs through the same service-layer code the corresponding REST endpoint uses. That means:
The MCP server uses Streamable HTTP, mounted at a single endpoint: POST /mcp. It runs in stateless mode — there's no session to establish first, and every tool call is a self-contained request that returns a complete JSON response. There's no separate GET or DELETE on this endpoint, and no long-lived connection to manage.
Every request to /mcp needs these headers:
Content-Type: application/jsonAccept: application/json, text/event-streamAuthorization: Bearer stc_...The Accept header must list text/event-stream even though Stector's MCP server only ever returns plain JSON responses — the SDK validates that this value is present before it will process the request, regardless of which response format actually comes back.