Access the NPPES NPI Registry API (no authentication required for public data): GET requests to the registry API endpoint with query parameters such as number (NPI), name (first_name, last_name or organization_name), taxonomy description, city, state, and postal_code
Parse the response JSON: results array contains provider objects with 'number' (NPI), 'enumeration_type' (NPI-1 individual, NPI-2 organizational), 'basic' object (name, status, certification date), 'addresses' array (practice and mailing locations), and 'taxonomies' array
From 'taxonomies': extract 'code' (10-character NUCC taxonomy code), 'desc' (taxonomy description), 'primary' boolean flag (true for the primary specialty), and 'state'/'license' for state license numbers when present
Validate provider identity by matching the returned NPI status field to 'A' (active) — an 'D' (deactivated) or missing NPI indicates the provider is not eligible for billing; also check the enumeration date to confirm the NPI predates the claim service date
For building a provider directory, perform bulk download via the NPPES NPI data dissemination file (full replacement or weekly incremental) rather than individual API calls; the dissemination file is available as a CSV download from the CMS website
Cache NPI lookup results with a weekly refresh cycle aligned with the NPPES weekly update cycle; implement a staleness check so that provider records older than 7 days are re-queried before being used for claim submission
Known gotchas
The NPPES API is rate-limited for high-volume queries; for bulk validation of thousands of providers use the NPPES data dissemination download rather than individual API calls to avoid being throttled or blocked
A valid active NPI does not confirm that the provider is credentialed with a specific payer or enrolled in Medicare/Medicaid; NPI validation is a necessary but not sufficient check for claim submission eligibility
Individual providers (NPI-1) can have multiple taxonomy codes; always check which taxonomy is marked 'primary' and which taxonomies map to the service being billed — submitting a claim under a taxonomy code not associated with the NPI can cause a credentialing-based denial
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp