The Olly MCP (Model Context Protocol) server gives AI assistants — Claude, Cursor, and any other MCP-compatible client — direct programmatic access to Olly's infrastructure. Instead of copy-pasting API responses or reading logs manually, the assistant can query services, inspect traces, run database counts, and manage users directly through structured tool calls.
For local development, swap the URL to http://localhost:3100/mcp. The Tilt dev environment auto-reloads the server when source files in mcp/server/src/ change.
Check health of one or all Olly services (claims, eligibility, enrollment, billing, provider, notifications, policy-admin, triage, care, consent, document-service, member-portal-api, group-scheme-service, broker-api). Omit the service argument to check all 14 at once.
AI Client (Claude / Cursor) │ HTTP POST (StreamableHTTP) ▼https://mcp.olly.theflywheel.in/mcp │ ▼ MCP Server (Node 22, TypeScript) @modelcontextprotocol/sdk Fresh McpServer per request (stateless) │ ├── health.ts → /healthz on each service ├── domain.ts → internal service HTTP APIs ├── k8s.ts → kubectl (EKS) ├── traces.ts → Grafana Tempo + Loki + Alertmanager ├── aurora.ts → Aurora PostgreSQL (read-only) + ElastiCache └── users.ts → Keycloak Admin API
The server uses the StreamableHTTP transport from @modelcontextprotocol/sdk. Each incoming request creates a new McpServer, registers all tools, handles the request, and is discarded. This means the server scales horizontally without any shared state.
In the Tilt dev environment the server is rebuilt and restarted automatically whenever any file under mcp/server/src/ changes.
Pick or create the right file — tool files live under mcp/server/src/tools/:
services/health.ts — service health
services/domain.ts — service domain operations
infra/k8s.ts — Kubernetes / infrastructure
observability/traces.ts — Tempo, Loki, Grafana
data/aurora.ts — database and cache
auth_tools/users.ts — Keycloak / users
Register the tool — call server.tool(name, description, schema, handler) inside the file's register*Tools(server) function using Zod for input validation.
Wire it up — if you created a new file, import its register*Tools function in mcp/server/src/index.ts and call it with the app instance.
Test locally — Tilt will hot-reload the server. Connect your MCP client to http://localhost:3100/mcp and invoke the new tool.