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.
README
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
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-server -
Install uv (if not already installed):
curl -LsSf https://astral.sh/uv/install.sh | sh -
Create 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-server
Or install from source:
uv pip install git+https://github.com/eliotk/npi-registry-mcp-server.git
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:
# 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
└── .gitignore
Running Tests 🧪
uv run pytest
Code 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 build
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-name - Make your changes and add tests
- Run the test suite:
uv run pytest - Format 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
/docsdirectory - API 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/
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。