Skip to main content
Glama
rajmohancoder

Insurance Premium Calculator

Insurance Premium Calculator - MCP Server

A simple Model Context Protocol (MCP) server that provides insurance premium calculation services. This server implements three main tools for calculating and comparing insurance premiums.

Features

Tools Available

  1. Calculate Basic Premium - Calculates basic insurance premium based on age, coverage amount, and policy type

  2. Calculate Health Premium with Conditions - Calculates health insurance premium including pre-existing conditions and smoking status

  3. Compare Policies - Compares premium for all policy types (term, health, vehicle) for a given age and coverage

Related MCP server: RACV Insurance MCP Server

Installation

npm install

Usage

Running the Server

To run the MCP server with the inspector:

npx @modelcontextprotocol/inspector node index.js

The server will start and display "Insurance Premium Calculator MCP Server is running!" when ready.

Tools Documentation

1. calculate_basic_premium

Calculates basic insurance premium based on age, coverage and policy type.

Parameters:

  • age (number): Age of the person (18-80)

  • coverage_amount (number): Coverage amount in rupees

  • policy_type (enum): Type of insurance policy ("term", "health", "vehicle")

2. calculate_health_premium

Calculates health insurance premium including pre-existing conditions.

Parameters:

  • age (number): Age of the person

  • coverage_amount (number): Coverage amount in rupees

  • pre_existing_condition (enum): Pre-existing health condition ("none", "diabetes", "hypertension", "heart_disease")

  • smoker (boolean): Whether the person is a smoker

3. compare_policies

Compares premium for all policy types for a given age and coverage.

Parameters:

  • age (number): Age of the person

  • coverage_amount (number): Coverage amount in rupees

Technology Stack

  • Node.js

  • @modelcontextprotocol/sdk - MCP server implementation

  • Zod - Data validation

Testing with Claude Desktop

  1. Ensure you have Claude Desktop installed

  2. Run the MCP server:

    npx @modelcontextprotocol/inspector node index.js
  3. Open Claude Desktop

  4. Connect to the MCP server:

    • Claude Desktop should automatically detect the running MCP server

    • If not, you may need to follow the instructions in Claude Desktop to manually connect to a local MCP server

  5. Test the tools:

    • Use the Claude Desktop interface to interact with the MCP server

    • You can test each tool by providing the required parameters

    • Example prompts:

      • "Calculate the basic term insurance premium for a 35-year-old with ₹500,000 coverage"

      • "What's the health insurance premium for a 40-year-old non-smoker with ₹1,000,000 coverage and diabetes?"

      • "Compare all policy types for a 30-year-old with ₹750,000 coverage"

  6. View results: Claude Desktop will display the JSON responses from the MCP server in a readable format

Note

Claude Desktop provides an intuitive interface for interacting with MCP servers without having to write custom code. It supports tool discovery, parameter validation, and response visualization.

Available Tools

3 tools
calculate_basic_premiumC

Calculates basic insurance premium based on age, coverage and policy type

ParametersJSON Schema
NameRequiredDescriptionDefault
ageYesAge of the person (18-80)
coverage_amountYesCoverage amount in rupees
policy_typeYesType of insurance policy

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool calculates a premium but doesn't describe how the calculation works, whether it's deterministic or approximate, if there are rate limits, or what the output format is. For a calculation tool with zero annotation coverage, this lacks critical behavioral context.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that front-loads the core purpose. It wastes no words but could be slightly more structured by including usage context. It's appropriately sized for a simple tool, though it lacks depth that might be needed given the absence of annotations.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (a calculation with 3 parameters), lack of annotations, and no output schema, the description is incomplete. It doesn't explain the calculation method, output format, or error conditions. The agent is left guessing about behavioral aspects, making this inadequate for reliable tool invocation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents all parameters with descriptions and constraints. The description adds no additional meaning beyond what the schema provides, such as explaining interactions between parameters or calculation logic. Baseline 3 is appropriate when the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb 'calculates' and the resource 'basic insurance premium', making the purpose evident. It distinguishes from sibling tools like 'calculate_health_premium' by specifying it handles multiple policy types, though it doesn't explicitly contrast with 'compare_policies'. The description is specific but could be more precise about its scope relative to siblings.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention sibling tools like 'calculate_health_premium' or 'compare_policies', nor does it specify prerequisites, exclusions, or appropriate contexts. Usage is implied by the parameters but not explicitly stated, leaving the agent to infer when this tool is suitable.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

calculate_health_premiumC

Calculates health insurance premium including pre-existing conditions

ParametersJSON Schema
NameRequiredDescriptionDefault
ageYesAge of the person
coverage_amountYesCoverage amount in rupees
pre_existing_conditionYesPre-existing health condition
smokerYesWhether the person is a smoker

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the tool calculates premiums including pre-existing conditions, but doesn't describe what the calculation returns (e.g., a numeric value, structured data), error conditions, rate limits, or authentication needs. For a calculation tool with zero annotation coverage, this leaves significant gaps.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that directly states the tool's purpose without unnecessary words. It's appropriately sized and front-loaded, with every word earning its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity of a premium calculation tool with no annotations and no output schema, the description is insufficient. It doesn't explain what the tool returns (e.g., a premium amount, breakdown details), how pre-existing conditions affect the calculation, or any behavioral aspects. This leaves the agent guessing about the tool's output and usage.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents all four parameters thoroughly. The description mentions 'including pre-existing conditions', which aligns with one parameter but doesn't add meaningful semantic context beyond what the schema provides. Baseline 3 is appropriate when the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb 'calculates' and the resource 'health insurance premium', specifying it includes pre-existing conditions. However, it doesn't explicitly differentiate from sibling tools like 'calculate_basic_premium' or 'compare_policies', which likely have related but distinct purposes.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives like 'calculate_basic_premium' or 'compare_policies'. It doesn't mention prerequisites, exclusions, or contextual factors that would help an agent choose appropriately among siblings.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

compare_policiesB

Compares premium for all policy types for a given age and coverage

ParametersJSON Schema
NameRequiredDescriptionDefault
ageYesAge of the person
coverage_amountYesCoverage amount in rupees

TDQS

B3.2/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries full burden. It states the tool 'compares premium' but doesn't disclose behavioral traits like whether it's read-only, what the output format is (e.g., list, table), or any constraints (e.g., rate limits, authentication needs). This is a significant gap for a tool with no annotation coverage.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence with zero waste—front-loaded and appropriately sized for the tool's purpose. Every word earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no annotations, no output schema, and a tool that performs comparison (implying potential complexity), the description is incomplete. It lacks details on output format, behavioral constraints, and how it differs from siblings, making it inadequate for full agent understanding.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents both parameters (age, coverage_amount). The description adds no additional meaning beyond implying these are used for comparison, matching the baseline when schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('compares premium') and scope ('for all policy types'), with specific inputs ('given age and coverage'). It distinguishes from sibling tools by covering multiple policy types rather than specific ones like 'basic' or 'health', though it doesn't explicitly name the siblings.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage when needing premium comparisons across policy types, but doesn't explicitly state when to use this versus the sibling tools (calculate_basic_premium, calculate_health_premium) or any exclusions. Context is clear but lacks alternative guidance.

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.

  1. 3 tool updatesv1.0.0
    • First observedcalculate_basic_premium
    • First observedcalculate_health_premium
    • First observedcompare_policies

TDQS

B3.3/5.0
Disambiguation5/5

Each tool has a clearly distinct purpose: calculate_basic_premium handles standard insurance, calculate_health_premium focuses on health-specific factors, and compare_policies provides comparison across types. There is no overlap or ambiguity between these functions.

Naming Consistency5/5

All tools follow a consistent verb_noun pattern with snake_case (calculate_basic_premium, calculate_health_premium, compare_policies). The naming is predictable and readable throughout the set.

Tool Count3/5

With only 3 tools, the set feels thin for an insurance premium calculator domain. While the tools cover core calculations and comparison, additional operations like updating policies or handling claims might be expected, making the count borderline for the scope.

Completeness3/5

The tools cover basic premium calculations and comparison, but there are notable gaps for a full insurance domain, such as missing CRUD operations for policies, handling claims, or managing customer data. Agents can work around this for simple tasks but may fail in more complex scenarios.

Maintenance

ActivityInactive
ResponsivenessNo issues

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

Related MCP Servers

  • A
    license
    Not graded
    quality
    D
    maintenance
    A comprehensive MCP server that enables file operations, mathematical calculations with unit conversions, and system information retrieval. Provides secure access to local file system, calculator functions with statistics, and system monitoring capabilities.
    16
    ISC
  • F
    license
    Not graded
    quality
    Not graded
    maintenance
    Provides 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.
    -
  • A
    license
    Not graded
    quality
    D
    maintenance
    An MCP server that enables AI agents to interact with GEICO insurance services, including getting quotes, managing policies, filing claims, making payments, retrieving ID cards, requesting roadside assistance, and reporting accidents.
    18
    1
    MIT
  • F
    license
    Not graded
    quality
    C
    maintenance
    This server enables AI agents to provide insurance recommendations, validate user profiles, generate contract drafts, and manage electronic signature workflows with human approval.
    -

Latest Blog Posts

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/rajmohancoder/simple-mcp-test'

If you have feedback or need assistance with the MCP directory API, please join our Discord server