NPI Registry MCP Server
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@NPI Registry MCP Serversearch for cardiologists in New York City"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
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: mcp-registry
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):
uv pip install npi-registry-mcp-serverOr install from source:
uv pip install git+https://github.com/eliotk/npi-registry-mcp-server.gitUsage ๐
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:
# Search for a specific provider by name
search_npi_registry(first_name="John", last_name="Smith", state="CA")
# Look up a specific NPI
search_npi_registry(npi="1234567890")
# Find organizations in a city
search_npi_registry(organization_name="Hospital", city="Los Angeles", state="CA")
# Search by specialty
search_npi_registry(specialty="cardiology", state="NY", limit=20)
# Find providers in a specific ZIP code area
search_npi_registry(postal_code="902*", state="CA")Response Format ๐
The search returns a structured response with:
{
"success": true,
"count": 5,
"results": [
{
"npi": "1234567890",
"entity_type": "Individual",
"is_organization": false,
"status": "A",
"enumeration_date": "2010-05-05",
"last_updated": "2023-01-15",
"name": {
"first": "John",
"last": "Smith",
"credential": "MD"
},
"addresses": [...],
"practice_locations": [...],
"taxonomies": [...],
"identifiers": [...]
}
]
}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 ๐
{
"mcpServers": {
"npi-registry": {
"command": "uv", # may need full path to executable
"args": [
"--directory",
"/path/to/npi-registry-mcp-server",
"run",
"npi-registry-mcp-server"
]
}
}
}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 ๐
npi-registry-mcp-server/
โโโ src/
โ โโโ npi_registry_mcp/
โ โโโ __init__.py
โ โโโ server.py
โโโ tests/
โโโ pyproject.toml
โโโ README.md
โโโ .gitignoreRunning Tests ๐งช
uv run pytestCode Formatting ๐จ
# Format code
uv run black src/ tests/
# Sort imports
uv run isort src/ tests/
# Lint
uv run ruff check src/ tests/
# Type checking
uv run mypy src/Building the Package ๐ฆ
uv buildAPI 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/
Available Tools
1 toolsearch_npi_registryA
Search the National Provider Identifier (NPI) registry.
The NPI registry contains information about healthcare providers and organizations in the United States. You can search by various criteria including name, NPI number, location, and specialty.
WILDCARD SUPPORT: Most text fields support wildcard searches using '' after at least 2 characters for fuzzy matching (e.g., 'smith', 'hosp*', 'cardi*').
Args: first_name: Provider's first name (supports wildcards: 'john*' matches 'John', 'Johnny', etc.) last_name: Provider's last name (supports wildcards: 'smith*' matches 'Smith', 'Smithson', etc.) organization_name: Organization name (supports wildcards: 'hosp*' matches 'Hospital', 'Hospice', etc.) npi: Specific 10-digit NPI number to look up (exact match only) city: City name (supports wildcards: 'san*' matches 'San Francisco', 'San Diego', etc.) state: State abbreviation (e.g., 'CA', 'NY', 'TX') - exact match only postal_code: ZIP/postal code (supports wildcards: '902*' matches '90210', '90211', etc.) specialty: Provider specialty or taxonomy (supports wildcards: 'cardi*' matches 'Cardiology', 'Cardiac Surgery', etc.) limit: Maximum number of results to return (1-200, default: 10)
Examples: - Find all Smiths: last_name='smith*' - Find hospitals: organization_name='hosp*' - Find cardiologists: specialty='cardio*' - Find providers in San cities: city='san*' - Find providers in 90210 area: postal_code='902*'
Returns: Dictionary containing search results with provider information
| Name | Required | Description | Default |
|---|---|---|---|
| first_name | No | ||
| last_name | No | ||
| organization_name | No | ||
| npi | No | ||
| city | No | ||
| state | No | ||
| postal_code | No | ||
| specialty | No | ||
| limit | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It effectively adds context beyond basic functionality by detailing wildcard support rules (e.g., '*' after at least 2 characters), exact vs. fuzzy matching for parameters like NPI and state, and the default limit of 10 results. It doesn't cover aspects like rate limits or authentication needs, but provides substantial operational guidance.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is well-structured with clear sections (overview, wildcard support, args, examples, returns) and front-loaded key information. It's appropriately sized but could be slightly more concise by integrating some details more tightly. Every sentence adds value, though minor trimming might improve flow.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a search tool with 9 parameters, 0% schema coverage, no annotations, and no output schema, the description is highly complete. It covers purpose, usage, parameter details, examples, and return format. It lacks some advanced behavioral traits like error handling or pagination, but provides enough context for effective use given the complexity.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Given 0% schema description coverage and 9 parameters, the description compensates fully by explaining each parameter's purpose, wildcard support, and constraints (e.g., NPI is exact match, state abbreviations, limit range 1-200). Examples illustrate usage, adding significant value beyond the bare schema. This exceeds the baseline expectation for such low coverage.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool searches the NPI registry for healthcare providers and organizations in the US, specifying the resource (NPI registry) and action (search). It distinguishes the tool's purpose by listing specific search criteria like name, NPI number, location, and specialty, making it highly specific and informative even without sibling tools for comparison.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides clear context on when to use the tool by listing searchable criteria and examples, such as finding providers by name, location, or specialty. However, it lacks explicit guidance on when not to use it or alternatives, which prevents a perfect score. No sibling tools are mentioned, so no comparison is needed.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
TDQS
With only one tool, there is no ambiguity or overlap between tools. The single tool has a clear, distinct purpose of searching the NPI registry, so an agent cannot misselect between multiple tools.
With only one tool, naming consistency is inherently perfect. The tool name 'search_npi_registry' follows a clear verb_noun pattern that would be consistent if more tools existed.
A single tool for an NPI registry server feels too thin for the apparent scope. The registry likely supports more operations beyond search, such as retrieving specific records by ID or filtering by additional criteria, making the tool count insufficient for comprehensive coverage.
The tool surface is severely incomplete for an NPI registry domain. While search is well-implemented with various criteria, there are obvious gaps such as no tools for retrieving a specific provider by NPI number (get_npi), updating records, or managing provider data, which limits agent workflows.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
MCP server for US nursing facility search and ownership lookup (NursingHomeDatabase).
Hosted MCP server for finding authoritative primary data sources and official portals.
Search and browse every MCP server in the Model Context Protocol registry.
Related MCP Servers
- AlicenseBqualityFmaintenanceA Model Context Protocol server providing AI assistants with access to healthcare data tools, including FDA drug information, PubMed research, health topics, clinical trials, and medical terminology lookup.778126MIT
- AlicenseAqualityCmaintenanceAn MCP server designed for interacting with the Model Context Protocol Registry API to discover and retrieve information about available MCP servers. It provides tools to search, list, and view detailed configurations and version history for servers within the registry.4MIT
- AlicenseNot gradedqualityDmaintenanceA Model Context Protocol (MCP) server for searching the National Provider Identifier (NPI) registry. It provides tools to search and retrieve information about healthcare providers and organizations in the United States.MIT
- AlicenseNot gradedqualityDmaintenanceAn MCP server for searching healthcare providers in the US National Provider Identifier (NPI) Registry, enabling natural language queries for provider data in MCP-compatible AI assistants.Apache 2.0
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/eliotk/npi-registry-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server