The NPI Registry provides searchable access to U.S. healthcare provider records, including National Provider Identifier (NPI) numbers, names, specialties, practice addresses, contact details, and organization affiliations. Look up individual clinicians and healthcare organizations to verify provider information and support healthcare administration workflows.
The fastmcp library is a Python client for MCP servers. Use it to call MewCP tools from your own scripts and services.
This guide connects NPI Registry MCP to Python through MewCP, so Python can use NPI Registry MCP's 3 tools, like npi_validate, npi_lookup and npi_search.
NPI Registry MCP needs no credentials, but every call still runs through MewCP: scoped, checked and logged like any other.
More apps
Crawl websites and extract clean structured data optimized for AI applications and automation. Collect content from the web at scale while maintaining high-quality outputs.
Extract structured data from websites and public web pages. Fetch content, parse information and transform online data into formats that can be consumed by applications, agents and workflows.
TinyFish MCP for running AI-driven browser automation tasks, deep web research, persistent browser login profiles, remote CDP browser sessions, and agentic wallet payments.
Scrape, extract, and understand the web, plus identify any company from a domain, email, name, or transaction string. This MCP server exposes Context.dev's API for web scraping in multiple formats (raw HTML, Markdown, screenshots, images, sitemaps, and web search), schema-driven structured data extraction, design-system extraction (styleguides and fonts), and brand intelligence lookups. It's built for AI agents that read, summarize, or monitor web content, for enriching CRM, KYC, or fintech pipelines with company and brand data, and for extracting a competitor's design system or structured product and pricing data at scale.
Other clients
NPI Registry MCP works the same way in every client below. Pick yours for its own guide.
Free to start.
Scope access to the exact NPI Registry MCP tools and accounts you allow, work and personal side by side. Anything outside that scope is refused at call time, even when the model asks for it.
Each call is logged: what ran, on which account, and whether it worked. Failures come back structured, so the agent knows whether to retry instead of guessing.
Every app sits behind one secure MCP URL, and there is no server for you to deploy or keep running. Add an integration in the dashboard and it is live on the next call, with no config to change and no new credentials to wire up. Tools load only when a task needs them, so your agent stays fast and focused however many apps you connect.
SDK clients sign in with an API key. Create one in your dashboard and replace API_KEY in the code below.
SDK clients run without a browser, so they sign in with your API key.
Validate NPI format and Luhn check digit. Instant local validation - no API call. WHEN TO USE: - ALWAYS use before npi_lookup to catch typos and save API calls - Validating NPI numbers from external sources (documents, forms, databases) - Quick format check without network dependency - Pre-filtering lists of NPIs before bulk lookups WHAT THIS CHECKS: 1. Format: Exactly 10 digits, numeric characters only (0-9) 2. Check digit: Valid Luhn algorithm calculation with healthcare prefix (80840) WHAT THIS DOES NOT CHECK: - Whether the NPI is actually assigned to a provider in NPPES - Whether the provider is active or deactivated - Whether the provider is licensed or credentialed - Whether the NPI has ever been issued VALIDATION RESULTS: ✓ VALID: NPI has correct format AND valid check digit -> Proceed to npi_lookup to verify assignment ✗ INVALID FORMAT: Not 10 digits or contains non-numeric characters -> Cannot be a real NPI, check for typos ✗ INVALID CHECK DIGIT: 10 digits but check digit doesn't match -> Likely a typo in one of the digits IMPORTANT: A valid check digit does NOT guarantee the NPI exists! Many mathematically valid NPIs have never been assigned. Use npi_lookup after validation to confirm the NPI is in NPPES. EXAMPLES: - '1234567893' -> VALID (correct format + valid check digit) - '123456789' -> INVALID (only 9 digits) - '1234567890' -> INVALID (wrong check digit, expected 3) - '123456789X' -> INVALID (contains non-digit character) - ' 1234567893 ' -> VALID (whitespace is stripped automatically)
Get comprehensive provider details by NPI number from the CMS NPPES Registry. WHEN TO USE: - You have a specific NPI and need full provider information - Verifying provider credentials, specialty, or practice location - Following up on results from npi_search to get complete details - Cross-referencing clinical trial investigators with US credentials - Getting raw API response for advanced data extraction USE npi_search INSTEAD FOR: - Finding providers by name, location, or specialty - When you don't have a specific NPI number - Browsing providers in a geographic area WHAT THIS RETURNS: Basic Information: - Provider type: Individual (NPI-1) or Organization (NPI-2) - Name: Full name (individuals) or Legal Business Name (organizations) - Credentials: MD, DO, RN, PA-C, NP, etc. (for individuals) - Status: 'A' (Active) or 'D' (Deactivated) - Enumeration date: When the NPI was first assigned - Last updated: When the record was last modified Specialty/Taxonomy: - Primary taxonomy code: NUCC healthcare provider taxonomy code - Primary taxonomy description: Human-readable specialty name - License state and number: From primary taxonomy Location: - Practice address: Primary practice location with full address - Phone number: Practice telephone (if available) Advanced: - Raw API response: Complete NPPES data including: - All taxonomies (up to 15) - Other identifiers (state license, DEA, etc.) - Other practice locations - Authorized officials (for organizations) - Endpoints (health information exchange) NOTE: Automatically validates NPI format before API call. Returns found=false if NPI is valid but not assigned to any provider. IMPORTANT CAVEATS: - Having an NPI does NOT guarantee the provider is currently licensed - Provider self-reports data; NPPES does not verify accuracy - Deactivated providers remain in database but should not be used for billing - Verify credentials through state licensing boards for official confirmation
Search the CMS NPPES Registry for healthcare providers by name, location, specialty, or organization. WHEN TO USE: - Finding providers by name (e.g., 'Find Dr. John Smith') - Finding providers by specialty (e.g., 'Cardiologists in Boston') - Finding organizations (e.g., 'Mayo Clinic locations') - Verifying clinical trial investigators have US credentials - Building provider networks by location or specialty - Finding all providers at a specific facility USE npi_lookup INSTEAD FOR: - When you already have a specific NPI number - Getting full details including raw API response SEARCH REQUIREMENTS: - At least one search parameter required (besides enumeration_type/country_code) - State cannot be the only criterion - must combine with name, specialty, or city - Country code alone only works for non-US countries WILDCARD SUPPORT (min 2 characters before *): - first_name: 'Jo*' matches John, Joseph, Jonathan - last_name: 'Smi*' matches Smith, Smithson, Smitty - organization_name: 'Mayo*' matches Mayo Clinic, Mayo Foundation - taxonomy_description: 'Cardio*' matches Cardiology, Cardiovascular Disease - postal_code: '212*' matches all ZIP codes starting with 212 NAME ALIAS FEATURE (DEFAULT: ON): Automatically expands first name searches to include common nicknames: - Robert -> also finds Bob, Rob, Robbie, Bobby - William -> also finds Bill, Will, Billy, Willy - Elizabeth -> also finds Beth, Liz, Betty, Eliza - Michael -> also finds Mike, Mick, Mickey Set use_first_name_alias=false for exact match only. PAGINATION: - Maximum 200 results per request (limit parameter) - Skip up to 1000 records (skip parameter) - Maximum 1,200 total results accessible (6 requests × 200) - Use next_skip from response to get next page - Set limit=200 for comprehensive searches COMMON SPECIALTY SEARCHES (taxonomy_description): - Physicians: 'Internal Medicine', 'Family Practice', 'Cardiology', 'Oncology' - Surgeons: 'Orthopedic Surgery', 'General Surgery', 'Neurosurgery' - Mental Health: 'Psychiatry', 'Psychology', 'Clinical Social Worker' - Allied Health: 'Physical Therapist', 'Nurse Practitioner', 'Physician Assistant' - Organizations: 'General Acute Care Hospital', 'Pharmacy', 'Clinical Laboratory' EXAMPLES: - Find cardiologists in Boston: taxonomy_description='Cardiology', city='Boston', state='MA' - Find Dr. Smith (individual): first_name='John', last_name='Smith', enumeration_type='NPI-1' - Find Mayo Clinic (organization): organization_name='Mayo Clinic', enumeration_type='NPI-2' - Find oncologists in California: taxonomy_description='Oncology', state='CA', limit=100 - Find all pharmacies in NYC: taxonomy_description='Pharmacy', city='New York', state='NY' - Find nurse practitioners in Texas: taxonomy_description='Nurse Practitioner', state='TX' - Exact name match: first_name='Robert', use_first_name_alias=false