cpt-analysis-mcp-server

cpt-analysis-mcp-server

Connects Claude Desktop to a healthcare claims database for natural-language analysis of CPT codes, reimbursement rates, payer performance, and denial patterns.

Category
Visit Server

README

Healthcare CPT Code Analysis — MCP Server

An MCP (Model Context Protocol) server that connects Claude Desktop to a healthcare claims database, enabling natural-language analysis of CPT codes, reimbursement rates, payer performance, and denial patterns.

Built to demonstrate how MCP bridges the gap between AI assistants and domain-specific data systems in the healthcare/PBM space.

Architecture

Claude Desktop                    MCP Server (Python)                SQLite Database
┌──────────────┐     JSON-RPC    ┌─────────────────┐               ┌───────────────┐
│              │◄──── stdio ────►│                 │◄── queries ──►│ cpt_codes     │
│  User asks   │                 │  6 Tools        │               │ payers        │
│  questions   │                 │  3 Resources    │               │ payer_rates   │
│  in plain    │                 │  2 Prompts      │               │ claims (10K)  │
│  English     │                 │                 │               │ denial_reasons│
└──────────────┘                 └─────────────────┘               └───────────────┘

How it works:

  1. Claude Desktop starts this server as a subprocess
  2. The server announces its tools (functions Claude can call)
  3. When you ask a question, Claude decides which tool(s) to use
  4. The server queries SQLite and returns structured results
  5. Claude interprets the data and responds in natural language

What's Inside

Tools (Functions Claude Can Call)

Tool Purpose Example Question
lookup_cpt_code Get details for a specific CPT code "What is CPT 27447?"
query_claims Filter and search claims data "Show me denied surgery claims over $5000"
analyze_reimbursement Compare rates across payers "How do payers compare for radiology rates?"
detect_anomalies Find pricing outliers "Where are we billing way above the allowed amount?"
denial_analysis Investigate denial patterns "What are the top denial reasons for Aetna?"
compare_payers Side-by-side payer comparison "Which payer pays the most for cardiac procedures?"
financial_summary Revenue and collection reporting "Show me financials by category for Q2"

Resources (Context Claude Can Read)

  • schema://claims-database — Full database schema with column descriptions
  • schema://cpt-categories — CPT code category reference with rate ranges
  • data://summary-stats — Quick overview of the entire dataset

Prompts (Structured Analysis Templates)

  • analyze-claim — Step-by-step analysis of a specific claim
  • rate-review — Comprehensive payer/category rate review for contract negotiations

Dataset

  • 70 CPT codes across 5 categories (E&M, Surgery, Radiology, Pathology, Medicine)
  • 7 payers (5 commercial + Medicare + Medicaid)
  • 10,000 claims with realistic denial patterns (~15% denial rate)
  • 490 payer rate schedules (7 payers × 70 codes)
  • Medicare rates based on 2024 CMS Physician Fee Schedule
  • CARC denial reason codes from real 835 remittance standards

Setup

Prerequisites

  • Python 3.11+
  • Claude Desktop (with MCP support)

Install

git clone https://github.com/Ishaan24687/cpt-analysis-mcp-server.git
cd cpt-analysis-mcp-server
pip install -r requirements.txt

Seed the Database

python -m src.seed_data

This creates cpt_analysis.db with all reference data and synthetic claims.

Connect to Claude Desktop

  1. Open Claude Desktop settings
  2. Go to Developer > Edit Config
  3. Add the server config from claude_desktop_config.json:
{
  "mcpServers": {
    "cpt-analysis": {
      "command": "python",
      "args": ["-m", "src.server"],
      "cwd": "/path/to/cpt-analysis-mcp-server"
    }
  }
}
  1. Restart Claude Desktop
  2. You should see "cpt-analysis" in the MCP tools list (hammer icon)

Demo Conversations

Once connected, try these in Claude Desktop:

Overview:

"Give me an overview of the claims data"

CPT Lookup:

"What is CPT 27447 and how much do different payers reimburse for it?"

Denial Investigation:

"Which CPT codes have the highest denial rates? What are the main reasons?"

Payer Comparison:

"Compare all payers for surgery procedures — who pays the best and who denies the most?"

Anomaly Detection:

"Find pricing anomalies where we're billing more than 3x the allowed amount"

Contract Negotiation Prep:

"I'm preparing for a rate negotiation with UnitedHealthcare for radiology services. Give me a complete analysis."

Project Structure

cpt-analysis-mcp-server/
├── src/
│   ├── __init__.py
│   ├── server.py          # MCP server — tools, resources, prompts
│   ├── database.py         # SQLite schema and connection management
│   └── seed_data.py        # Realistic healthcare data generation
├── claude_desktop_config.json
├── requirements.txt
├── .gitignore
└── README.md

Why MCP?

Traditional approach: Copy data from database → paste into ChatGPT → get generic answer.

MCP approach: Ask Claude a question → Claude queries your actual database → get a specific, data-backed answer.

MCP turns an AI assistant from a "smart text generator" into a "smart analyst with direct access to your systems." For healthcare operations teams dealing with claims data, this means faster root cause analysis, better contract negotiation prep, and real-time anomaly detection — all through natural conversation.

Tech Stack

  • MCP SDK (mcp[cli]) — Protocol implementation
  • SQLite — Zero-config database (production would use Azure SQL / PostgreSQL)
  • Python 3.12 — Server runtime
  • Claude Desktop — MCP host application

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured