OpsDeck MCP is a full-stack, AI-assisted incident response and production control plane built on the stateless 2026-07-28 Model Context Protocol (MCP) specification. It connects a streaming React operator console to live PostgreSQL operations data through a TypeScript MCP Host, a Go reverse-proxy gateway, and an OAuth 2.1–hardened Rust MCP server—with full end-to-end OpenTelemetry tracing into Jaeger.
- Stateless
2026-07-28Negotiation:apps/server-opsdisables stateful legacy sessions (with_legacy_session_mode(false)) and servesserver/discover, whileapps/host-apiauto-negotiatesmodern(2026-07-28) or falls back tolegacy(2025-11-25) for older community servers. - All 3 MCP Primitives: Exposes model-controlled Tools (with LLM-actionable
isError: truehints), application-controlled Resources & URI Templates (ops://services/{name},ops://incidents/{id},ops://runbooks/{slug}), and user-triggered/Prompts (triage_incident,postmortem_draft,release_readiness). - Human-in-the-Loop Elicitation (
InputRequiredResult):rollback_deploymentseals intent in an HMAC-SHA256requestStatetoken (300sTTL, bound to service + target version), renders a dynamic Tailwind form from the server's JSON Schema, and commits the PostgreSQL rollback transaction only after explicitAccept. - Cooperative Async Tasks (
io.modelcontextprotocol/tasks):run_diagnostic_probespawns a multi-stage background task supporting livetasks/getprogress updates and cooperativetasks/cancelaborts viatokio::select!. - Zero-Body Header Routing & Rate Limiting: Tool parameters annotated with
x-mcp-headeremitMcp-Method,Mcp-Name, andMcp-Param-Service, lettingapps/gatewayenforce allowlists, OAuth scopes, and Redis Lua token-bucket rate limits without parsing JSON-RPC bodies. - Live Wire & Distributed Trace Inspection: Streams real-time JSON-RPC
wire_frameevents in the browser console while propagating W3Ctraceparentheaders across TypeScript -> Go -> Rust -> Jaeger.
React Console (:5173, apps/web)
│ POST /api/chat (SSE) · POST /api/elicit/resume · POST /api/tasks/:id/cancel
▼
TypeScript MCP Host (:3001, apps/host-api)
│ Raw tool-calling loop · Multi-model router · <untrusted_mcp_data> fence · OTLP HTTP (:4318)
│ W3C traceparent + RFC 8707 Bearer JWT + Mcp-Method / Mcp-Name / Mcp-Param-Service
▼
Go MCP Gateway (:8090, apps/gateway)
│ Header allowlists · OAuth scope checks · Redis Lua token bucket (:6379) · OTLP gRPC (:4317)
▼
Rust MCP Server (:8080/mcp, apps/server-ops)
│ rmcp 3.11 + Axum + SQLx · HMAC requestState · Cooperative Tasks · RFC 9728/8707/CIMD
▼
PostgreSQL 17 (:5432) · Redis 7 (:6379) · OTel Collector (:4317/:4318) -> Jaeger (:16686)
- MCP Resource Server: Rust (2024 edition),
rmcp3.11.0, Axum 0.8, SQLx 0.8,jsonwebtoken11,opentelemetry-otlp0.31. - MCP Edge Gateway: Go 1.26,
go-redis/v9(atomic Lua token bucket),golang-jwt/v5, OpenTelemetry Go SDK. - MCP Host & Shared Contracts: Node.js 22+, TypeScript, Hono,
@modelcontextprotocol/clientv2.4.0, Zod v4. - Frontend Console: React 19, Vite 6, Tailwind CSS v4, TanStack Query v5, Lucide Icons.
- Infrastructure & Testing: PostgreSQL 17, Redis 7, OpenTelemetry Collector, Jaeger v2, Playwright.
| Threat | Defense in OpsDeck | Verification |
|---|---|---|
| Token Passthrough | server-ops & gateway enforce RFC 8707 aud matching the canonical resource URI; host-api discovers /.well-known/oauth-protected-resource and acquires its own resource-scoped token instead of forwarding browser headers. |
apps/server-ops/tests/security_oauth.rs |
| Confused Deputy | Least-privilege per-tool scopes (ops:read, ops:incident:write, ops:deploy:rollback) checked on headers in gateway and RequestContext in server-ops. |
security_oauth.rs, gateway_test.go |
| SSRF via CIMD URLs | validate_cimd_url requires https:// and blocks userinfo, localhost, .local/.internal, loopback (127.0.0.0/8, ::1), link-local (169.254.0.0/16, fe80::/10), and RFC1918/ULA ranges. |
security_oauth.rs |
| Prompt Injection | agent-loop.ts escapes and fences all MCP outputs inside <untrusted_mcp_data>, flags injection cues on trace_span, and rollback_deployment enforces human InputRequiredResult approval. |
apps/host-api/tests/agent-loop.test.ts |
| Burst / Tool Abuse (DoS) | Atomic Redis Lua token-bucket limiter keyed by client_id:Mcp-Method:Mcp-Name, returning HTTP 429 + Retry-After + X-RateLimit-Remaining. |
apps/gateway/redis_integration_test.go |
pnpm infra:up
pnpm install(Optional: export ANTHROPIC_API_KEY, OPENAI_API_KEY, or GEMINI_API_KEY before starting the stack to use a live LLM instead of the built-in Mock SRE router.)
Option A — Single command (recommended):
pnpm devscripts/opsdeck-dev.sh builds opsdeck-server-ops, starts server-ops -> gateway -> host-api -> web in dependency order with health checks, and stops all four on Ctrl-C.
Option B — Manual (4 terminals in order):
# Terminal 1: Rust MCP Resource Server (:8080/mcp)
cargo run -p opsdeck-server-ops
# Terminal 2: Go MCP Reverse-Proxy Gateway (:8090/mcp -> :8080/mcp)
(cd apps/gateway && go run .)
# Terminal 3: TypeScript MCP Host API (:3001 -> :8090/mcp)
pnpm --filter @opsdeck/host-api dev
# Terminal 4: React Operator Console (:5173)
pnpm --filter @opsdeck/web devOpen:
- OpsDeck UI:
http://localhost:5173 - Jaeger Traces:
http://localhost:16686(opsdeck-host-api->opsdeck-gateway->opsdeck-server-ops)
(The OTel Collector also exposes a Prometheus scrape endpoint at http://localhost:8889/metrics, which stays empty unless OTLP metrics or a collector span_metrics connector are enabled—currently the services emit traces only.)
- Rust (
server-opsprotocol, HTTP, MRTR, Tasks & OAuth security):cargo test -p opsdeck-server-ops cargo test -p opsdeck-server-ops -- --ignored # requires Postgres (`pnpm infra:up`)
- Go (
gatewayheader routing, OAuth scopes, W3C tracing & live Redis):(cd apps/gateway && go test -v ./...)
- TypeScript (
shared,host-api, andwebproduction build):pnpm typecheck pnpm --filter @opsdeck/host-api test pnpm --filter @opsdeck/web build
With the 4-service stack running (pnpm db:reset restores checkout-api to v2.14.3 if you rolled it back manually):
pnpm exec playwright install chromium
pnpm e2eapps/server-ops/- Rustrmcp3.11.0 MCP server (stdio+ stateless Axum HTTP), SQLx Postgres store, HMACrequestState, Tasks, and OAuth 2.1 verifier.apps/gateway/- Go 1.26 MCP reverse proxy with2026-07-28header allowlists, scope checks, Redis Lua rate limiting, and OTel tracing.apps/host-api/- TypeScript Hono MCP host running the raw LLM tool-calling loop, multi-model router, OAuth 2.1 client, and SSE event stream.apps/web/- React 19 + Tailwind v4 + TanStack Query split-pane console, dynamic Elicitation forms, Task controls, and wire/trace inspector.packages/shared/- Shared Zod v4 schemas and TypeScript contracts (protocol.ts) consumed byhost-apiandweb.db/migrations/- Idempotent PostgreSQL 17 schema and seed data (services,deployments,incidents,runbooks).infra/- OpenTelemetry Collector pipeline config (otel-collector.yaml) routing OTLP traces to Jaeger and OTLP metrics to:8889/metrics.scripts/- Development stack launcher (opsdeck-dev.sh) coordinating ordered startup and shutdown of all four services.docs/- UI and Jaeger distributed trace screenshots referenced in this README.tests/e2e/- Playwright end-to-end browser test suite (opsdeck.spec.ts).
This project is licensed under the MIT License — see the LICENSE file for details.


