Content
# MCP Provider Search
An MCP server for searching 9.4M+ US healthcare providers with geographic proximity queries. Built for insurance litigation research — find providers by specialty within a radius, assess network adequacy, and cross-reference Medicare enrollment status.
## Features
- **9.4M+ providers** from the NPPES NPI Registry (updated monthly)
- **PostGIS proximity queries** — find providers within X miles of any ZIP code
- **Specialty search** via 879 NUCC taxonomy codes
- **Network adequacy analysis** — provider counts at 15/30/60 mile tiers
- **Medicare enrollment** cross-referencing (2.5M PECOS records)
- **Opt-out tracking** (54K providers who've opted out of Medicare)
- **MCP protocol** endpoint for Claude.ai and other MCP clients
- **REST API** with Swagger docs
## MCP Tools
| Tool | Description |
|------|-------------|
| `provider_search` | Search by name, specialty, state, ZIP, or NPI |
| `provider_nearby` | Find providers within X miles of a ZIP code |
| `network_adequacy` | Count providers at 15/30/60 mile tiers for a specialty |
| `provider_detail` | Full NPI record with taxonomies and enrollment status |
| `taxonomy_search` | Look up NUCC specialty codes |
## Quick Start
### Connect via MCP (Claude.ai)
Add as a connector in Claude.ai:
- **URL:** `https://providers.wyldfyre.ai/mcp`
- **Authentication:** None required
### REST API
```bash
# Health check
curl https://providers.wyldfyre.ai/health
# Search providers
curl "https://providers.wyldfyre.ai/providers/search?q=smith&specialty=cardiology&state=CO"
# Find nearby providers
curl "https://providers.wyldfyre.ai/providers/nearby?zip=80202&miles=30&specialty=psychiatry"
# Network adequacy analysis
curl "https://providers.wyldfyre.ai/providers/network-adequacy?zip=80202&specialty=psychiatry"
# Provider detail
curl "https://providers.wyldfyre.ai/providers/1234567890"
# Taxonomy search
curl "https://providers.wyldfyre.ai/taxonomy/search?q=mental+health"
```
Full Swagger docs: https://providers.wyldfyre.ai/docs
## Self-Hosting
### Prerequisites
- Python 3.12+
- PostgreSQL 16 with PostGIS 3.4
- ~15GB disk for NPPES data
### Setup
```bash
# Install dependencies
pip install -r requirements.txt
# Set database URL
export DATABASE_URL="postgresql://user:pass@localhost:5432/providers"
# Create database with PostGIS
psql -c "CREATE DATABASE providers;"
psql -d providers -c "CREATE EXTENSION postgis; CREATE EXTENSION pg_trgm;"
# Download and load NPPES data (~20 min)
cd data && curl -O "https://download.cms.gov/nppes/NPPES_Data_Dissemination_March_2026_V2.zip"
cd .. && python scripts/load_nppes.py data/NPPES_Data_Dissemination_March_2026_V2.zip
# Load PECOS enrollment and Opt-Out data
python scripts/load_pecos_optout.py
# Start REST API
uvicorn app.main:app --host 0.0.0.0 --port 8100
# Start MCP server (separate process)
python run_mcp.py
```
## Data Sources
All data is from free, publicly available US government APIs:
| Source | Records | Auth | Update Frequency |
|--------|---------|------|-----------------|
| [NPPES NPI Registry](https://download.cms.gov/nppes/NPI_Files.html) | 9.4M providers | None | Monthly full, weekly incremental |
| [NUCC Taxonomy](https://www.nucc.org) | 879 codes | None | Twice/year |
| [PECOS Enrollment](https://data.cms.gov) | 2.5M records | None | Quarterly |
| [CMS Opt-Out List](https://data.cms.gov) | 54K records | None | Monthly |
| [Census ZCTA Centroids](https://www.census.gov/geographies/reference-files/time-series/geo/gazetteer-files.html) | 33K ZIP codes | None | Annual |
## Architecture
```
┌─────────────────────┐
│ Claude.ai / MCP │
│ Clients │
└────────┬────────────┘
│ MCP Protocol
┌────────▼────────────┐
│ providers.wyldfyre │
│ .ai/mcp │
└────────┬────────────┘
│
┌──────────────┼──────────────┐
│ │ │
┌─────────▼───┐ ┌──────▼─────┐ ┌─────▼──────┐
│ PostgreSQL │ │ FastAPI │ │ MCP Server │
│ + PostGIS │ │ REST API │ │ (FastMCP) │
│ (9.4M rows) │ │ :8100 │ │ :8101 │
└─────────────┘ └────────────┘ └────────────┘
```
## License
MIT