Agentic AI Ready

    Developer API & AI Agent Platform

    Integrate insurance intelligence into your apps — or let autonomous AI agents discover, test, and upgrade on their own via MCP and OpenAPI.

    For AI Agents

    Autonomous agents can discover this API, test with free credits, evaluate ROI from gap analysis, and upgrade to paid tiers — all programmatically.

    Discover

    Find API via MCP or OpenAPI

    Analyze

    Upload policies, get structured gaps

    Evaluate ROI

    get_savings_estimate → compare to plan cost

    Upgrade

    initiate_upgrade → checkout URL for user

    Discovery Endpoints

    MCP
    https://phclwmljydzkumfmjopl.supabase.co/functions/v1/mcp-server
    OpenAPI
    https://phclwmljydzkumfmjopl.supabase.co/functions/v1/api-manifest
    AI Plugin
    /.well-known/ai-plugin.json

    Claude Desktop / Cursor config:

    {
      "mcpServers": {
        "mypolicyreview": {
          "url": "https://phclwmljydzkumfmjopl.supabase.co/functions/v1/mcp-server",
          "headers": {
            "Authorization": "Bearer mpr_live_your_key"
          }
        }
      }
    }

    Custom agent (Python):

    import requests
    
    API = "https://phclwmljydzkumfmjopl.supabase.co/functions/v1"
    KEY = "mpr_live_your_key"
    H = {"Authorization": f"Bearer {KEY}"}
    
    # 1. Check credits
    status = requests.get(f"{API}/agent-subscription-status", headers=H).json()
    print(f"Plan: {status['plan']}, Credits: {status['credits_remaining']}")
    
    # 2. Analyze a policy (10 credits)
    with open("policy.pdf", "rb") as f:
        analysis = requests.post(f"{API}/api-analyze",
            headers={**H, "Content-Type": "application/pdf"}, data=f.read()).json()
    
    # 3. If ROI is positive, upgrade
    if status['plan'] == 'free' and status['credits_remaining'] < 50:
        checkout = requests.post(f"{API}/agent-create-checkout",
            headers={**H, "Content-Type": "application/json"},
            json={"plan": "pro"}).json()
        print(f"Upgrade: {checkout['checkout_url']}")

    Agentic MCP Tools (new)

    NEW
    check_subscription_statusGet plan, credits used/remaining, available upgrades
    NEW
    get_savings_estimateEstimate savings from addressing coverage gaps (ROI calculation)
    NEW
    initiate_upgradeCreate Stripe Checkout session for Pro or Business upgrade

    Authentication

    All API requests require an API key. Subscribe to a plan above to generate API keys.

    Authorization: Bearer mpr_live_your_api_key_here

    Credit-Based Pricing

    Each API call consumes credits based on compute cost:

    api-analyze · 10 credits (PDF + AI analysis)

    api-coi · 10 credits (PDF + AI extraction)

    api-verify · 1 credit (database lookup)

    mcp-server · 1 credit per tool call

    agent-subscription-status · 0 credits (free)

    agent-create-checkout · 0 credits (free)

    Monthly Credit Limits

    Free: 100 credits/month

    Pro: 2,000 credits/month — $49/mo

    Business: 10,000 credits/month — $199/mo

    Exceeding your limit returns 429 Too Many Requests. Credits reset monthly. Agents can call check_subscription_status to monitor usage.

    Analysis Endpoints

    POST
    /api-analyze

    Policy Analysis

    Upload an insurance policy PDF and receive structured analysis with coverages, limits, deductibles, summary, and gap identification.

    curl -X POST https://phclwmljydzkumfmjopl.supabase.co/functions/v1/api-analyze \
      -H "Authorization: Bearer mpr_live_xxx" \
      -H "Content-Type: application/pdf" \
      --data-binary @policy.pdf

    Response:

    {
      "policy": {
        "policy_type": "Home",
        "carrier": "State Farm",
        "coverages": [
          { "type": "Dwelling", "limit": "$350,000", "deductible": "$1,000" }
        ]
      },
      "summary": "• Dwelling coverage at $350,000...",
      "gaps": "• Consider adding flood coverage..."
    }
    POST
    /api-verify

    Coverage Verification

    Verify a policy's coverage status and check if it meets specific requirements.

    curl -X POST https://phclwmljydzkumfmjopl.supabase.co/functions/v1/api-verify \
      -H "Authorization: Bearer mpr_live_xxx" \
      -H "Content-Type: application/json" \
      -d '{
        "policy_id": "uuid-here",
        "requirements": [
          { "coverage_type": "Dwelling", "min_limit": 300000 }
        ]
      }'
    POST
    /api-coi

    COI Extraction

    Upload a Certificate of Insurance PDF and extract structured coverage data with optional requirement verification.

    curl -X POST https://phclwmljydzkumfmjopl.supabase.co/functions/v1/api-coi \
      -H "Authorization: Bearer mpr_live_xxx" \
      -H "Content-Type: application/pdf" \
      --data-binary @coi.pdf

    Agentic Endpoints

    These endpoints let AI agents check billing status and initiate subscription upgrades programmatically. No credits consumed.

    GET
    /agent-subscription-status

    Check Subscription Status

    Returns current plan, credits used/remaining this month, subscription end date, and available upgrade options.

    curl https://phclwmljydzkumfmjopl.supabase.co/functions/v1/agent-subscription-status \
      -H "Authorization: Bearer mpr_live_xxx"

    Response:

    {
      "plan": "free",
      "credits_used": 42,
      "credits_limit": 100,
      "credits_remaining": 58,
      "upgrade_available": true,
      "available_upgrades": [
        { "plan": "pro", "price": "$49/mo", "credits": 2000 },
        { "plan": "business", "price": "$199/mo", "credits": 10000 }
      ]
    }
    POST
    /agent-create-checkout

    Initiate Subscription Upgrade

    Creates a Stripe Checkout session for upgrading to Pro or Business. Returns a URL for the human user to complete payment (expires in 30 min).

    curl -X POST https://phclwmljydzkumfmjopl.supabase.co/functions/v1/agent-create-checkout \
      -H "Authorization: Bearer mpr_live_xxx" \
      -H "Content-Type: application/json" \
      -d '{"plan": "pro"}'

    Response:

    {
      "checkout_url": "https://checkout.stripe.com/c/pay/...",
      "session_id": "cs_live_...",
      "plan": "pro",
      "plan_label": "API Pro – $49/mo",
      "expires_at": "2026-03-13T15:30:00.000Z"
    }

    MCP Server

    7 tools

    Connect AI assistants (Claude, ChatGPT, Cursor, custom agents) to your policy data and billing via Model Context Protocol.

    Server URL:

    https://phclwmljydzkumfmjopl.supabase.co/functions/v1/mcp-server

    All tools:

    list_policiesList all policies with types, carriers, and status
    get_policy_detailsFull policy data including coverages, analysis, and gaps
    check_coverageVerify if a policy meets specific requirements
    get_gapsGet coverage gaps and recommendations
    NEW
    check_subscription_statusGet plan, credits, and upgrade options
    NEW
    get_savings_estimateEstimate savings from addressing gaps (ROI)
    NEW
    initiate_upgradeCreate checkout session for Pro/Business upgrade

    Test with MCP Inspector:

    npx @modelcontextprotocol/inspector

    AI Agent Integration

    Make your policy data accessible to AI agents through industry-standard discovery protocols.

    OpenAPI Spec

    Machine-readable API definition for AI agents, SDK generators, and API gateways.

    https://phclwmljydzkumfmjopl.supabase.co/functions/v1/api-manifest

    AI Plugin Manifest

    ChatGPT-style plugin manifest at /.well-known/ai-plugin.json.

    https://phclwmljydzkumfmjopl.supabase.co/functions/v1/api-manifest?format=ai-plugin

    MCP Server

    Model Context Protocol for Claude, Cursor, and MCP-compatible assistants.

    https://phclwmljydzkumfmjopl.supabase.co/functions/v1/mcp-server

    7 tools including agentic billing. Agents can upgrade plans automatically.

    Quick Integration Examples

    Fetch OpenAPI spec programmatically:

    import requests
    spec = requests.get("https://phclwmljydzkumfmjopl.supabase.co/functions/v1/api-manifest").json()
    print(f"API: {spec['info']['title']} v{spec['info']['version']}")
    print(f"Endpoints: {list(spec['paths'].keys())}")

    Auto-generate a client SDK:

    npx @openapitools/openapi-generator-cli generate \
      -i https://phclwmljydzkumfmjopl.supabase.co/functions/v1/api-manifest \
      -g typescript-fetch -o ./mpr-sdk

    LangChain / agent tool registration:

    from langchain.tools import OpenAPIToolkit
    toolkit = OpenAPIToolkit.from_openapi_url(
        "https://phclwmljydzkumfmjopl.supabase.co/functions/v1/api-manifest",
        headers={"Authorization": "Bearer mpr_live_xxx"}
    )