How to Build an Insurance Agent with OpenClaw and Policy Penguin
OpenClaw has 215,000+ GitHub stars and counting. It runs locally, connects through WhatsApp or Telegram, and can browse the web on your behalf. It’s also one of the most popular MCP clients, which means it can connect to external data sources through a standardized protocol.
One of the most-shared OpenClaw stories: a user’s agent found an insurance claim rejection in their email, drafted a legal rebuttal citing specific policy language, and sent it. The insurer reversed the denial. The user didn’t ask the agent to do this.
That agent was working with unstructured email text. Here’s what happens when you give OpenClaw access to structured insurance data.
What you’ll build
An OpenClaw agent that can:
- Answer questions about your insurance coverage with real data (“What’s my deductible?” “Do I have umbrella coverage?”)
- Find missing discounts and estimate savings per discount
- Compare your rate increase to the state market average
- Spot coverage gaps across policies (auto liability vs umbrella requirements)
- Track what changed at your last renewal
- Upload new policy documents and get structured data back
The agent connects to Policy Penguin’s MCP server, which extracts and structures data from your actual policy documents. You upload your policies once. The agent queries the structured data whenever you ask.
Prerequisites
- OpenClaw installed and running
- A Policy Penguin account with at least one policy uploaded
- A Policy Penguin API key (from your dashboard)
Step 1: Connect OpenClaw to the MCP server
OpenClaw uses mcporter to manage MCP server connections. Add Policy Penguin as a server:
mcporter add policy-penguin --url https://mcp.policypenguin.ai/mcp --header "Authorization: Bearer YOUR_API_KEY"
Or add it to your OpenClaw MCP config directly:
{
"mcpServers": {
"policy-penguin": {
"url": "https://mcp.policypenguin.ai/mcp",
"headers": {
"Authorization": "Bearer YOUR_API_KEY"
}
}
}
}
Once connected, OpenClaw can see four tools and two resources from Policy Penguin.
Step 2: Understand what’s available
Tools (agent calls these on demand)
get_portfolio returns all policies and assets in your vault. Start here to see the full picture.
{
"policies": [
{
"id": "pol_a1b2c3",
"carrier": "State Farm",
"carrier_slug": "state-farm",
"type": "auto",
"state": "GA",
"premium": { "amount": 2400, "period": "6-month", "currency": "usd" },
"effective": { "start": "2025-12-01", "end": "2026-06-01" },
"vehicles": [
{ "year": 2022, "make": "Honda", "model": "Accord" }
],
"insights": { "total": 8, "issues": 2, "status": "completed" },
"renewals": 3
}
],
"assets": [
{
"id": "ast_x1y2z3",
"type": "vehicle",
"name": "2022 Honda Accord",
"status": "covered"
}
]
}
get_policy_details returns everything about one policy: structured coverages with numeric limits and deductibles (grouped by vehicle), insights, discount analysis with estimated savings, and renewal timeline.
{
"policy": {
"carrier": "State Farm",
"carrier_slug": "state-farm",
"type": "auto",
"state": "GA",
"premium": { "amount": 2400, "period": "6-month", "currency": "usd" },
"coverage": {
"summary": ["Bodily Injury: $250K/$500K", "Collision: $750 deductible"],
"policy_level": [
{
"slug": "auto_bi",
"name": "Bodily Injury Liability",
"limits": [
{ "type": "per_person", "amount": 250000 },
{ "type": "per_accident", "amount": 500000 }
],
"deductibles": [],
"premium": 1157
}
],
"by_vehicle": [
{
"vehicle": { "year": 2022, "make": "Honda", "model": "Accord" },
"items": [
{
"slug": "collision",
"name": "Collision",
"deductibles": [{ "amount": 750 }],
"premium": 281
}
]
}
]
}
},
"insights": [
{
"category": "market",
"priority": 1,
"title": "Upcoming Rate Change",
"description": "A rate filing indicates a 12% increase for renewals starting next quarter."
}
],
"discounts": {
"currency": "usd",
"current": [
{ "name": "Multi-Line Discount", "category": "multi_line", "applied": true }
],
"missing": [
{
"name": "Defensive Driving Discount",
"estimated_savings": { "min": 120, "max": 240 }
}
],
"total_potential_savings": { "min": 120, "max": 240 }
},
"timeline": [
{
"premium": 2400,
"premium_annual": 4800,
"percent_change": 8.1,
"effective": { "start": "2025-12-01", "end": "2026-06-01" },
"is_current": true
}
]
}
Coverage limits as numbers (250000, not “$250K”). Deductibles as numbers (750, not “$750”). Per-coverage premiums. Grouped by vehicle. This is what lets an agent do real comparison shopping.
get_asset_details returns detail for a vehicle or property: current coverage, premium trends.
upload_policy uploads a policy document (base64 PDF, JPEG, or PNG) and returns structured data in about 15 seconds.
Resources (always available for context)
| Resource | What it provides |
|---|---|
insurance://portfolio | Current portfolio snapshot: policies, carriers, premiums, renewal dates |
insurance://renewals | Upcoming renewal dates across all policies |
OpenClaw can read these resources at any time for quick context without making a tool call.
Step 3: Try it
With the MCP server connected, start a conversation with your OpenClaw agent:
OpenClaw reads insurance://portfolio, then calls get_portfolio to pull the full picture.
OpenClaw calls get_policy_details with the auto policy to pull rate benchmarks, missing discounts, and coverage gaps. The structured numeric data means it can compare limits directly: 250000 vs 500000.
OpenClaw uses browser automation to visit carrier quote pages, pre-filling coverage parameters from get_policy_details. The agent knows your exact coverage parameters because the data is structured and numeric. No parsing display strings.
Why structured data changes the game
Without Policy Penguin, your OpenClaw agent can still parse a PDF if you upload it. But that gives you a one-time snapshot with no context:
- It doesn’t know about your other policies (so it can’t find the umbrella gap)
- It doesn’t know what discounts your carrier offers (so it can’t find the missing $120-$240)
- It doesn’t know the market average (so it can’t tell you 8.1% is above normal)
- It forgets everything when the conversation ends
The MCP server makes the data persistent, structured, and connected across your full portfolio. The agent queries it whenever it needs context. No re-uploading, no re-parsing, no lost history.
Also works with Claude and ChatGPT
The same MCP server works with any MCP-compatible client. If you use Claude Desktop or Claude Code instead of OpenClaw:
Claude Desktop (claude_desktop_config.json):
{
"mcpServers": {
"policy-penguin": {
"url": "https://mcp.policypenguin.ai/mcp",
"headers": {
"Authorization": "Bearer YOUR_API_KEY"
}
}
}
}
Claude Code (.mcp.json):
{
"mcpServers": {
"policy-penguin": {
"type": "http",
"url": "https://mcp.policypenguin.ai/mcp",
"headers": {
"Authorization": "Bearer YOUR_API_KEY"
}
}
}
}
If your stack speaks HTTP instead of MCP, everything is also available as a REST API.
Get started
- Sign up for Policy Penguin and upload your policies
- Get an API key from your dashboard
- Connect OpenClaw (or any MCP client) using the config above
- Ask your agent about your coverage
Full MCP documentation and REST API reference are available now. Questions? Drop us a line .