Skip to content

Feature: add reusable InsuranceSalesDemo MCP server #30

@itprodirect

Description

@itprodirect

Objective

Add a real, reusable MCP server entry point for the existing sample insurance sales workflow so users can see MCP tools exposed outside the notebook.

Context

The repo already has business utility functions and CLI commands for sample insurance sales data. The next step is to expose a small subset of those functions through a FastMCP server that can be inspected and called by MCP-capable clients.

Scope

  • Add src/mcp101/server.py or an equivalent module.
  • Expose a simple FastMCP server named something like InsuranceSalesDemo.
  • Add a package script entry point such as mcp101-server = "mcp101.server:main".
  • Reuse existing business functions where possible.
  • Add unit tests around any new pure helper logic.
  • Update README/docs with the new server command.

Candidate tools

  • calculate_total_premium
  • calculate_total_commission
  • list_policies_by_state
  • summarize_lead_sources

Exact names can differ if the implementation reads better.

Acceptance criteria

  • mcp101-server starts a FastMCP server over stdio.
  • The server uses tracked sample data by default.
  • The implementation avoids real client data and does not require secrets.
  • Existing CLI behavior remains unchanged.
  • New server code avoids writing protocol-corrupting logs to stdout.
  • Tests cover any new data summarization helpers.
  • README or docs include a minimal run command and expected behavior.

Non-goals

  • Do not add remote Streamable HTTP deployment.
  • Do not add claims triage workflows.
  • Do not add write-capable tools.
  • Do not add a database dependency.

Validation

python -m pip install -r requirements.txt
ruff check .
mypy --strict .
pytest -q
mcp101-cli commission data/insurance_sales.csv

Manual smoke test:

mcp101-server

Suggested Codex /goal summary

Create a minimal FastMCP server that exposes the existing sample insurance-sales calculations as safe read-only MCP tools.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions