Package Exports
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@uh-joan/healthcare-data-mcp-server) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Healthcare Data MCP Server
This server provides access to healthcare data through three main tools:
nlm_search_icd10
: Search for ICD-10-CM codes using the National Library of Medicine (NLM) APInlm_search_npi_providers
: Search for healthcare providers using the National Library of Medicine's (NLM) National Provider Identifier (NPI) databasecms_search_providers
: Search Medicare Physician & Other Practitioners data for 2023 using the Centers for Medicare & Medicaid Services (CMS) database
About this Server
- Project:
healthcare_data_mcp_server
- Version: 0.1
- License: MIT
Tool Descriptions
NLM ICD-10-CM Search
The nlm_search_icd10
tool provides access to the National Library of Medicine's (NLM) ICD-10-CM code database.
Parameters
terms
(string, required): The search string for which to find matches in the listmaxList
(number, default: 500): Specifies the number of results requested, up to the upper limit of 500count
(number, default: 500): The number of results to retrieve (page size)offset
(number, default: 0): The starting result number (0-based) to retrieveq
(string): An optional, additional query string used to further constrain the resultsdf
(string, default: "code,name"): A comma-separated list of display fieldssf
(string, default: "code,name"): A comma-separated list of fields to be searchedcf
(string, default: "code"): A field to regard as the 'code' for the returned item dataef
(string): A comma-separated list of additional fields to be returned for each retrieved list item
Example Queries
- Search for tuberculosis-related diagnoses:
curl -X POST http://localhost:3005/nlm_search_icd10 \
-H "Content-Type: application/json" \
-d '{
"terms": "tuberc"
}'
- Search for specific respiratory tuberculosis diagnoses:
curl -X POST http://localhost:3005/nlm_search_icd10 \
-H "Content-Type: application/json" \
-d '{
"terms": "tuberc",
"q": "code:A15*"
}'
NLM NPI Provider Search
The nlm_search_npi_providers
tool provides access to the National Library of Medicine's (NLM) National Provider Identifier (NPI) database, allowing searches for healthcare providers by name, location, provider type, and other criteria.
Parameters
terms
(string, required): Search terms (name, NPI, or other identifiers). Multiple words are ANDed togethermaxList
(number, default: 500): Maximum number of results to returncount
(number, default: 500): Number of results per page. Use for paginationoffset
(number, default: 0): Starting result number. Use for paginationq
(string): Additional query constraints. Examples:addr_practice.city:Bethesda
provider_type:Physician
provider_type:Organization
addr_practice.state:NY AND provider_type:Individual
df
(string): Comma-separated list of fields to display in resultssf
(string): Comma-separated list of fields to search inef
(string): Comma-separated list of extra fields to include
Example Queries
- Search for providers in Bethesda:
curl -X POST http://localhost:3005/nlm_search_npi_providers \
-H "Content-Type: application/json" \
-d '{
"terms": "john",
"q": "addr_practice.city:Bethesda AND provider_type:Physician",
"sf": "NPI,name.full,provider_type,addr_practice.city",
"df": "NPI,name.full,provider_type,addr_practice"
}'
- Search for organizations with detailed address:
curl -X POST http://localhost:3005/nlm_search_npi_providers \
-H "Content-Type: application/json" \
-d '{
"terms": "hospital",
"q": "provider_type:Organization",
"ef": "taxonomy,addr_practice",
"df": "NPI,name.full,provider_type,addr_practice,taxonomy",
"count": 2
}'
CMS Medicare Provider Search
The cms_search_providers
tool provides access to Medicare Physician & Other Practitioners data using the Centers for Medicare & Medicaid Services (CMS) database. This data includes information about services and procedures provided to Original Medicare Part B beneficiaries. The tool supports data from 2013 to the latest available year, defaulting to the latest year if not specified.
Parameters
dataset_type
(required): Type of dataset to searchgeography_and_service
: Use when you need to:- Compare regions
- Analyze geographic patterns
- Study regional variations in healthcare delivery
- Understand geographic distribution of healthcare services
- Calculate per-capita/per-beneficiary rates by region
provider_and_service
: Use when you need to:- Analyze individual provider performance
- Track specific procedures by provider
- Calculate total procedures across providers
- Study provider-level service patterns and outcomes
provider
: Use when you need to:- Analyze provider demographics
- Study provider participation in Medicare
- Understand provider practice patterns
- Examine provider-level beneficiary characteristics and risk scores
year
(optional): Year of the dataset to query (2023 to latest available year, defaults to latest year). Note that data availability may vary by year and dataset type.hcpcs_code
(optional): HCPCS code to search for (e.g., '99213' for established patient office visit). Can be used to analyze specific procedures or services.provider_type
(optional): Type of provider to search for (e.g., 'Cardiology', 'Podiatry', 'Family Practice'). Supports partial matches and is case-insensitive.geo_level
(optional): Geographic level for filtering (e.g., "National", "State", "County", "ZIP"). Use with geo_code to filter results by specific geographic areas.geo_code
(optional): Geographic code to filter by (e.g., 'CA' for California, '06037' for Los Angeles County). Must match the geo_level specified.place_of_service
(optional): Place of service code to filter by (e.g., 'F' for facility, 'O' for office, 'H' for hospital). See CMS documentation for complete list of codes.size
(optional): Number of results to return (default: 10, max: 5000). Use with offset for pagination of large result sets.offset
(optional): Starting result number for pagination (default: 0). Use with size to navigate through large result sets.sort_by
(optional): Field to sort results by. Common fields include 'Tot_Srvcs' (total services), 'Tot_Benes' (total beneficiaries), 'Tot_Mdcr_Pymt_Amt' (total Medicare payment).sort_order
(optional): Sort order ("asc" or "desc", default: "desc").
Response Fields
The response fields vary by dataset type:
For geography_and_service
dataset:
Rndrng_Prvdr_Geo_Lvl
: Geographic level (National, State, County, ZIP)Rndrng_Prvdr_Geo_Cd
: Geographic code (e.g., 'CA' for California)Rndrng_Prvdr_Geo_Desc
: Geographic descriptionHCPCS_Cd
: HCPCS codeHCPCS_Desc
: Description of the service/procedureHCPCS_Drug_Ind
: Indicates if the service is drug-relatedPlace_Of_Srvc
: Place of service codeTot_Rndrng_Prvdrs
: Total number of rendering providersTot_Benes
: Total number of beneficiariesTot_Srvcs
: Total number of servicesTot_Bene_Day_Srvcs
: Total beneficiary days of serviceAvg_Sbmtd_Chrg
: Average submitted chargeAvg_Mdcr_Alowd_Amt
: Average Medicare allowed amountAvg_Mdcr_Pymt_Amt
: Average Medicare payment amountAvg_Mdcr_Stdzd_Amt
: Average standardized Medicare payment amount
For provider_and_service
dataset:
Rndrng_NPI
: Provider's National Provider IdentifierRndrng_Prvdr_Last_Org_Name
: Provider's last name or organization nameRndrng_Prvdr_First_Name
: Provider's first nameRndrng_Prvdr_MI
: Provider's middle initialRndrng_Prvdr_Crdntls
: Provider's credentialsRndrng_Prvdr_Ent_Cd
: Provider's entity typeRndrng_Prvdr_St1
: Provider's street addressRndrng_Prvdr_City
: Provider's cityRndrng_Prvdr_State_Abrvtn
: Provider's stateRndrng_Prvdr_Zip5
: Provider's ZIP codeRndrng_Prvdr_Type
: Provider's specialty/typeRndrng_Prvdr_Mdcr_Prtcptg_Ind
: Medicare participating indicatorHCPCS_Cd
: HCPCS codeHCPCS_Desc
: Description of the service/procedurePlace_Of_Srvc
: Place of service codeTot_Benes
: Total number of beneficiariesTot_Srvcs
: Total number of servicesTot_Bene_Day_Srvcs
: Total beneficiary days of serviceAvg_Sbmtd_Chrg
: Average submitted chargeAvg_Mdcr_Alowd_Amt
: Average Medicare allowed amountAvg_Mdcr_Pymt_Amt
: Average Medicare payment amountAvg_Mdcr_Stdzd_Amt
: Average standardized Medicare payment amount
For provider
dataset:
Rndrng_NPI
: Provider's National Provider IdentifierRndrng_Prvdr_Last_Org_Name
: Provider's last name or organization nameRndrng_Prvdr_First_Name
: Provider's first nameRndrng_Prvdr_MI
: Provider's middle initialRndrng_Prvdr_Crdntls
: Provider's credentialsRndrng_Prvdr_Ent_Cd
: Provider's entity typeRndrng_Prvdr_St1
: Provider's street addressRndrng_Prvdr_City
: Provider's cityRndrng_Prvdr_State_Abrvtn
: Provider's stateRndrng_Prvdr_Zip5
: Provider's ZIP codeRndrng_Prvdr_Type
: Provider's specialty/typeRndrng_Prvdr_Mdcr_Prtcptg_Ind
: Medicare participating indicatorTot_HCPCS_Cds
: Total number of unique HCPCS codesTot_Benes
: Total number of beneficiariesTot_Srvcs
: Total number of servicesTot_Sbmtd_Chrg
: Total submitted chargesTot_Mdcr_Alowd_Amt
: Total Medicare allowed amountTot_Mdcr_Pymt_Amt
: Total Medicare payment amountTot_Mdcr_Stdzd_Amt
: Total standardized Medicare payment amountBene_Avg_Age
: Average beneficiary ageBene_Age_LT_65_Cnt
: Number of beneficiaries under 65Bene_Age_65_74_Cnt
: Number of beneficiaries aged 65-74Bene_Age_75_84_Cnt
: Number of beneficiaries aged 75-84Bene_Age_GT_84_Cnt
: Number of beneficiaries over 84Bene_Feml_Cnt
: Number of female beneficiariesBene_Male_Cnt
: Number of male beneficiariesBene_Race_Wht_Cnt
: Number of white beneficiariesBene_Race_Black_Cnt
: Number of black beneficiariesBene_Race_API_Cnt
: Number of Asian/Pacific Islander beneficiariesBene_Race_Hspnc_Cnt
: Number of Hispanic beneficiariesBene_Race_NatInd_Cnt
: Number of Native American beneficiariesBene_Race_Othr_Cnt
: Number of beneficiaries of other racesBene_Dual_Cnt
: Number of dual-eligible beneficiariesBene_Ndual_Cnt
: Number of non-dual-eligible beneficiariesBene_Avg_Risk_Scre
: Average beneficiary risk score
Example Queries
Geography and Service Dataset Examples
- Find all office visits (HCPCS 99213) in California for 2023:
{
"dataset_type": "geography_and_service",
"geo_level": "State",
"geo_code": "CA",
"hcpcs_code": "99213",
"year": 2023
}
- Compare knee replacement procedures (HCPCS 27447) across different states:
{
"dataset_type": "geography_and_service",
"geo_level": "State",
"hcpcs_code": "27447",
"year": 2023,
"sort": "Tot_Srvcs",
"order": "desc",
"limit": 10
}
- Analyze Medicare spending on specific procedures in Los Angeles County:
{
"dataset_type": "geography_and_service",
"geo_level": "County",
"geo_code": "06037",
"hcpcs_code": "27130",
"year": 2023
}
- Compare average Medicare payments for specific procedures across ZIP codes:
{
"dataset_type": "geography_and_service",
"geo_level": "ZIP",
"hcpcs_code": "99214",
"year": 2023,
"sort": "Avg_Mdcr_Pymt_Amt",
"order": "desc",
"limit": 5
}
Provider and Service Dataset Examples
- Find providers performing knee replacements in California:
{
"dataset_type": "provider_and_service",
"geo_level": "State",
"geo_code": "CA",
"hcpcs_code": "27447",
"year": 2023,
"sort": "Tot_Srvcs",
"order": "desc",
"limit": 10
}
- Search for cardiologists performing specific procedures:
{
"dataset_type": "provider_and_service",
"provider_type": "Cardiology",
"hcpcs_code": "93010",
"year": 2023,
"sort": "Tot_Srvcs",
"order": "desc"
}
- Find providers in a specific ZIP code performing office visits:
{
"dataset_type": "provider_and_service",
"geo_level": "ZIP",
"geo_code": "90210",
"hcpcs_code": "99213",
"year": 2023
}
- Compare providers' Medicare payment amounts for specific procedures:
{
"dataset_type": "provider_and_service",
"hcpcs_code": "27130",
"year": 2023,
"sort": "Avg_Mdcr_Pymt_Amt",
"order": "desc",
"limit": 5
}
Provider Dataset Examples
- Find top providers by total services in California:
{
"dataset_type": "provider",
"geo_level": "State",
"geo_code": "CA",
"year": 2023,
"sort": "Tot_Srvcs",
"order": "desc",
"limit": 10
}
- Search for providers by specialty with beneficiary demographics:
{
"dataset_type": "provider",
"provider_type": "Orthopedic Surgery",
"year": 2023,
"sort": "Tot_Benes",
"order": "desc"
}
- Find providers in a specific county with high-risk beneficiaries:
{
"dataset_type": "provider",
"geo_level": "County",
"geo_code": "06037",
"year": 2023,
"sort": "Bene_Avg_Risk_Scre",
"order": "desc"
}
- Compare providers' Medicare payment patterns:
{
"dataset_type": "provider",
"year": 2023,
"sort": "Tot_Mdcr_Pymt_Amt",
"order": "desc",
"limit": 5
}
Common Use Cases
Geographic Analysis
- Compare healthcare utilization across different regions
- Identify areas with high or low service volumes
- Analyze regional variations in Medicare payments
- Track service patterns by geographic level
Provider Analysis
- Identify high-volume providers
- Compare provider practice patterns
- Analyze provider-level beneficiary characteristics
- Track provider participation in Medicare
Service Analysis
- Compare utilization of specific procedures
- Analyze Medicare payment patterns
- Track service volumes over time
- Identify trends in healthcare delivery
Beneficiary Analysis
- Analyze beneficiary demographics
- Track risk scores and health status
- Compare dual-eligible vs. non-dual-eligible populations
- Monitor age and gender distributions
Payment Analysis
- Compare submitted charges vs. Medicare payments
- Analyze payment variations by region
- Track standardized payment amounts
- Monitor Medicare payment trends
API Endpoints
POST /nlm_search_icd10
POST /nlm_search_npi_providers
POST /cms_search_providers
Usage
HTTP Mode
To run the server in HTTP mode:
USE_HTTP=true PORT=3005 npm start
The server will be available at http://localhost:3005
with the following endpoints:
POST /nlm_search_icd10
POST /nlm_search_npi_providers
POST /cms_search_providers
GET /health
(health check endpoint)
MCP Mode
To run the server in MCP mode:
npm start
The server will communicate via stdin/stdout using the Model Context Protocol.
Notes
ICD-10-CM Search
- Results are limited to 500 items per request
- The search is case-insensitive
- Multiple words in the search terms are ANDed together
NPI Search
- Results are limited to 500 items per request
- The search is case-insensitive
- Multiple words in the search terms are ANDed together
- Provider types include: Physician, Organization, Individual, etc.
Medicare Provider Search
- The data is from the 2023 Medicare Physician & Other Practitioners dataset
- Place of service codes: "F" for facility, "O" for office
- Drug indicator "Y" indicates the service involves a drug
- All monetary amounts are in USD
- Geographic codes follow standard state/county/ZIP code formats
- Results are limited to 5000 items per request
Terms of Service
This server is provided as-is, without any warranty. The data is sourced from the National Library of Medicine and Centers for Medicare & Medicaid Services. Please refer to their respective terms of service for usage restrictions and requirements.