Skip to main content
The MCP Server (apps/mcp, oi-sys-mcp) is a Cloudflare Worker that exposes OpenInsure’s data and operations as Model Context Protocol (MCP) tools. It bridges Claude and other LLM clients directly to live insurance data — policies, claims, submissions, ratings, and more.
Note: The MCP server enforces the same JWT authorization as the API. All tool calls require a valid Authorization: Bearer <token> header with an appropriate role. The system role is recommended for AI agent integrations.

Endpoint

EnvironmentURL
Productionhttps://mcp.openinsure.dev/mcp
Local devhttp://localhost:8788/mcp

Architecture

LLM Client (Claude Desktop / Claude.ai)
  └─► MCP Server (oi-sys-mcp)
        └─► @openinsure/agents
              └─► API Worker (oi-sys-api)
                    └─► PlanetScale (Hyperdrive)
The MCP server is a thin adapter. All business logic lives in @openinsure/agents — the MCP layer only handles protocol negotiation (tool listing, call dispatch, streaming) and passes through to the agent framework.

Available Tools

Submissions

ToolDescription
list_submissionsList submissions with optional status filter (new, quoted, bound, declined)
get_submissionFull submission detail by ID
create_submissionCreate a new submission from structured ACORD data
analyze_submissionAI risk analysis — appetite score, referral reasons, suggested premium
rate_submissionRun the rating engine against a submission and return premium breakdown

Policies

ToolDescription
list_policiesList active policies with optional program/producer filter
get_policyPolicy detail including coverages, endorsements, and billing status
get_policy_documentsList generated documents for a policy (dec page, binder, jacket)

Claims

ToolDescription
list_claimsList claims with status, reserve, and adjuster filters
get_claimFull claim detail including reserve history and payments
get_claim_statusCurrent claim status and pending actions
file_fnolSubmit a First Notice of Loss for an existing policy
update_reserveUpdate loss reserve with reason code

Producers

ToolDescription
list_producersList producers with license status and appointment states
get_producerProducer profile with commission rates and performance metrics
check_producer_licenseValidate producer license for a specific state and line of business

Analytics

ToolDescription
get_portfolio_kpisGWP, loss ratio, combined ratio, submission pipeline metrics
get_loss_ratioLoss ratio breakdown by LOB, state, and producer
get_bordereaux_summaryBordereaux submission status and premium totals

Compliance

ToolDescription
check_sanctionsRun OFAC/international sanctions screen for a name
get_filing_deadlinesUpcoming state filing deadlines and overdue status
get_compliance_summaryExpiring licenses, filings due, and urgent compliance items

Intelligence

AI-powered analysis tools backed by the /v1/intelligence API endpoints. These tools synthesize FMCSA data, loss history, and portfolio metrics into structured briefs and dossiers for underwriters and portfolio managers.
ToolDescription
get_carrier_dossierFull intelligence dossier for a DOT-registered carrier — safety scores, loss trends, risk flags
get_submission_briefAI-generated underwriting brief for a submission — appetite score, referral reasons, key signals
get_portfolio_overviewPortfolio-level overview — GWP concentration, loss ratio trends, top exposures
search_loss_historySemantic search across historical loss runs — find comparable claims and loss patterns
get_risk_signalsActive risk signals for a submission — FMCSA violations, sanctions hits, prior carrier flags
compare_carriersSide-by-side comparison of two or more DOT carriers on safety, loss, and compliance metrics
Total available tools: 45

Resources

The MCP server exposes these resources (readable via MCP resource:// URIs):
ResourceDescription
openinsure://policies/{id}Live policy record
openinsure://claims/{id}Live claim record
openinsure://submissions/{id}Live submission record
openinsure://producers/{id}Producer profile
openinsure://programs/{id}Program configuration

Setup: Claude Desktop

Add to ~/Library/Application Support/Claude/claude_desktop_config.json:
{
  "mcpServers": {
    "openinsure": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/client-sse", "https://mcp.openinsure.dev/mcp"],
      "env": {
        "OPENINSURE_TOKEN": "<your-system-jwt>"
      }
    }
  }
}

Setup: Claude.ai

The MCP server is registered as a remote MCP connector in the claude.ai workspace settings. No local client required — Claude connects directly to https://mcp.openinsure.dev/mcp.

Authentication

All MCP tool calls pass the token from the client environment. Generate a system role token:
# From the API worker
curl -X POST https://api.openinsure.dev/v1/api-keys \
  -H "Authorization: Bearer $ADMIN_TOKEN" \
  -d '{"name": "claude-mcp", "role": "system"}'
Or use the Admin Portal → API Keys page.

Development

# Run MCP server locally
pnpm --filter @openinsure/mcp dev
# Listening on http://localhost:8788

# Deploy to Cloudflare
pnpm --filter @openinsure/mcp deploy
The dev server proxies agent calls to http://localhost:8787 (the API worker). Run both workers simultaneously during development.

Extending

Add new tools in @openinsure/agents — the MCP server auto-discovers any tool exported from the agent registry. Follow the pattern in packages/agents/src/tools/:
export const myTool = {
  name: 'my_tool',
  description: 'What this tool does',
  inputSchema: z.object({ id: z.string() }),
  async execute(input, context) {
    // implementation
  },
};

AI Agents

Durable Object agents, orchestration, and Langfuse observability.

API Reference

Full REST API documentation.