payer-reference MCP Server
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
payer-reference-mcp
AI agents that handle health-insurance claims need authoritative code data. Left to themselves, they can invent ICD-10 or HCPCS codes or accept invalid NPIs, so this MCP server answers code and identifier lookups from CMS's own public files instead.
Topics: mcp · health-insurance · claims · agent-skills
Only CMS public data is used. There are no AMA CPT descriptions and no member data.
Architecture
flowchart LR
A["Agent<br/>(any MCP client)"] <-->|"MCP over stdio<br/>tools/list · tools/call"| S
subgraph S["payer-reference MCP server — src/payer_reference/server.py"]
T1["icd10_lookup"]
T2["hcpcs_lookup"]
T3["npi_validate"]
end
T1 --> ICD[("ICD-10-CM FY2027<br/>CMS order file")]
T2 --> HC[("HCPCS Level II Jan 2027<br/>CMS ANWEB file")]
T3 --> L["Luhn check digit<br/>80840 prefix"]
S -.->|planned| N[("NCCI edit table")]
S -.->|planned| F[("Synthetic formulary")]
S -.->|planned| C["Cost-share function"]
K["claim-code-validation skill"] -.->|planned| A
classDef planned stroke-dasharray: 5 5,color:#777
class N,F,C,K plannedSolid lines are built in v0.1. Dashed boxes are planned and not in this repo yet (see Roadmap).
Related MCP server: Medical Billing MCP
Quickstart
Requires Python 3.11+, uv, and Node.js (only for MCP Inspector).
git clone https://github.com/gowthams96/payer-reference-mcp.git
cd payer-reference-mcp
uv sync
uv run python scripts/fetch_codes.py # CMS ICD-10-CM FY2027 + HCPCS Jan 2027 -> data/
uv run pytest # offline: tests/fixtures only, no secretsRun the server over stdio. It waits for an MCP client on stdin/stdout:
uv run payer-referenceInspect it with MCP Inspector. The first command opens the web UI, where you choose Connect, then Tools, then List Tools. The second lists the tools from the terminal:
npx @modelcontextprotocol/inspector uv run payer-reference
npx @modelcontextprotocol/inspector --cli uv run payer-reference --method tools/listNo API keys or .env are needed. To serve the small test fixture instead of the
full files, set PAYER_REFERENCE_DATA_DIR=tests/fixtures.
Use from an MCP client
{
"mcpServers": {
"payer-reference": {
"command": "uv",
"args": ["--directory", "/path/to/payer-reference-mcp", "run", "payer-reference"]
}
}
}Tools
Every tool publishes an input JSON schema and an output schema, and returns structured content.
Tool | Inputs | Outputs | Example call |
|
|
|
|
|
| Same as |
|
|
|
|
|
From the terminal:
npx @modelcontextprotocol/inspector --cli uv run payer-reference \
--method tools/call --tool-name icd10_lookup --tool-arg query=E11.9valid flag
Code set |
|
|
ICD-10-CM | Billable (order-file flag 1) | Header/category codes, e.g. |
HCPCS Level II | No termination date, or terminated on/after the file's effective date (2027-01-01) | Terminated earlier, e.g. |
NPI | 10 digits and the Luhn check digit over | Malformed input or a wrong check digit, with a |
Queries
Code lookup: a query that looks like a code gets an exact lookup (case-insensitive). For ICD-10-CM, a query must also contain a digit to count as a code.
Text search: any other query returns up to 10 entries whose description contains every word (case-insensitive), ordered by code.
Errors are tool results with isError: true and structured content:
{"error": {"type": "unknown_code", "message": "'Z99.9' is not in ICD-10-CM FY2027", "query": "Z99.9"}}
| When |
| A code that isn't in the file |
| A text search with no results |
| A blank query |
| CPT-style numeric codes (AMA) or D-codes (CDT, ADA) |
|
|
claim-code-validation skill
Not built yet. No skill ships in v0.1, so there is nothing to install. It is planned as an agent skill that walks an agent through checking a claim's diagnosis codes, procedure codes and NPI with these tools. Install steps will be added here when it exists. See Roadmap.
Data sources and licensing
Data | Source (CMS public files) | File used |
ICD-10-CM FY2027 |
| |
HCPCS Level II, January 2027 |
|
|
The URLs were confirmed on 2026-12-02.
scripts/fetch_codes.pydownloads both files intodata/, which is git-ignored, so no full code files are committed.No AMA CPT content. Only HCPCS Level II is loaded. The parser skips numeric (CPT, Level I) codes and modifier records, and
hcpcs_lookuprefuses CPT-style codes.No ADA CDT content. The HCPCS record layout says D-codes carry the ADA's copyrighted CDT descriptions, so D-codes are skipped too. The January 2027 file contains none.
The test fixture is real CMS data.
tests/fixtures/holds 27 ICD-10-CM and 15 HCPCS codes plus 2 Level II modifier records, copied verbatim byscripts/make_fixture.py.Checked against CMS's own counts. The parser finds 74,879 billable ICD-10-CM codes, which matches CMS's
icd10cm_codes_2027.txt, and 8,929 HCPCS procedure codes.No member data and no PHI. None are used anywhere.
The code is MIT-licensed (LICENSE). The CMS code sets are public data from CMS.
Limitations
Plain word search. Text search has no synonyms, stemming or ranking.
HCPCS validity is judged at the file's effective date. It doesn't check against today's date or a date of service, and HCPCS modifiers aren't available.
npi_validateonly checks format and the check digit. It doesn't query NPPES, sovalid: truedoesn't mean the NPI is assigned to a provider.One release of each code set. Updating to a new fiscal year or quarter means changing the URLs in
scripts/fetch_codes.py.No CPT or dental codes, by design (see licensing).
Not production software. It's a reference tool, not a claims editor or billing advice.
Roadmap
These are not in v0.1:
NCCI edit table: procedure-to-procedure edits.
Synthetic formulary: synthetic data only.
Cost-share function.
claim-code-validation agent skill: with install instructions.
Development
CI.
.github/workflows/ci.ymlrunsuv sync --locked,ruff check,ruff format --checkandpyteston every push and pull request, with no secrets.Tests run offline. An autouse fixture in
tests/conftest.pyfails any test that opens a network connection.SDK version. Built on the official Python MCP SDK
mcp2.3.0 (mcp.server.MCPServer, spec 2026-07-28). Code written formcp1.x should note:FastMCPwas renamedMCPServer.run()defaults to stdio.Tests connect in-process with
Client(server).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Deterministic CMS NCCI/MUE claim scrubbing and CARC/RARC denial explanations, cited to source.
ICD-10-CM / HCC medical coding tools with database-verified accuracy and denial-prevention rules.
Look up NPI numbers in the CMS registry and check providers against the HHS-OIG exclusion list.
Live NIH Clinical Tables lookup for ICD-10-CM, HCPCS, LOINC lab codes, RxTerms, and conditions.
Related MCP Servers
- AlicenseAqualityBmaintenanceHealthcare billing AI for agents — 12 tools for ICD-10/CPT/HCPCS code lookup (80K+ codes), prior auth prediction, medical NER, claims validation, HIPAA compliance auditing, and provider/drug enrichment. Pay-per-call via credits or USDC.32185 npm3MIT
- AlicenseAqualityDmaintenanceEnables AI assistants to look up medical billing codes, denial reasons, and payer rules for faster claim resolution.66MIT
- FlicenseNot gradedqualityDmaintenanceEnables MCP-compatible AI clients to validate healthcare claims data quality by running completeness, integrity, and temporal checks on CSV files via five callable tools, including profiling and full scans.-
- AlicenseNot gradedqualityCmaintenanceEnables local-first lookup of ICD-10-CM codes and diagnosis phrases, returning official descriptions, hierarchy, index references, and applicable Tabular instructions. It also supports conservative synthetic-note candidate suggestions and structural validation of selected code sets for coder review.Apache 2.0