Skip to content

MCP Server

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.

EnvironmentURL
Productionhttps://mcp.openinsure.dev/mcp
Local devhttp://localhost:8788/mcp
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.

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
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)
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
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
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
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

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

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>"
}
}
}
}

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.

All MCP tool calls pass the token from the client environment. Generate a system role token:

Terminal window
# 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.

Terminal window
# 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.

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.