Sentinel

mcp-sentinel analytics and gateway plane.

mcp-sentinel is the companion repo and bundled install path for analytics, gateway, proxy, and observability services around MCP servers. It is broader than a dashboard and broader than a single proxy.

Services

mcp-proxy

Transparent sidecar that extracts identity, evaluates tool-level policy, emits allow or deny audit events, and forwards traffic upstream to the MCP server.

ingest

Receives POST /events, validates API keys or optional JWTs, and writes events to Kafka.

processor

Consumes Kafka, batches events, and writes them into ClickHouse with indexed audit fields for filtering.

api

Exposes /api/events, /api/stats, /api/sources, /api/event-types, and filtered event queries.

ui

Shows total events, latest source, last event, limit controls, auto refresh, and the event stream table against the API.

gateway

Kubernetes gateway deployment that fronts the sentinel API, ingest, and UI surfaces.

reference mcp-server

The repo also includes a small example MCP server so sidecar, ingest, and smoke-test flows can be exercised end to end.

Event path

01. Proxy evaluates the request

The sidecar reads identity headers, loads policy data, checks trust, and decides allow or deny at tool-call time.

02. Ingest receives the event

The event is sent to /events on the ingest service and written into the Kafka topic mcp.events.

03. Processor batches to ClickHouse

The processor reads Kafka, batches messages, and writes them to the ClickHouse-backed event table.

04. API exposes query surfaces

The API returns recent events, stats, sources, event types, and filtered audit views over the stored event stream.

05. UI and dashboards consume the data

The UI shows the stream directly, while Grafana, Prometheus, Tempo, Loki, and Promtail cover the broader observability path.

Storage and observability

ClickHouse

Stores the event stream with materialized fields for server, namespace, cluster, human, agent, session, decision, and tool name.

Kafka and Zookeeper

Back the ingestion pipeline so events can be buffered before the processor writes them to ClickHouse.

Prometheus and Grafana

The manifests include scrape configuration and a Grafana deployment so service metrics are part of the out-of-box story.

OTel, Tempo, Loki, Promtail

Trace and log plumbing are part of the same install path so the stack goes beyond one audit table.

Auth and APIs

The API and ingest services support both simple API keys and optional OIDC JWT validation.

POST /events
GET /api/events?limit=100
GET /api/stats
GET /api/sources
GET /api/event-types
GET /api/events/filter?server=payments&decision=deny&agent_id=ops-agent&limit=50
GET /health
GET /metrics

Included manifests

Core app manifests

00-namespace, 01-config, 02-secrets, 03-clickhouse, 04-clickhouse-init, 05-kafka, 06-ingest, 07-processor, 08-api, 09-ui, and 10-gateway.

Observability manifests

11-prometheus, 12-grafana, 15-otel-collector, 16-tempo, 17-loki, 18-promtail, and 19-grafana-datasources.

Example MCP wiring

13-mcp-example, 14-mcp-proxy-sidecar, and the example README show how an in-cluster MCP server emits analytics events through sentinel.

Runtime integration

mcp-runtime setup builds the sentinel images and deploys this stack by default. Use --without-sentinel to skip it.

Compatibility and naming

Sentinel is the repo name now

Docs, manifests, images, namespace defaults, and runtime integration now use mcp-sentinel rather than the older analytics-only naming.

Compatibility aliases remain

The runtime and sample MCP wiring still accept older MCP_ANALYTICS_* environment names so existing ingest configuration does not break during the rename.

Companion plane, not an addon afterthought

First-class part of the product

Sentinel is where analytics, gateway behavior, and lightweight policy-enforcement services live around MCP servers. That is why the website and docs now treat it as a first-class part of the product instead of a side note.