GrabInsurance MCP
Integrates with GrabOn to analyze deal context and provide real-time insurance offers during deal redemption.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@GrabInsurance MCPWhat insurance for a Rs 15,000 smartphone deal?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
GrabInsurance MCP
GrabOn VibeCoder Challenge 2026 | Project 02 | Contextual Embedded Insurance at Deal Redemption
Section 1: What I Built
GrabInsurance MCP is a contextual embedded insurance system designed for GrabOn, India's largest coupon and deal discovery platform. When a user redeems a deal—whether it's a flight booking, electronics purchase, or food delivery—the system analyzes the deal context in real-time and presents a single, highly relevant insurance offer at the moment of maximum purchase intent.
The system is built as an MCP (Model Context Protocol) server, enabling direct integration with Claude Desktop. This architecture allows natural language interactions like "What insurance should I offer for this Rs 12,400 Goa flight?" while maintaining programmatic access through standard API endpoints. The system includes rule-based classification with Claude API fallback, dynamic premium calculation, personalized copy generation with A/B testing, and a React storefront for visual demonstration.
Related MCP server: Zava Insurance MCP Server
Section 2: Architecture Diagram
┌─────────────────────────────────────────────────────────────────────────────┐
│ GrabInsurance MCP │
└─────────────────────────────────────────────────────────────────────────────┘
┌──────────────┐ ┌──────────────┐ ┌──────────────────────────────────┐
│ │ │ │ │ MCP Server │
│ React │────▶│ FastAPI │────▶│ ┌────────────────────────────┐ │
│ Frontend │ │ Bridge │ │ │ classify_deal_intent │ │
│ (port 5173) │ │ (port 8000) │ │ │ get_insurance_quote │ │
│ │◀────│ │◀────│ │ insurance://catalog │ │
└──────────────┘ └──────────────┘ │ │ generate_copy prompt │ │
│ └────────────────────────────┘ │
└──────────────────────────────────┘
│
┌────────────────────────────────────┼────────────────┐
│ │ │
▼ ▼ ▼
┌──────────────┐ ┌──────────────┐ ┌──────────────┐
│ Insurance │ │ Claude │ │ SQLite │
│ Engine │ │ API │ │ (aiosqlite) │
│ │ │ │ │ │
│ • Classifier │ │ • Fallback │ │ • A/B events │
│ • Pricing │ │ • Copy gen │ │ • Sessions │
│ • Cart logic │ │ │ │ • Metrics │
└──────────────┘ └──────────────┘ └──────────────┘
│
▼
┌──────────────┐
│ Pricing API │
│ (port 8001) │
└──────────────┘
┌─────────────────────────────────────────────────────────────────────────────┐
│ Claude Desktop │
│ ┌─────────────────────────────────────────────────────────────────────┐ │
│ │ "What insurance should I offer for this Samsung phone deal?" │ │
│ │ → Calls classify_deal_intent tool │ │
│ │ → Returns: ELEC_SCREEN (90% confidence), ELEC_WARRANTY (85%) │ │
│ └─────────────────────────────────────────────────────────────────────┘ │
└─────────────────────────────────────────────────────────────────────────────┘Section 3: Key Architecture Decisions
Why MCP over REST for Claude Integration?
MCP provides native Claude Desktop integration with automatic tool discovery, typed inputs/outputs, and conversational context. Unlike REST, Claude can explore resources (like the insurance catalog) and use prompts (for copy generation) within a single conversation flow. This enables natural interactions like "classify this deal and generate copy for it" without manual API orchestration.
Why SQLite over Redis for Demo Scope?
SQLite with aiosqlite provides async-safe persistence without infrastructure overhead. For a demo with 10 scenarios and 3 A/B variants, SQLite's simplicity and zero-config setup outweigh Redis's speed advantages. The aiosqlite library ensures the event loop is never blocked during database operations.
Why FastMCP over Raw MCP SDK?
FastMCP provides decorator-based tool registration, automatic schema generation, and built-in stdio transport handling. This reduces boilerplate by ~60% compared to raw SDK usage while maintaining full protocol compliance. The trade-off (less control over transport details) is acceptable for this use case.
Why Rule-Based + Claude Fallback?
Rule-based classification handles 80% of deals instantly (sub-millisecond) with deterministic results. Claude API is only invoked for unknown categories or low-confidence matches, reducing costs and latency while maintaining accuracy for edge cases.
Section 4: How to Run Locally
Prerequisites
Requirement | Version |
Python | 3.11 or higher |
Node.js | 18 or higher |
uv | Latest (recommended) or pip |
Step 1: Clone and Setup
cd grabinsurance-mcp
# Create and activate virtual environment
python -m venv .venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate
# Install Python dependencies
pip install -e ".[dev]"Step 2: Configure Environment
cp .env.example .env
# Edit .env and add your ANTHROPIC_API_KEYStep 3: Start Backend Services
# Terminal 1: API Bridge
uvicorn api.main:app --port 8000 --reload
# Terminal 2: Pricing API
uvicorn api.pricing_api:app --port 8001 --reloadStep 4: Start Frontend
cd frontend
npm install
npm run devStep 5: Open Application
Navigate to http://localhost:5173 in your browser.
Section 5: How to Connect to Claude Desktop
Live Evaluation Note: The MCP server will be tested live by connecting to Claude Desktop. The hammer icon must appear in the chat input before demo begins.
See also: MCP_CONNECTION_GUIDE.md for the full step-by-step guide with detailed troubleshooting.
1. Locate your Claude Desktop config file
OS | Config File Path |
macOS |
|
Windows |
|
Linux |
|
2. Add the MCP server config (recommended: using uv)
{
"mcpServers": {
"grabinsurance": {
"command": "/ABSOLUTE/PATH/TO/uv",
"args": [
"run",
"--directory", "/ABSOLUTE/PATH/TO/Grabon-MCP",
"python",
"mcp_server/server.py"
],
"env": {
"ANTHROPIC_API_KEY": "your-api-key-here",
"CATALOG_PATH": "/ABSOLUTE/PATH/TO/Grabon-MCP/data/insurance_catalog.json",
"AB_DB_PATH": "/ABSOLUTE/PATH/TO/Grabon-MCP/data/ab_events.db"
}
}
}
}Run which uv and pwd to find your absolute paths. Replace /ABSOLUTE/PATH/TO/ with the actual values.
3. Restart Claude Desktop (Cmd+Q, then reopen)
4. Test the connection
Click the 🔨 hammer icon in the chat input area
You should see
classify_deal_intentandget_insurance_quotelistedTry: "What insurance products are available in the catalog?"
⚠️ Common Pitfalls
Problem | Cause | Fix |
|
| Use full path to |
Claude Desktop can't find | Claude Desktop doesn't inherit your shell's PATH | Always use full absolute paths in the config |
| Missing | Already fixed — ensure |
Config file can't be found via terminal |
| Quote the path: |
Section 6: Running Tests
All 12 edge cases are covered in the test suite. Run
pytest tests/ -vto verify before submitting.
# Run all tests with verbose output
pytest tests/ -v
# Run specific test files
pytest tests/test_mcp_tools.py -v # MCP tool edge cases
pytest tests/test_classifier.py -v # Classification logic
pytest tests/test_pricing.py -v # Premium calculations
pytest tests/test_ab_testing.py -v # A/B framework
pytest tests/test_cart_resolver.py -v # Multi-cart logic
pytest tests/test_copy_quality.py -v # Copy generation rules
# Run with coverage report
pytest tests/ -v --cov=. --cov-report=htmlWhat Each Test File Covers
File | Coverage |
| All 12 edge cases from blueprint + tool validation |
| Rule-based classification, fallback logic, confidence scores |
| Premium formula, floor/cap bounds, risk multipliers |
| Deterministic variants, impression recording, conversion tracking |
| Waterfall logic, deduplication, multi-cart scenarios |
| Prompt structure, forbidden words, character limits |
Section 7: What I Would Do Differently
Real-Time Premium API
Currently, premiums are calculated using a static formula. In production, I would integrate with actual insurance provider APIs (like Digit or Acko) for real-time quotes, dynamic pricing based on claims history, and regulatory-compliant policy generation.
Embedding-Based Classification
The rule-based classifier works well for known categories but requires manual updates for new product types. A production system would use embeddings (e.g., OpenAI's text-embedding-3-small or Claude's embeddings) to classify deals based on semantic similarity to past successful insurance matches.
Redis for A/B Testing at Scale
SQLite works for demos but wouldn't handle thousands of concurrent sessions. Redis Streams would provide sub-millisecond event recording with built-in TTL for session expiry and pub/sub for real-time dashboard updates.
Server-Sent Events for Live Conversion Updates
The dashboard currently polls for updates. SSE or WebSocket connections would push conversion events to all open dashboards instantly, enabling real-time A/B monitoring during high-traffic campaigns.
Internationalization
All copy is currently in English with Rs for currency. Production would need full i18n support for regional languages (Hindi, Tamil, Telugu) and proper number formatting for Indian locale conventions.
Fraud Detection
No validation exists for suspicious patterns (same user converting multiple times, unusual session lengths). Production would need anomaly detection on the A/B event stream to flag potential gaming of the system.
Built for the GrabOn VibeCoder Challenge 2025 by Saketh T.
Built with Claude Code for GrabOn VibeCoder Challenge 2025 · Project 02: GrabInsurance
Available Tools
2 toolsclassify_deal_intentA
Classify deal intent and return top insurance products.
Takes a deal object and returns the top 2 insurance products with confidence scores. Uses rule-based classification first, falls back to Claude API if category is unknown.
Args: merchant: Merchant name e.g. "IndiGo", "Samsung", "Zomato" category: One of travel, electronics, food, health, fashion subcategory: Specific subcategory like flight, hotel, gadget, phone deal_value: Deal amount in INR user_history: Optional dict with risk_tier, total_purchases, categories_bought
Returns: ClassificationResult with top_products, cart_context, show_offer, fallback_used
| Name | Required | Description | Default |
|---|---|---|---|
| category | Yes | ||
| merchant | Yes | ||
| deal_value | Yes | ||
| subcategory | Yes | ||
| user_history | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of disclosure. It reveals a key behavioral trait: uses rule-based classification first, then falls back to Claude API if the category is unknown. This gives the agent insight into the tool's decision process. However, it does not disclose potential side effects, authorization needs, or error handling, which would elevate the score further.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is concise and well-structured: a one-line summary, a brief overview of the algorithm, and a clear Args list. Every sentence serves a purpose, and the format is easy to parse quickly.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a tool with 5 parameters, no output schema, and moderate complexity (classification with fallback), the description provides a thorough overview of inputs and high-level output structure (ClassificationResult fields). It covers the essential mechanics but could improve by detailing edge cases or confidence score semantics. Still, it is largely complete for an agent to use correctly.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Given 0% schema description coverage, the description compensates fully by providing explicit explanations for all 5 parameters in the Args section. It includes example values for merchant, enumerates valid category options, defines subcategory examples, specifies deal value in INR, and describes the optional user_history structure. This adds significant meaning beyond the schema's type and title.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb 'classify' and resource 'deal intent', and specifies it returns top insurance products. It also outlines the classification approach (rule-based with fallback to Claude API), making the tool's purpose unambiguous and distinct from the sibling tool 'get_insurance_quote' which likely retrieves quotes rather than classifying intent.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage when a deal object is available and classification of intent into insurance products is needed, but it does not explicitly state when to use this tool versus alternatives like 'get_insurance_quote'. No direct guidance on when not to use or prerequisites is provided, leaving room for ambiguity.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_insurance_quoteA
Calculate premium quote for an insurance product.
Returns a premium quote based on the product's base rate, deal value, and user's risk tier. Premium is floored at Rs 19 and capped at Rs 499.
Args: product_id: Insurance product ID from catalog (e.g., TRVL_CANCEL, ELEC_SCREEN) deal_value: Deal amount in INR risk_tier: User risk tier (low, medium, high)
Returns: PremiumQuote with premium_inr, coverage_inr, validity_days, policy_type
| Name | Required | Description | Default |
|---|---|---|---|
| risk_tier | No | medium | |
| deal_value | Yes | ||
| product_id | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Despite no annotations, the description fully discloses key behaviors: premium floor (Rs 19) and cap (Rs 499), calculation basis (base rate, deal value, risk tier), and default risk tier. No side effects are mentioned, but the tool appears read-only.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is concise and well-structured with a clear first sentence, followed by bullet-like details. The Args/Returns format adds clarity, though it could be slightly more streamlined.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given 3 parameters, no output schema, and no annotations, the description is remarkably complete. It specifies return fields (premium_inr, coverage_inr, validity_days, policy_type), calculation logic, and constraints. No gaps for an agent to interpret.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, but the description adds full semantic meaning: product_id examples, deal_value as INR amount, risk_tier with possible values. This compensates completely for the missing schema descriptions.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states 'Calculate premium quote for an insurance product' with specific verb and resource. It provides examples of product IDs, making the purpose unambiguous. The sibling tool classify_deal_intent is distinctly different, so no confusion.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description explains what the tool does and its inputs, but lacks explicit guidance on when to use it vs. alternatives or when not to use it. There is no mention of prerequisites or context, though the purpose is clear enough for an agent to infer.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
2 tool updates
v0.1.0- First observed
classify_deal_intent - First observed
get_insurance_quote
TDQS
The two tools have clearly distinct purposes: one generates a premium quote for a specific product, the other classifies deal intent and suggests products. No overlap.
Both tools follow a consistent verb_noun pattern: 'get_insurance_quote' and 'classify_deal_intent'. The naming is clear and predictable.
With only two tools, the server feels thin for a domain that likely requires more operations (e.g., listing products, purchasing). It is on the low end of borderline.
The tool surface is missing essential operations like listing available products, purchasing or confirming a policy, and managing user profiles. This leaves significant gaps for typical insurance workflows.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
AI-powered product search, affiliate links, and price negotiation for e-commerce platforms
Co-purchase intelligence and merchant ops tools for AI shopping, ecommerce, and B2B agents
Insurance brokerage for AI agents — quote, bind, and settle in USDC
Agentic commerce with 58 MCP tools for product search, checkout, A2A negotiation, C-Suite analytics.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables AI-powered insurance marketing campaign management with audience targeting recommendations and personalized content generation for different insurance products and marketing channels.-
- FlicenseNot gradedqualityDmaintenanceEnables management of insurance claims, inspections, and contractors through interactive UI widgets and data tools. Users can view claim dashboards, update statuses, and query service provider information using natural language.-
- FlicenseNot gradedqualityNot gradedmaintenanceProvides tools for motor insurance quoting, including vehicle lookups, postcode risk assessments, and premium calculations. It enables users to generate and compare car insurance quotes through natural language interactions.-
- AlicenseNot gradedqualityDmaintenanceEnables customer support across e-commerce platforms by providing order management, product guidance, and account assistance tools through natural language queries.5MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/saketh12e/GrabonInsurance-MCP'
If you have feedback or need assistance with the MCP directory API, please join our Discord server