Skip to content

MCP Server

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.

Connection

EnvironmentEndpoint
Productionhttps://mcp.olly.theflywheel.in/mcp
Local (Tilt)http://localhost:3100/mcp

The server is stateless: each HTTP request gets a fresh McpServer instance. There is no session state between calls.

Claude Code Configuration

Add the following to your claude_mcp_config.json (or the MCP config block in Claude Desktop / Claude Code settings):

json
{
  "mcpServers": {
    "olly": {
      "type": "http",
      "url": "https://mcp.olly.theflywheel.in/mcp"
    }
  }
}

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.

Available Tools

Service Health

ToolDescription
health_checkCheck 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.

Domain Operations

These tools call the running Olly microservices directly over their internal HTTP APIs.

Claims

ToolDescription
claims_listList claims with optional filters: status, memberPartyId, policyId
claims_getGet a claim by locator (e.g. CLM-2026-000001)
claims_submitSubmit a new insurance claim
prior_auth_submitSubmit a prior authorization request
prior_auth_listList prior authorization requests
prior_auth_reviewMove a prior authorization to PENDING_REVIEW status
prior_auth_decideApprove or deny a prior authorization

Eligibility

ToolDescription
eligibility_checkCheck eligibility for a member on a service date
member_coverage_listList coverage records for a member party locator
member_accumulators_getGet accumulators (deductibles, out-of-pocket) for a member

Enrollment

ToolDescription
quote_createCreate a new insurance quote
quote_getGet a quote by locator
quote_bindIssue (bind) a quote to create a policy
policy_getGet a policy by locator
policy_listList policies, filtered by accountId or brokerLocator

Billing

ToolDescription
invoice_listList invoices with optional filters: account_id, status
invoice_getGet an invoice by locator
payment_recordRecord a payment against an invoice
ledger_getGet ledger entries for an account or policy

Provider

ToolDescription
provider_searchSearch providers by specialty or network status
provider_getGet a provider by locator
credentialing_submitSubmit a credentialing application for a provider

Notifications

ToolDescription
notification_preferences_getGet notification preferences for a party
notification_preferences_updateUpdate notification channel and opt-out settings for a party

Policy Admin

ToolDescription
product_listList insurance products, filtered by status
product_getGet a product by locator
party_getGet a party (individual or organization) by locator
party_listList parties with optional type and search filters
ruleset_listList rulesets for a product version

Triage

ToolDescription
triage_startStart a triage session for a member (requires consent)
triage_respondRespond to a triage question to advance the session
triage_getGet a triage session by locator

Care

ToolDescription
care_episode_createCreate a care episode for a member
care_episode_getGet a care episode by locator
care_appointment_bookBook an appointment within a care episode
care_appointments_listList appointments for a care episode

Group Schemes

ToolDescription
scheme_createCreate an employer group scheme
scheme_getGet a group scheme by locator
scheme_listList group schemes, optionally filtered by employer
scheme_members_listList members of a group scheme

Broker

ToolDescription
broker_portfolio_getGet the broker's portfolio of policies (requires broker JWT)
broker_commissions_listList broker commissions (requires broker JWT)
broker_authority_getGet the delegated authority configuration for a broker
ToolDescription
consent_getGet consent records for a party
consent_recordRecord or update a consent decision for a party

Documents & Member Portal

ToolDescription
document_getGet a document by locator (returns PDF metadata or content URL)
member_coverage_getGet the authenticated member's active coverage summary (requires member JWT)
member_claims_listGet the authenticated member's claims (requires member JWT)

Infra / Kubernetes

ToolDescription
list_podsList Kubernetes pods in a namespace (default: services)
get_nodesList all EKS cluster nodes with instance type and ready status
kafka_lagGet Kafka consumer group lag for Olly topics; omit group to list all groups

Observability / Traces

ToolDescription
trace_getRetrieve a specific trace by ID from Grafana Tempo
trace_searchSearch traces in Grafana Tempo by service name, minimum duration, or tag
logs_queryQuery Grafana Loki for logs from a service with an optional LogQL filter
alerts_listList active Grafana alerts (default: firing)

Data / Aurora

ToolDescription
db_countsGet live row counts for all tables in a service schema (read-only)
cache_statsGet ElastiCache Valkey memory and key statistics

Auth / Users

ToolDescription
user_searchSearch for users in a Keycloak realm (olly-members, olly-providers, olly-internal)
user_rolesGet roles assigned to a user in a Keycloak realm

Architecture

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.

Adding New Tools

  1. 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
  2. Register the tool — call server.tool(name, description, schema, handler) inside the file's register*Tools(server) function using Zod for input validation.

  3. 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.

  4. Test locally — Tilt will hot-reload the server. Connect your MCP client to http://localhost:3100/mcp and invoke the new tool.

Olly Health Insurance Platform