#6618·keep

[➕ Feature]: Official MCP (Model Context Protocol) server for Keep

Author: harisrujancCreated Jul 6, 2026Updated Sep 28, 2026
LabelsEnhancement

Is your feature request related to a problem? Please describe.

There is no MCP server for Keep today. I checked the org, the repo, its open/closed issues and PRs, and the wider ecosystem — the existing keep-mcp / keepa-mcp / keeper-mcp / keepit-mcp projects on GitHub are all unrelated products (Google Keep notes, Amazon Keepa, Keeper password manager, Keepit SaaS backup). This means LLM-based tools (Claude Desktop, Copilot CLI, Cursor, agent frameworks) can't natively talk to a Keep deployment. Users who want an AI copilot on top of their alerts have to hand-roll REST wrappers.

Describe the solution you'd like

An MCP server shipped as an independent sidecar container alongside keep-backend / keep-frontend (same pattern as keep-websocket-server), in a new in-tree keep-mcp/ package. Thin adapter over the Keep REST API — all auth/RBAC/tenancy stay in keep-backend. Two transports: stdio (local desktop clients) and streamable-HTTP (remote, OAuth 2.1 later).

Short analysis (5 points):

  1. Greenfield. No existing MCP for keephq/keep anywhere; confirmed by repo/org/issue/PR/code search.
  2. Sidecar, not embedded. Keeps the backend image lean, lets MCP evolve on its own cadence, and matches the existing sidecar convention (keep-websocket-server).
  3. Thin adapter over REST. MCP holds no secrets and no tenancy state — it just forwards X-API-KEY to keep-backend, so Keep remains the single source of truth for authZ.
  4. Two tool layers. Layer A = Keep-native (alerts, incidents, workflows, topology). Layer B = LGTM passthrough (Loki, Mimir, Tempo, Grafana) via Keep's existing provider abstraction — no duplicated credentials.
  5. Staged rollout. v0.1 read-only (search_alerts, list_incidents, get_incident_with_alerts, get_topology); v0.2 LGTM passthrough + a triage_alert MCP prompt; v0.3 gated mutating tools (enrich_alert, create_incident, run_workflow) with idempotency + dry-run + audit.

How it can be used

Once the MCP server is running, an SRE can point Claude Desktop / Copilot CLI / Cursor at it and drive Keep in natural language. The obvious flow is triage: "what's firing right now?" → the agent calls list_incidents(status=["firing","acknowledged"]), picks the noisiest incident, calls get_incident_with_alerts to see the linked alerts, then (v0.2) chains into mimir_query_range for surrounding metrics, loki_query_range for the last 5 minutes of logs on the affected service, and tempo_search_traces for a matching trace — all through one MCP connection, with the same RBAC the human user would have. Longer term the same server powers agent frameworks doing follow-the-sun on-call summarisation, weekly noise reports over the alert corpus, and (behind a feature flag in v0.3) closed-loop enrichment where the agent adds context back to an alert with a full audit trail.

Describe alternatives you've considered

  • Embed MCP in keep-backend. Rejected — bloats the API image, couples MCP SDK upgrades to backend releases, and complicates the startup budget.
  • Separate repo keephq/keep-mcp. Cleaner versioning but loses shared Pydantic models and doubles CI. Prefer in-tree.
  • Per-provider REST endpoints instead of a generic /providers/{id}/invoke/{method}. Safer but N× the work; a strict per-provider method allowlist gives similar safety with much less code.

Additional context

I have a working v0.1 walking skeleton on a local branch: keep-mcp/ package (config, httpx client, FastMCP server with 4 tools + 3 resources + /healthz + /readyz), docker/Dockerfile.mcp (Alpine 3.13, non-root, mirrors Dockerfile.api), and a keep-mcp service in docker-compose.yml behind an opt-in mcp profile. Unit tests pass; initialize handshake verified against the streamable-HTTP transport. Happy to open a PR if maintainers are interested in this direction.