{
  "openapi": "3.1.0",
  "info": {
    "title": "Foresee",
    "summary": "Personal-lines insurance quotes from every carrier, for AI agents.",
    "description": "Foresee quotes every personal insurance line in every U.S. state. California auto is live today.\n\nTwo MCP streamable-HTTP hosts, both unauthenticated:\n- https://mcp.go-foresee.com/mcp — ChatGPT and Claude.ai. Tool: quote_insurance (estimates).\n- https://agents.go-foresee.com/mcp — Cursor, Claude Code, other agents, site chat. Tools: quote_insurance (estimates) and live_carrier_quotes (confirm on the carrier's own site).\n\nEstimates are not bindable quotes. Confirmations are what a carrier's site printed, still not binders. Foresee does not take payment. Docs: https://go-foresee.com/docs",
    "version": "1.27.2",
    "contact": {
      "name": "Foresee",
      "email": "support@go-foresee.com",
      "url": "https://go-foresee.com/support"
    },
    "license": {
      "name": "Terms of Service",
      "url": "https://go-foresee.com/terms"
    }
  },
  "externalDocs": {
    "description": "Human and agent docs",
    "url": "https://go-foresee.com/docs"
  },
  "servers": [
    {
      "url": "https://mcp.go-foresee.com",
      "description": "Connector MCP (ChatGPT, Claude.ai). quote_insurance only. POST /mcp."
    },
    {
      "url": "https://agents.go-foresee.com",
      "description": "Agents MCP (Cursor, Claude Code, site chat). quote_insurance + live_carrier_quotes. POST /mcp."
    },
    {
      "url": "https://go-foresee.com",
      "description": "Site, docs, OpenAPI, health."
    }
  ],
  "tags": [
    { "name": "mcp", "description": "Model Context Protocol transport" },
    { "name": "estimate", "description": "Instant estimates (quote_insurance)" },
    { "name": "confirm", "description": "Confirm on the carrier's own site (live_carrier_quotes, agents host)" },
    { "name": "ops", "description": "Liveness and status" }
  ],
  "paths": {
    "/mcp": {
      "post": {
        "tags": ["mcp"],
        "operationId": "mcpJsonRpc",
        "summary": "MCP JSON-RPC (streamable HTTP)",
        "description": "Initialize a session, list tools, and call them. `Accept` must include `application/json` and/or `text/event-stream`. A bare GET returns 405 with `Allow: GET, POST, DELETE` when the server is up.\n\nTool names: `quote_insurance` (both hosts), `live_carrier_quotes` (agents host only).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": { "$ref": "#/components/schemas/JsonRpcRequest" },
              "examples": {
                "initialize": {
                  "value": {
                    "jsonrpc": "2.0",
                    "id": 1,
                    "method": "initialize",
                    "params": {
                      "protocolVersion": "2025-03-26",
                      "capabilities": {},
                      "clientInfo": { "name": "example", "version": "0" }
                    }
                  }
                },
                "toolsList": {
                  "value": { "jsonrpc": "2.0", "id": 2, "method": "tools/list" }
                },
                "quote": {
                  "value": {
                    "jsonrpc": "2.0",
                    "id": 3,
                    "method": "tools/call",
                    "params": {
                      "name": "quote_insurance",
                      "arguments": {
                        "profile": {
                          "zip_code": "94607",
                          "age": 25,
                          "auto": {
                            "vehicles": [
                              { "year": 2021, "make": "Honda", "model": "Civic" }
                            ]
                          }
                        },
                        "lines": {
                          "auto": {
                            "bi": "100/300",
                            "pd": 100,
                            "coll_deductible": 500,
                            "comp_deductible": 500
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "JSON-RPC result or SSE `event: message` stream.",
            "content": {
              "application/json": {
                "schema": { "$ref": "#/components/schemas/JsonRpcResponse" }
              },
              "text/event-stream": {
                "schema": { "type": "string" }
              }
            }
          },
          "405": {
            "description": "Method not allowed (GET without session). Server is up."
          }
        }
      }
    },
    "/health": {
      "servers": [{ "url": "https://go-foresee.com" }],
      "get": {
        "tags": ["ops"],
        "operationId": "health",
        "summary": "Site liveness",
        "responses": {
          "200": {
            "description": "Plain `ok`.",
            "content": { "text/plain": { "schema": { "type": "string", "example": "ok" } } }
          }
        }
      }
    },
    "/status.json": {
      "servers": [{ "url": "https://go-foresee.com" }],
      "get": {
        "tags": ["ops"],
        "operationId": "statusJson",
        "summary": "Machine-readable status (RFC Health Check style)",
        "responses": {
          "200": {
            "description": "Health document with MCP and site probe links.",
            "content": {
              "application/health+json": {
                "schema": { "type": "object", "additionalProperties": true }
              },
              "application/json": {
                "schema": { "type": "object", "additionalProperties": true }
              }
            }
          }
        }
      }
    },
    "/tools/quote_insurance": {
      "servers": [
        { "url": "https://mcp.go-foresee.com" },
        { "url": "https://agents.go-foresee.com" }
      ],
      "post": {
        "tags": ["estimate"],
        "operationId": "quote_insurance",
        "summary": "Instant estimates",
        "description": "MCP tool. Invoke via `tools/call` on POST /mcp, not as a raw REST path. No authentication. Prices a household profile across the supported carriers, per line in `lines`. These are estimates, not bindable quotes. Unserviceable state/line combinations return a structured coverage error.",
        "security": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": { "$ref": "#/components/schemas/QuoteInsuranceArgs" }
            }
          }
        },
        "responses": {
          "200": { "description": "Per-carrier monthly point estimates, confidence intervals, assumptions, tighten_by, failures." }
        }
      }
    },
    "/tools/live_carrier_quotes": {
      "servers": [{ "url": "https://agents.go-foresee.com" }],
      "post": {
        "tags": ["confirm"],
        "operationId": "live_carrier_quotes",
        "summary": "Confirm on the carrier's own site",
        "description": "MCP tool (idempotent). Invoke via `tools/call` on POST /mcp. Agents host only. No authentication. Foresee walks the named carriers' quote sites and reads back what they printed. Pass an explicit go-ahead verbatim as user_authorization. Re-call with the same arguments to collect progress. Not a bindable quote.",
        "security": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": { "$ref": "#/components/schemas/LiveQuoteArgs" }
            }
          }
        },
        "responses": {
          "200": { "description": "Per-carrier confirmation results, including still-running rows." }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "JsonRpcRequest": {
        "type": "object",
        "required": ["jsonrpc", "method"],
        "properties": {
          "jsonrpc": { "type": "string", "const": "2.0" },
          "id": { "description": "Omit for notifications." },
          "method": { "type": "string" },
          "params": { "type": "object", "additionalProperties": true }
        }
      },
      "JsonRpcResponse": {
        "type": "object",
        "properties": {
          "jsonrpc": { "type": "string" },
          "id": {},
          "result": { "type": "object", "additionalProperties": true },
          "error": { "type": "object", "additionalProperties": true }
        }
      },
      "AutoAsk": {
        "type": "object",
        "additionalProperties": true,
        "description": "Auto coverage ask, as actual numbers. Required axes: bi, pd, coll_deductible, comp_deductible. An incomplete ask returns coverage_required naming the axes.",
        "properties": {
          "bi": { "type": "string", "description": "Bodily-injury liability, per-person/per-accident in $000s, e.g. \"100/300\"." },
          "pd": { "type": "integer", "description": "Property-damage liability in $000s, e.g. 100." },
          "coll_deductible": { "type": "integer", "description": "Collision deductible in dollars." },
          "comp_deductible": { "type": "integer", "description": "Comprehensive deductible in dollars." },
          "um": { "type": "string", "description": "Optional. UM/UIM BI in $000s, e.g. \"100/300\"." },
          "medpay": { "type": "integer", "description": "Optional. Medical payments in dollars." }
        }
      },
      "HomeAsk": {
        "type": "object",
        "additionalProperties": true,
        "description": "Home coverage ask, in dollars. All four axes required.",
        "properties": {
          "coverage_a": { "type": "integer", "description": "Dwelling limit — usually the replacement cost." },
          "coverage_e": { "type": "integer", "description": "Personal liability." },
          "coverage_f": { "type": "integer", "description": "Guest medical." },
          "aop_deductible": { "type": "integer", "description": "All-other-perils deductible." }
        }
      },
      "RentersAsk": {
        "type": "object",
        "additionalProperties": true,
        "description": "Renters coverage ask, in dollars. Required axes: coverage_c, coverage_e, coverage_f, deductible.",
        "properties": {
          "coverage_c": { "type": "integer", "description": "Personal-property (contents) limit." },
          "coverage_e": { "type": "integer", "description": "Personal liability." },
          "coverage_f": { "type": "integer", "description": "Guest medical." },
          "deductible": { "type": "integer", "description": "All-perils deductible." },
          "coverage_d": { "type": "integer", "description": "Optional. Loss of use." }
        }
      },
      "Lines": {
        "type": "object",
        "additionalProperties": true,
        "description": "REQUIRED — one map: each key names a line to price (auto, home, renters), each value that line's coverage ask as actual numbers.",
        "properties": {
          "auto": { "$ref": "#/components/schemas/AutoAsk" },
          "home": { "$ref": "#/components/schemas/HomeAsk" },
          "renters": { "$ref": "#/components/schemas/RentersAsk" }
        }
      },
      "QuoteProfile": {
        "type": "object",
        "additionalProperties": true,
        "description": "ZIP code, age (or dob) and — for auto — each vehicle's year/make/model are required; every other omission becomes a declared assumption reported back under assumptions/tighten_by.",
        "properties": {
          "zip_code": { "type": "string", "description": "5-digit ZIP. Required." },
          "age": { "type": "integer", "description": "Required, or pass dob." },
          "dob": { "type": "string", "description": "YYYY-MM-DD — accepted alternative to age." },
          "city": { "type": "string" },
          "gender": { "type": "string" },
          "marital_status": { "type": "string" },
          "education": { "type": "string" },
          "employment_status": { "type": "string" },
          "occupation": { "type": "string" },
          "credit_range": { "type": "string", "description": "Used only where state law permits credit in rating." },
          "home_ownership_status": { "type": "string", "description": "rent / own" },
          "residence_type": { "type": "string" },
          "military_affiliation": { "type": "string", "description": "active / veteran / family / none. USAA is military-affiliated households only." },
          "memberships": { "type": "array", "items": { "type": "string" } },
          "effective_date": { "type": "string" },
          "prior_insurance": { "type": "object", "additionalProperties": true, "description": "Current/prior insurance for the same line: carrier, limits, tenure." },
          "companion_policies": { "type": "array", "items": { "type": "string" }, "description": "Lines the household already holds elsewhere." },
          "auto": {
            "type": "object",
            "additionalProperties": true,
            "description": "Auto block: vehicles[] (year/make/model required) and drivers[].",
            "properties": {
              "vehicles": {
                "type": "array",
                "items": {
                  "type": "object",
                  "additionalProperties": true,
                  "properties": {
                    "year": { "type": "integer" },
                    "make": { "type": "string" },
                    "model": { "type": "string" },
                    "ownership": { "type": "string" },
                    "annual_mileage": { "type": "integer" },
                    "primary_use": { "type": "string" },
                    "garaging_zip": { "type": "string" }
                  }
                }
              },
              "drivers": {
                "type": "array",
                "items": {
                  "type": "object",
                  "additionalProperties": true,
                  "properties": {
                    "relation": { "type": "string", "description": "self for the first." },
                    "dob": { "type": "string" },
                    "years_licensed": { "type": "integer" },
                    "accidents": { "type": "array", "items": { "type": "object" }, "description": "Empty list = clean record." },
                    "violations": { "type": "array", "items": { "type": "object" } },
                    "sr22_required": { "type": "boolean" }
                  }
                }
              }
            }
          },
          "property": {
            "type": "object",
            "additionalProperties": true,
            "description": "Home/renters block.",
            "properties": {
              "year_built": { "type": "integer" },
              "construction_type": { "type": "string" },
              "roof_type": { "type": "string" },
              "square_feet": { "type": "integer" },
              "protection_class": { "type": "string" },
              "replacement_cost": { "type": "integer" },
              "devices": { "type": "array", "items": { "type": "string" } },
              "losses": { "type": "array", "items": { "type": "object" } }
            }
          }
        }
      },
      "QuoteInsuranceArgs": {
        "type": "object",
        "required": ["profile", "lines"],
        "properties": {
          "profile": { "$ref": "#/components/schemas/QuoteProfile" },
          "lines": { "$ref": "#/components/schemas/Lines" },
          "carriers": { "type": "array", "items": { "type": "string" }, "description": "Restrict the panel; defaults to all supported carriers." },
          "include_partial": { "type": "boolean", "default": false },
          "include_failures": { "type": "boolean", "default": true }
        }
      },
      "LiveQuoteArgs": {
        "type": "object",
        "required": ["profile", "lines", "user_authorization"],
        "properties": {
          "profile": { "$ref": "#/components/schemas/QuoteProfile" },
          "lines": { "type": "object", "additionalProperties": true, "description": "One key per line to walk. Auto and renters asks are required (same axes as quote_insurance); home takes null — the carrier's own form prices its package. Several keys commission bundled walks." },
          "identity": { "type": "object", "additionalProperties": true, "description": "Legal name, dob, street address, email — live submissions only." },
          "user_authorization": { "type": "string", "description": "The user's in-chat go-ahead, verbatim." },
          "carriers": { "type": "array", "items": { "type": "string" } }
        }
      }
    }
  }
}
