NPI Registry MCP Server π₯
A Model Context Protocol (MCP) server for searching the National Provider Identifier (NPI) registry. This server provides tools to search and retrieve information about healthcare providers and organizations in the United States.
Overview π
NPI is a unique identification number for covered health care providers in the United States. This MCP server allows Claude and other MCP-compatible clients to search the official NPI registry maintained by the Centers for Medicare & Medicaid Services (CMS), and integrates the results into an LLM context for enhanced analysis and insights.
Features β¨
Search by Provider Name: Find individual healthcare providers by first name, last name, or both
Search by Organization: Look up healthcare organizations by name
Search by NPI Number: Direct lookup using a specific 10-digit NPI
Location-based Search: Filter results by city, state, or postal code
Specialty Search: Find providers by their specialty or taxonomy description
Comprehensive Data: Returns detailed information including addresses, practice locations, specialties, and other identifiers
Use Cases π‘
Verify healthcare provider credentials
Find provider contact information and addresses
Look up organization details and authorized officials
Validate NPI numbers
Research provider specialties and taxonomies
Find providers in specific geographic areas
Related MCP server: cve-search_mcp
Installation π
Prerequisites π
Python 3.10 or higher
uv package manager
Development Setup π οΈ
Clone the repository:
git clone https://github.com/eliotk/npi-registry-mcp-server.git cd npi-registry-mcp-serverInstall uv (if not already installed):
curl -LsSf https://astral.sh/uv/install.sh | shCreate a virtual environment and install dependencies:
uv venv source .venv/bin/activate # On Windows: .venv\Scripts\activate uv pip install -e ".[dev]"Run the server directly (for testing):
uv run python -m npi_registry_mcp.server # or using the entry point: uv run npi-registry-mcp-server
Production Installation π
Install from PyPI (once published):
Or install from source:
Usage π
Available Tools π οΈ
search_npi_registry π
Search the NPI registry with various criteria:
Parameters:
first_name(optional): Provider's first namelast_name(optional): Provider's last nameorganization_name(optional): Organization namenpi(optional): Specific 10-digit NPI numbercity(optional): City namestate(optional): State abbreviation (e.g., 'CA', 'NY')postal_code(optional): ZIP/postal code (supports wildcards)specialty(optional): Provider specialty or taxonomylimit(optional): Maximum results to return (1-200, default: 10)
Examples:
Response Format π
The search returns a structured response with:
Claude Desktop Configuration π₯οΈ
To use this MCP server with Claude Desktop, add the following configuration to your Claude Desktop config file:
macOS π
Location: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows πͺ
Location: %APPDATA%/Claude/claude_desktop_config.json
Configuration π
Verification β
Save the configuration file
Restart Claude Desktop completely
Look for the π§ icon in Claude Desktop to verify the server is connected
Try asking Claude: "Search for doctors named Smith in California"
Development π¨βπ»
Project Structure π
Running Tests π§ͺ
Code Formatting π¨
Building the Package π¦
API Reference π
This server uses the official NPI Registry API provided by CMS:
Base URL: https://npiregistry.cms.hhs.gov/api/
Documentation: https://npiregistry.cms.hhs.gov/registry/help-api
Rate Limits: The API has reasonable rate limits for normal usage
Data Sources ποΈ
All data comes directly from the official NPI Registry maintained by:
Centers for Medicare & Medicaid Services (CMS)
U.S. Department of Health and Human Services
Contributing π€
Fork the repository
Create a feature branch:
git checkout -b feature-nameMake your changes and add tests
Run the test suite:
uv run pytestFormat your code:
uv run black src/ tests/Submit a pull request
License π
MIT License - see LICENSE file for details.
Support π
Issues: Report bugs and request features via GitHub Issues
Documentation: Additional documentation available in the
/docsdirectoryAPI Questions: Refer to the official NPI Registry API documentation
Changelog π
v0.1.0 π
Initial release
Basic NPI registry search functionality
Support for individual and organization searches
Location and specialty filtering
Comprehensive provider data retrieval
For more information about the Model Context Protocol, visit: https://modelcontextprotocol.io/