← Back to POCs

NPI Registry MCP Server — Semantic Provider Search for AI Agents

Live
AI/ML

The NPPES NPI Registry is public but designed for human navigation — not programmatic access. This MCP server wraps it in a structured, agent-callable API, exposing six tools that let AI assistants search providers by name or location, validate NPIs, and resolve plain-language specialties to NUCC taxonomy codes via a local FAISS-backed RAG pipeline.

System Overview

Inputs

  • Provider name, location, specialty terms
  • Natural-language conditions ("heart doctor")
  • NPI numbers for lookup or validation

Core Processing

  • FAISS vector index for semantic similarity
  • Async NPPES REST API client (httpx)
  • Redis / Upstash cache layer (1-hr TTL)

MCP Tools

  • search_providers
  • get_provider_by_npi
  • validate_npi / get_npi_for_provider
  • resolve_taxonomy
  • semantic_search

Compatible Clients

  • Claude Desktop
  • Cursor & Windsurf
  • Any JSON-RPC 2.0 MCP client
  • FastAPI /mcp endpoint

Architecture

Key Capabilities

  • Semantic provider search — query "cardiologist in Boston" without knowing taxonomy codes; FAISS + sentence-transformers resolve the intent
  • NUCC taxonomy resolution — maps natural-language specialties to standard codes via vector similarity search
  • NPI lookup & validation with Mod 97-10 checksum algorithm
  • Redis / Upstash caching (1-hour TTL) reduces NPPES API load for repeated queries
  • Six MCP tools — clean separation between tool execution and LLM reasoning; no client-side prompt engineering required
  • ~85% test coverage — 119 tests spanning unit, integration, contract, and E2E suites
  • Apache 2.0 open source — forkable for other public healthcare registries

Open source and ready to use — explore the full implementation on GitHub.

View on GitHub