Because every stuffed animal deserves peace of mind.
This is a demo project, not a real insurance product. It exists to explore how financial products can be marketed and administered through conversational AI interfaces (LLMs + MCP). No real policies are issued, no real money changes hands (Stripe runs in test mode only), and nothing here constitutes actual insurance coverage.
Cuddle Toy Insurance is an end-to-end demo of an "AI-native" product: a user describes a stuffed animal in natural language, an LLM plays the role of a meticulous Lloyd's-of-London-style adjuster, and the conversation drives a real API flow — assessment → quote → Stripe test-mode checkout → policy certificate. The same backend serves three channels: a Claude MCP server, a ChatGPT Custom GPT, and a Next.js web wizard.
.
├── backend/ FastAPI service (quotes, pricing, Stripe, Supabase, PDF cert)
├── mcp/ Remote MCP HTTP server that proxies to the backend
├── web/ Next.js 14 web wizard (deployed on Vercel)
├── docs/ Integration guides (e.g. Custom GPT setup)
├── src/ Legacy v1.2 local-stdio MCP server (kept for reference)
└── tests/ Pytest suite for the v1.2 local-stdio server
- v2 (current) is a cloud deployment: FastAPI on Railway, Postgres on
Supabase (Frankfurt, with RLS enabled), MCP server on Railway, web on
Vercel. See
Cuddle_Toy_Insurance_v2_PRD.md. - v1.2 (legacy, in
src/) is the original local-stdio MCP server with on-disk JSON storage. Still runnable; see the v1 PRD.
Three core tools / API endpoints drive every conversation:
- Assess — takes a toy profile (name, type, estimated value, condition, owner age, ownership years, household hazards) and returns risk multipliers plus a one-sentence adjuster narration.
- Quote — runs the actuarial model, persists a pending quote
(
Q-XXXXXXXX), and opens a Stripe test-mode Checkout session. - Finalize — verifies the Stripe session was actually paid for that
specific quote (anti-replay via
session.metadata.quote_id), issues aCTI-XXXXXXXXXXpolicy, and returns both a Markdown certificate and a link to the rendered PDF.
The adjuster persona ("warm, meticulous, deadpan about plush toys") is defined once and reused across the Claude MCP docstrings, the Custom GPT system prompt, and the web wizard microcopy.
| Layer | Tech |
|---|---|
| Backend | FastAPI, Pydantic v2, psycopg3, ReportLab |
| MCP server | FastMCP 2.x, streamable HTTP |
| Database | Supabase Postgres (RLS enabled, backend uses a BYPASSRLS role) |
| Payments | Stripe Checkout (test mode only) |
| Web | Next.js 14 (App Router), Tailwind, deployed on Vercel |
| Hosting | Railway (backend + MCP), Vercel (web), Supabase (DB) |
Three ways to use the demo, depending on which LLM you prefer:
The MCP server is deployed publicly. Add it to your Claude Desktop config:
Then in a fresh conversation: "I'd like to insure my teddy bear."
Requires a ChatGPT Plus/Team/Enterprise plan. The Custom GPT imports the
backend's OpenAPI spec directly — no adapter. Full setup walkthrough in
docs/chatgpt_setup.md.
Deployed at the Vercel URL from web/vercel.json. A guided form that calls
the same FastAPI backend as the MCP server.
cd backend
pip install -e ".[dev]"
cp .env.example .env # fill in SUPABASE_DB_URL and (optionally) STRIPE_SECRET_KEY
uvicorn app.main:app --reloadWithout a STRIPE_SECRET_KEY the backend runs in demo mode: /v1/quotes
returns payment_mode: "demo" and finalize accepts any non-empty session id
so the flow stays usable end-to-end.
cd mcp
pip install -e ".[dev]"
cp .env.example .env # point BACKEND_URL at your running backend
uvicorn app.main:app --reload --port 8001cd web
npm install
npm run devStill runnable from src/cuddle_toy_insurance/:
pip install -e .
cuddle-toy-insurance # stdio MCP server, ships its own on-disk JSON storeA separate admin MCP server (cuddle-toy-insurance-admin from v1.2, or
equivalent v2 admin endpoints) lets an operator tune pricing multipliers
and suspend the service. API-key gated via env var — example:
{
"env": { "CUDDLE_TOY_ADMIN_API_KEY": "cti-admin-CHANGE_ME" }
}Never commit the key. Rotate it if it ever leaks.
Intentionally out of scope (see PRDs and DECISIONS.md):
- Real-money payments. Only Stripe test mode is supported.
- Claims handling, refunds, policy modification — new business only.
- Identity verification, KYC, regulatory compliance — this is a demo.
- PDF templating beyond a single ReportLab layout.
MIT — see LICENSE.
Cuddle Toy Insurance is a demonstration of conversational-AI product UX. It is not a licensed insurance carrier, not affiliated with any insurer, and does not provide insurance coverage of any kind. All monetary values are hypothetical; all Stripe charges are test-mode only.
{ "mcpServers": { "cuddle-toy-insurance": { "url": "https://<your-mcp-deployment>/mcp" } } }