Medical Codes Mcp Server

io.github.cyanheads由 GitHub 帳號 cyanheads 發布v0.5.1更新於 Oct 29, 2026

Offline US medical code lookup and crosswalk — ICD-10-CM/PCS, HCPCS Level II, RxNorm. Keyless.

已驗證Streamable HTTP可網頁執行資料庫知識與記憶資料與分析

概覽

AI 產生的概覽

離線美國醫療編碼查詢:以內建索引解碼、搜尋、驗證並交叉對應 ICD-10-CM/PCS、HCPCS Level II 與 RxNorm 編碼。

可以做什麼
  • 將一個或多個編碼解碼為官方描述,自動辨識所屬編碼系統,並可把 NDC 解析為 RxNorm 藥品
  • 依官方描述全文搜尋,從臨床概念找到對應編碼,可依系統、僅可申報、章節篩選
  • 驗證編碼是否存在、是否為現行版本以及是否可申報,並對不可申報或已終止的編碼說明原因
  • 在階層中查詢編碼的父層與子層,並在藥品名稱、RXCUI、NDC、成分、品牌與 RxClass 藥物類別之間對應
  • 不需搜尋詞即可瀏覽某編碼系統的階層結構
  • 列出內建編碼系統及其發行版本、生效日期、編碼數量與 RxClass 類別層版本
適用情境
適合助理在沒有網路連線、沒有 API 金鑰的情況下查詢、驗證或交叉比對美國診斷、處置、耗材、藥品與藥物類別編碼,例如草擬或核對理賠相關資料、探索編碼階層時使用。
執行需求
可作為遠端託管端點使用,也可透過 npx 在本機執行(Node.js 或 Bun;README 指出原始碼建置需 Bun 1.4+ 或 Node.js 24+)。不需 API 金鑰或帳號,編碼資料庫隨套件提供。選用變數涵蓋傳輸方式、HTTP 主機/連接埠/路徑、驗證模式、日誌等級、資料庫路徑與預設分頁大小。
安裝前請注意
僅供參考:結果不構成臨床、編碼或給付建議,可申報判定也不等於承保決定;送出前須對照官方發行版本與付款方規則確認。資料新舊取決於建置時打包的版本。僅限美國範圍,不含 CPT、SNOMED CT 與 LOINC。部分選用設定(例如 LOG_TOOL_FAILURE_PAYLOADS)會記錄失敗工具呼叫的參數。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Medical Codes Mcp Server,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Web executable,透過 Streamable HTTP。 遠端服務在工作區中設定後即可從網頁執行環境執行。

交給代理程式安裝

把這段提示詞貼上到 Claude Code、Codex、Cursor 等代理程式,或 SourceWeft 對話中。代理程式會讀取該伺服器的安裝指南,先向你展示發布者、端點和登入方式,經你同意後再把它新增到你的客戶端。金鑰不會寫進任何命令。

閱讀 https://sourceweft.com/mcp/io.github.cyanheads%2Fmedical-codes-mcp-server/install.md,並按其中說明把這個 MCP 伺服器接入我的客戶端。修改任何設定之前,先告訴我它的發布者、端點和登入方式,等我確認。不要把 API 金鑰寫進命令或我會提交的檔案;問我金鑰應從哪裡取得。

檢視代理程式所依據的安裝指南

其他 MCP 客戶端

把它新增到你客戶端的 mcpServers 設定中。

{
  "mcpServers": {
    "medical-codes": {
      "type": "http",
      "url": "https://medical-codes.caseyjhand.com/mcp"
    }
  }
}

README

@cyanheads/medical-codes-mcp-server

Decode, search, validate, and crosswalk US medical codes — ICD-10-CM, ICD-10-PCS, HCPCS Level II, RxNorm — over a bundled offline index via MCP. STDIO or Streamable HTTP.

6 Tools


[!NOTE] Informational, not clinical or coding advice. This server returns official code descriptions and billable/validity flags from public-domain federal releases to help you decode and look up codes. It is not medical advice, and a valid_billable result is not a coding or reimbursement decision. Always verify codes against the official source releases (CMS, CDC/NCHS, NLM) and your payer's rules before submitting a claim. The bundled data is only as current as the release baked into the build — call medcode_list_systems to see exactly which releases are active.

Overview

US medical codes — ICD-10-CM, ICD-10-PCS, HCPCS Level II, and RxNorm with RxClass drug classes — searchable offline from official federal releases. Decode, search, check billability, and crosswalk codes, drugs, NDCs, and drug classes.

Tools

ToolDescription
medcode_get_codeDecode 1–50 codes to their official descriptions. Auto-detects the system per code; partial-success found / notFound, with codes past a 24,000-byte reply returned in deferred for the next call.
medcode_search_codesFull-text search over official descriptions — go from a clinical description to the code.
medcode_check_codeValidate a code's existence, currency, and billability, with a whyNot for non-billable/terminated cases.
medcode_map_codesCrosswalk a code within its hierarchy (parents/children), a drug across RxNorm (name ↔ RXCUI, NDC ↔ RXCUI, RXCUI → ingredients/brands), or a drug to its RxClass classes and a class to its member drugs.
medcode_browse_hierarchyWalk a system's hierarchy for discovery without a search term.
medcode_list_systemsList bundled systems with release identifiers, effective dates, and code counts, and the RxClass layer with each source's version (provenance).

How it works

Only freely-redistributable, public-domain US federal code sets are bundled, baked into a single SQLite + FTS5 database at package-build time and opened read-only at startup.

Bundled code systems

SystemSourceCovers
ICD-10-CMCDC/NCHS — US federal, public domainDiagnoses (billable leaf codes + non-billable category headers)
ICD-10-PCSCMS — US federal, public domainInpatient procedures (axis-based 7-character codes)
HCPCS Level IICMS — US federal, public domainSupplies, drugs, and non-physician services
RxNormNLM RxNav — public domainDrugs: name ↔ RXCUI, NDC ↔ RXCUI crosswalk, ingredients, and brands
RxClass drug classesNLM RxClass — US government sources onlyClasses of the RxNorm drugs: pharmacologic class, mechanism of action, physiologic effect, pharmacokinetics, therapeutic category, chemical structure, diseases treated/prevented and contraindications, VA class, DEA schedule, CVX vaccine code

RxNorm bundles the current normalized drug vocabulary — ingredients, brand names, clinical & branded drugs, and packs, with their NDC and ingredient/brand crosswalks — sourced at build time from the keyless RxNav REST API, which serves the public-domain normalized layer only. The full UMLS-licensed RxNorm release is intentionally excluded, so the package stays freely redistributable.

RxClass is a class layer over those drugs, not a code system: 20,723 classes and 87,269 drug–class edges, fetched at build time from the keyless RxClass API. Six sources are bundled, all US government works: MEDRT (VA MED-RT — mechanism, physiologic effect, pharmacokinetics, chemical structure, and disease relations), FDASPL (FDA established pharmacologic classes and related classes from structured product labels), FMTSME (therapeutic categories), VA (VA National Formulary classes), RXNORM (DEA controlled-substance schedules), and CDC (CVX vaccine codes). Four are excluded: ATC and ATCPROD, whose WHO terms bar copying and distribution for commercial purposes; SNOMEDCT, which is under the SNOMED CT Affiliate license; and DAILYMED, which repeats FDASPL's edges almost exactly (8,696 of its 8,710) and publishes no version.

This product uses publicly available data courtesy of the U.S. National Library of Medicine (NLM), National Institutes of Health, Department of Health and Human Services; NLM is not responsible for the product and does not endorse or recommend this or any other product.

CPT (AMA copyright) and SNOMED CT / LOINC (UMLS-license-gated) are intentionally absent — not freely redistributable, so they cannot ship in an offline package.

US scope. ICD-10-CM and ICD-10-PCS are the US clinical modifications, not the WHO ICD-10/ICD-11 base or another country's national modification.

Capability reference

medcode_get_code tool

  • Accepts 1–50 codes; mixed systems are fine — each code's system is detected independently from its shape
  • Decodes a National Drug Code (NDC) directly to its RxNorm product — hyphenated FDA segment configurations (4-4-2, 5-3-2, 5-4-1, or the 11-digit 5-4-2) or bare 10/11 digits — offline via the bundled NDC↔RxNorm map, tagged source: "NDC"
  • Partial success: resolved codes in found, unresolved in notFound with a per-code reason — a bare integer that resolves nowhere is named as a possible CPT / HCPCS Level I code, which is out of scope, except a bare 10/11-digit one, which is named as an NDC no bundled drug maps to; a dotted all-digit value in ICD-9-CM form (250.00) is named as ICD-9-CM, which is not bundled; and an ICD-10-PCS section value (0) looked up under system: "ICD10PCS" is named as a section, not a code
  • A code written in ICD-10-CM dotted form (A01.00) resolves to ICD-10-CM; an explicit system overrides auto-detection when a value is genuinely ambiguous (an ambiguous code lists its candidateSystems) and skips the NDC decode; includeHierarchy attaches each code's parent and immediate children
  • Each reply holds structuredContent and the content[] text to 24,000 bytes apiece. Codes are decoded in request order, and once one has resolved, a code that would carry the reply past the budget comes back unprocessed in deferred, as sent, with every code after it. Re-call with codes set to deferred and the same system and includeHierarchy until no deferred comes back; together the replies hold the same found and notFound, in the same order, that one unbounded reply would. Three kinds of code are never deferred and can carry a reply past the budget: the first code that resolves, which always comes back whole (under a raised MEDCODE_MAX_RESULTS, one code with hundreds of children passes the budget on its own); the codes before it; and the unresolved codes after the last one that resolves, so a re-call always holds a code that resolves and never fails with no_codes_found or ambiguous_system
  • alsoInSystems names other bundled systems holding the same code string — it is a different code in each
  • RxNorm rows carry billable: null (RxNorm has no billing concept) and shortDescription: null (RxNorm publishes a single name); chapter holds the RxNorm term type (IN, SCD, SBD, …)
  • Errors: ambiguous_system when every requested code is present in more than one bundled system and no system is given, with the union of those systems in candidateSystems; no_codes_found when none of the requested codes resolve otherwise — in any bundled system, or under an explicit system in that system — naming any other bundled system that holds a code, each code present in more than one system, and the section values, bare integers, ICD-9-CM forms, and NDCs among the misses

medcode_search_codes tool

  • Every search term must appear — matched first as a token prefix, then as a substring, so inflected and compound forms are also found; an RxNorm concept matches on its drug name alone, never its term type
  • Filter by system, billableOnly (exclude headers/categories, terminated HCPCS codes, and every RxNorm concept — RxNorm has no billing concept), and chapter (for RxNorm, the term type)
  • Ranked by full-text relevance; results echo the resolved system per row
  • Paginates via cursor/limit (default MEDCODE_MAX_RESULTS, ceiling 200); discloses truncated/nextCursor, and returns a notice with the parsed query when nothing matches

medcode_check_code tool

  • Discriminated status: valid_billable, valid_not_billable, valid_header, valid, or terminated — valid_header covers an ICD-10-CM category, a HCPCS range bucket, and an ICD-10-PCS table row; valid is a current RxNorm concept, returned with billable: null because RxNorm has no billing concept
  • whyNot explains non-billable/terminated cases — a non-billable or terminated code is a successful result, not an error
  • A HCPCS code is terminated once its termination date (the last date CMS allows it on a claim) has passed, read against the UTC date of the call; until then it checks as billable, with that date in whyNot
  • A code written in ICD-10-CM dotted form (A01.00) resolves to ICD-10-CM; alsoInSystems names other bundled systems holding the same code string, since the verdict applies only to the resolved system
  • Errors: unknown_code (absent from the named system, or with no system from every bundled system, naming every system the code's shape fits (for a dotted ICD-10-CM form, ICD-10-CM alone) — under an explicit system, a code another bundled system holds is named as that system's code, and under ICD10PCS a section value (0) as a section that medcode_browse_hierarchy lists; a dotted all-digit value in ICD-9-CM form (250.00, 724.2) is never read as an RXCUI and is named as ICD-9-CM, which is not bundled; an NDC lands here too, including a well-formed bare 10/11-digit one no bundled drug maps to, with a recovery pointing at medcode_get_code and medcode_map_codes ndc_to_rxcui) and ambiguous_system (present in multiple systems, no system given)

medcode_map_codes tool

  • Hierarchy directions parents/children walk one level per call (depth-1). A code's parent is the nearest ancestor the release holds as a code: an ICD-10-CM code padded with the placeholder X steps past a padding level that is not a code (S82.66XA → S82.66). An ICD-10-PCS three-character table row's children are the complete codes that begin with it, and a complete code's parent is its table row (0DTJ4ZZ → 0DT). RxNorm concepts have no code hierarchy
  • Drug directions (RxNorm): name_to_rxcui (matches the drug name, never the term type), ndc_to_rxcui/rxcui_to_ndc (NDC accepted hyphenated in an FDA segment configuration — 4-4-2, 5-3-2, 5-4-1, or the 11-digit 5-4-2 — or as bare 10/11 digits), rxcui_to_ingredients/rxcui_to_brands. Each name_to_rxcui, ndc_to_rxcui, rxcui_to_ingredients, and rxcui_to_brands hit carries the target's conceptType: IN/PIN/MIN/BN for ingredients and brands, SCD/SBD/GPCK/BPCK for drug products (every ndc_to_rxcui hit is one)
  • Drug-class directions (RxClass): rxcui_to_classes returns an RXCUI's classes, and class_to_rxcuis a class ID's direct member RXCUIs, each with its RxNorm name and conceptType. Each hit carries classType, source (the RxClass source asserting it), and relation (has_epc, may_treat, …) — one hit per class × source × relation. A relation starting ci_ (ci_with, ci_moa, ci_pe, ci_chemclass) is a contraindication, not an indication
  • RxClass attaches most classes to ingredients, so a drug product also returns its ingredients' classes, naming the ingredient in via (an IN over its PIN); inheritance runs upward only. DEA schedules are recorded only on drug products, and VA classes almost only there: map a product for those — an ingredient's empty SCHEDULE or VA result says so rather than reading as unscheduled or unclassified. Membership is direct: a class whose drugs all attach to its subclasses (N0000193873 "Diuretic") returns no members, and the class hierarchy is not walked
  • Class IDs match case-insensitively, and a one-digit CVX vaccine code reads as its zero-padded ID (3 is CVX 03)
  • classType (EPC, MOA, PE, PK, TC, CHEM, DISEASE, VA, SCHEDULE, CVX) narrows the two class directions and is rejected on every other
  • children, name_to_rxcui, rxcui_to_ndc, rxcui_to_classes, and class_to_rxcuis paginate via cursor/limit — one RXCUI can carry thousands of package NDCs and one class thousands of members; limit and cursor are rejected on every other direction, and system steers only parents/children (the drug and class directions accept only RXNORM)
  • Every hit carries source provenance so a chained call uses the right identifier; a resolvable source with no edge in the requested direction is a successful empty result with a notice, not an error — a brand name has no classes, for instance
  • Errors:
    • no_mapping: the source doesn't resolve. The message names what was sent instead when it can tell: a code-system name (recovered to the input the direction takes), an NDC or class ID where an RXCUI belongs, a bare integer that may be an out-of-scope CPT / HCPCS Level I code, a dotted all-digit value in ICD-9-CM form (not bundled), an ICD-10-PCS section value under system: "ICD10PCS", or a code that another bundled system holds. An ndc_to_rxcui miss says whether the NDC is malformed or simply maps to no bundled drug
    • field_not_applicable: a system, classType, limit, or cursor the direction does not use
    • direction_unavailable: RxNorm, or for the class directions the RxClass layer, is not bundled in this build
    • ambiguous_system

medcode_browse_hierarchy tool

  • With no node: top-level entries (ICD-10-CM categories, HCPCS range buckets, ICD-10-PCS first-axis values); with a node: its immediate children
  • ICD-10-CM/HCPCS use a prefix hierarchy; ICD-10-PCS is axis-based and only the top-level Section axis is browsable — positions 2–7 are context-dependent and not enumerable from a flat partial code, so medcode_map_codes children lists the complete codes in a table row
  • Paginates via cursor/limit (default MEDCODE_MAX_RESULTS, ceiling 200)
  • Errors: unknown_node when the node doesn't exist (or, for ICD-10-PCS, uses an out-of-alphabet character or begins no bundled code)

medcode_list_systems tool

  • No input; returns one entry per bundled system with releaseId, effectiveStart/effectiveEnd, codeCount, sourceUrl, and builtAt
  • builtAt dates the system's data: for ICD-10-CM, ICD-10-PCS, and HCPCS, the time the index was built from the named release; for RxNorm, which publishes no release label, the date the RxNav snapshot was fetched, so a rebuild from the same snapshot reports the same date
  • classLayer reports the RxClass layer apart from the code systems: its class and edge counts, and per source the RxClass version (null where RxClass publishes none — CDC), the classes and edges it contributes, and the date the RxClass snapshot was fetched; null on a build without the layer
  • Confirms exactly which ICD-10-CM/PCS fiscal year, HCPCS release, RxNorm snapshot, and RxClass sources are baked into the running build

Features

Built on @cyanheads/mcp-ts-core: stdio and Streamable HTTP transports, pluggable auth (none / jwt / oauth), swappable storage (in-memory, filesystem, Supabase, Cloudflare KV/R2/D1), structured logging with optional OpenTelemetry tracing.

ICD-10 / HCPCS / RxNorm-specific:

  • Bundled SQLite + FTS5 index — offline, keyless, deterministic; no runtime network I/O, no rate limit
  • Code-shape auto-detection routes a code to its system automatically, and a code in ICD-10-CM dotted form resolves to ICD-10-CM, while a dot between two digits keeps a value from being read as an RXCUI; an explicit system disambiguates collisions
  • Real billable/validity signal from the source releases — the order-file billable flag and, for HCPCS, the termination date read against the date of the call drive medcode_check_code, not a heuristic; RxNorm, which has no billing concept, reports billable: null rather than a verdict

Agent-friendly output:

  • Provenance on every response — the resolved system is echoed for chaining, alsoInSystems flags a code string that means something different in another bundled system, and medcode_list_systems reports exactly which release is baked into the build
  • Graceful partial failure — medcode_get_code returns per-code found/notFound rows instead of failing the batch
  • Discriminated output contracts — medcode_check_code's typed status and medcode_map_codes' source let callers branch on data, not string parsing

Getting started

The code database ships with the server — there is no API key to obtain and nothing to download at runtime.

Connect to the hosted instance, no install:

sh
claude mcp add --transport http medical-codes-mcp-server https://medical-codes.caseyjhand.com/mcp

Or run it locally:

sh
claude mcp add medical-codes-mcp-server -- npx -y @cyanheads/medical-codes-mcp-server

For other clients, add this to the MCP config file:

json
{  "mcpServers": {    "medical-codes-mcp-server": {      "command": "npx",      "args": ["-y", "@cyanheads/medical-codes-mcp-server"]    }  }}

For Docker or a source build, see Running the server.

Configuration

The server is offline and keyless — there are no required variables. Two server-specific knobs and the standard framework vars apply:

VariableDescriptionDefault
MEDCODE_DB_PATHAbsolute path override for the bundled SQLite index. Set only to point at a custom-built or externally-mounted database.packaged data/medical-codes.db
MEDCODE_MAX_RESULTSDefault page size when a call sends no limit — medcode_search_codes, medcode_browse_hierarchy, and the paginated medcode_map_codes directions — and the number of children medcode_get_code attaches with includeHierarchy.50 (ceiling 200)
MCP_TRANSPORT_TYPETransport: stdio or http.stdio
MCP_HTTP_PORTPort for the HTTP server.3010
MCP_HTTP_ENDPOINT_PATHEndpoint path where the MCP server is mounted./mcp
MCP_SESSION_MODEHTTP session handling: stateless, stateful, or auto (which resolves to stateful). src/index.ts declares stateless — no tool asks the caller for input mid-call — and this variable overrides that declaration.stateless
MCP_AUTH_MODEAuth mode: none, jwt, or oauth.none
MCP_LOG_LEVELLog level (RFC 5424).info
LOG_TOOL_FAILURE_PAYLOADSLog each failed tool call's arguments and result (key-name redaction only), capped by LOG_TOOL_FAILURE_PAYLOAD_MAX_BYTES.false
OTEL_ENABLEDEnable OpenTelemetry instrumentation.false
OTEL_EXPORTER_OTLP_ENDPOINTOTLP base URL; traces export to /v1/traces and metrics to /v1/metrics.—
OTEL_EXPORTER_OTLP_LOGS_ENDPOINTOpt-in OTLP log export; the base endpoint never enables it.—

See .env.example for the full list of optional overrides.

Running the server

Local development

Requires Bun v1.4 or higher (or Node.js v24+ — the server falls back to the better-sqlite3 optional dependency when not run under Bun).

  • Clone and install:

    sh
    git clone https://github.com/cyanheads/medical-codes-mcp-server.gitcd medical-codes-mcp-server && bun installcp .env.example .env   # optional — every runtime var has a default
  • Build and run:

    sh
    # One-time buildbun run rebuild
    # Run the built serverbun run start:stdio# orbun run start:http
  • Run checks and tests:

    sh
    bun run devcheck   # Lint, format, typecheck, securitybun run test       # Vitest test suitebun run lint:mcp   # Validate MCP definitions against spec

Building the bundled index

The bundled data/medical-codes.db ships in the npm package and Docker image but, at over 100 MB, is not committed to git; a clone gets a prebuilt copy from the npm package or the .mcpb attached to each GitHub Release. Rebuilding is only needed to refresh to a new federal release, and runs offline from source files you download first. The steps are in docs/building-the-index.md.

Docker

sh
docker run --rm -p 3010:3010 ghcr.io/cyanheads/medical-codes-mcp-server:latest

The image defaults to HTTP transport, stateless session mode, and logs to /var/log/medical-codes-mcp-server, and carries the bundled data/medical-codes.db, so it is fully self-contained. To run it over stdio from an MCP client, use "command": "docker" with "args": ["run", "-i", "--rm", "-e", "MCP_TRANSPORT_TYPE=stdio", "ghcr.io/cyanheads/medical-codes-mcp-server:latest"]. To build locally, docker build -t medical-codes-mcp-server .; OpenTelemetry peer dependencies are installed by default — build with --build-arg OTEL_ENABLED=false to omit them.

Project structure

DirectoryPurpose
src/index.tscreateApp() entry point — registers the six tools and opens the bundled index in setup().
src/configServer-specific environment variable parsing and validation with Zod.
src/mcp-server/toolsTool definitions (*.tool.ts).
src/services/code-indexThe code-index service — read-only SQLite handle, code-shape detection, FTS5 query translation.
scripts/build-index.tsBuild-time ingest pipeline that bakes the federal source files into data/medical-codes.db.
data/medical-codes.dbThe bundled SQLite + FTS5 code index, opened read-only at runtime.
tests/Unit and integration tests mirroring src/.

Development guide

See CLAUDE.md/AGENTS.md for development guidelines and architectural rules. The short version:

  • Handlers throw, framework catches — no try/catch in tool logic
  • Use ctx.log for request-scoped logging; the code index is a read-only global, not tenant state
  • Register new tools via the createApp() array in src/index.ts
  • The bundled DB is the source of truth — surface real billable/validity flags from the source releases; never fabricate a code or a billability decision

Contributing

Issues are welcome. Run checks and tests before submitting:

sh
bun run devcheckbun run test

License

Apache-2.0 — see LICENSE for details.

來源:README.md,提交 ba126b2

工具

6

medcode_get_code

Get Medical Code

Decode one or more US medical codes to their official descriptions across ICD-10-CM (diagnoses), ICD-10-PCS (inpatient procedures), HCPCS Level II (supplies/drugs/services), and RxNorm (drugs, by RXCUI). Also decodes a National Drug Code (NDC) directly to its RxNorm product offline, tagged `source: "NDC"` — hyphenated in an FDA segment configuration (4-4-2, 5-3-2, 5-4-1, or the 11-digit 5-4-2) or as bare 10/11 digits; any other segment widths are malformed and stay unresolved. Auto-detects the system from each code's shape, and a code written in ICD-10-CM dotted form (`A01.00`) resolves to ICD-10-CM; pass an explicit `system` only when a value is genuinely ambiguous. Accepts 1–50 codes and returns partial success: resolved codes in `found`, unresolved in `notFound` with a per-code reason, so one bad code never fails the batch. Each reply holds `structuredContent` and the text to 24,000 bytes apiece: codes are decoded in request order, and once one has resolved, a code that would carry the reply past that budget is returned unprocessed in `deferred`, as sent, with every code after it — re-call with `codes` set to `deferred` and the same `system` and `includeHierarchy` until no `deferred` comes back. Three kinds of code are never deferred and can carry a reply past the budget: the first code that resolves, returned whole; the codes before it; and the unresolved codes after the last one that resolves, so a re-call always holds a code that resolves. Only a batch where nothing resolves fails: with ambiguous_system and `candidateSystems` when every code exists in more than one bundled system, otherwise with no_codes_found. Set `includeHierarchy` to attach each code's parent and immediate children (with a `childrenTruncated` flag when a code has more children than the cap returns — walk the full set via medcode_map_codes, or medcode_browse_hierarchy outside ICD-10-PCS); an ICD-10-PCS table row's children are the complete codes that begin with it. The resolved `system` is e

輸入參數codes必填systemincludeHierarchy

medcode_search_codes

Search Medical Codes

Find US medical codes whose official descriptions match a described concept, via full-text search over the bundled index. Every search term must appear — matched first as a token prefix, then as a substring so inflected and compound forms are also found (a "neuropathy" search surfaces "mononeuropathy"/"polyneuropathy" siblings too, not only a standalone "neuropathy" token). An RxNorm concept matches on its drug name alone, never its term type (SBD, IN, …) — narrow by type with `chapter`. Filter by `system` (ICD10CM/ICD10PCS/HCPCS/RXNORM), `billableOnly` to exclude headers/categories and terminated HCPCS codes, and `chapter`. Use when you have a clinical description and need the code — the reverse of medcode_get_code. Results echo the resolved system per row for chaining, rank exact prefix matches ahead of substring-only matches with a deterministic tie-break, and disclose truncation with a `nextCursor`: pass it back as `cursor` to page through the full ranked set.

輸入參數limitquery必填cursorsystemchapterbillableOnly

medcode_check_code

Check Medical Code

Validate whether a US medical code exists, is current, and is billable in the active bundled release. Returns a discriminated status — valid_billable, valid_not_billable, valid_header, valid, or terminated — with a `whyNot` explaining non-billable and terminated cases (e.g. "valid ICD-10-CM category but not billable — submit a more specific child code"). A HCPCS code is terminated once its last valid date has passed; before then it checks as billable, with that date in `whyNot`. This is the detail a coder needs before submitting a claim. RxNorm has no billing concept, so a current RxNorm concept is `valid` with `billable: null` and no billing verdict. Auto-detects the system from the code's shape, and a code written in ICD-10-CM dotted form (`A01.00`) resolves to ICD-10-CM; pass an explicit `system` to disambiguate. A non-billable or terminated code is a successful result with a whyNot, not an error — only a code absent from the named system, or with no `system` from every bundled system, raises unknown_code, which names the other bundled system that holds the code, or every system the code's shape fits. A dotted all-digit value in ICD-9-CM form (`250.00`) is never read as an RXCUI, and its miss says ICD-9-CM is not bundled; an ICD-10-PCS section value from medcode_browse_hierarchy (`0`) checked under system ICD10PCS is named as a section, not a code. A code string that also exists in another bundled system carries `alsoInSystems` naming it, since the verdict applies only to the system that answered.

輸入參數code必填system

medcode_map_codes

Map Medical Codes

Crosswalk a US medical code or drug across systems and within a hierarchy. Hierarchy directions: `parents` and `children` walk a code's hierarchy one level per call — immediate parent/children only (depth-1); call iteratively for the full ancestor or descendant path. ICD-10-CM and HCPCS walk the prefix hierarchy, stepping past an ICD-10-CM level padded with the placeholder X that is not itself a code (the parent of `S82.66XA` is `S82.66`); an ICD-10-PCS three-character table row's children are the complete codes that begin with it, and a complete code's parent is its table row; RxNorm concepts have no code hierarchy. A resolvable source with no edge in the requested direction is a successful empty result with a notice, not an error. A source code string that also exists in another bundled system carries `alsoInSystems` naming it, since only the resolved system's hierarchy was walked. Drug directions (RxNorm): `name_to_rxcui` (drug name → RXCUI; one name matches ingredients, combinations, and products alike, each hit tagged with its `conceptType`), `ndc_to_rxcui` and `rxcui_to_ndc` (NDC ↔ RXCUI; NDCs accepted hyphenated in an FDA segment configuration — 4-4-2, 5-3-2, 5-4-1, or the 11-digit 5-4-2 — or as bare 10/11 digits; `ndc_to_rxcui` names the product it decoded to and its `conceptType`), `rxcui_to_ingredients` and `rxcui_to_brands` (RXCUI → ingredient/brand RXCUIs, each with the target's RxNorm name and its `conceptType` — read that before counting a combination product's ingredients). Drug-class directions (RxClass): `rxcui_to_classes` (RXCUI → its classes: pharmacologic class, mechanism of action, physiologic effect, pharmacokinetics, therapeutic category, chemical structure, the diseases it may treat, prevent, diagnose, or induce or is contraindicated with, VA class, DEA controlled-substance schedule, CDC vaccine code; a drug product also carries its ingredients' classes, naming the ingredient in `via`, while DEA schedules are recorded only on drug products an

輸入參數from必填limitcursorsystemclassTypedirection必填

medcode_browse_hierarchy

Browse Code Hierarchy

Walk a US medical code system's hierarchy for discovery without a search term. With no `node`, returns the top-level entries (ICD-10-CM categories, HCPCS range buckets, or ICD-10-PCS first-axis values). With a `node`, returns its immediate children. ICD-10-CM and HCPCS use a prefix hierarchy (a shorter code is the parent of a longer one); ICD-10-PCS is axis-based — each of its 7 characters is an independent axis (section, body system, root operation, body part, approach, device, qualifier), but only the top-level Section axis is browsable (omit `node`): positions 2–7 are context-dependent on the preceding axis path and are not enumerable from a flat partial code, so list the complete codes in a three-character ICD-10-PCS table row with medcode_map_codes (direction children) instead. Lets an agent orient in an unfamiliar system or enumerate a category's specific codes. A large child set paginates: when the response carries a `nextCursor`, pass it back as `cursor` to fetch the next page.

輸入參數nodelimitcursorsystem必填

medcode_list_systems

List Code Systems

List the bundled US medical code systems with their release identifiers, effective dates, and code counts, and the RxClass drug-class layer the class crosswalks read, with each source’s version. Confirms which ICD-10-CM fiscal year, ICD-10-PCS fiscal year, HCPCS Level II release, RxNorm normalized set, and RxClass sources are active before acting on any decode, search, or crosswalk result. The corpus is offline and built at package-build time — this call reports exactly which release is baked into the running server. ICD-10-CM/PCS are the US clinical modifications, not the ICD-10/ICD-11 base.

無需輸入參數。

版本歷史

7
  1. v0.5.1最新Oct 29, 2026
  2. v0.4.2Oct 25, 2026
  3. v0.4.1Oct 9, 2026
  4. v0.4.0Sep 25, 2026
  5. v0.3.0Sep 24, 2026
  6. v0.2.9Sep 19, 2026
  7. v0.2.8Sep 16, 2026

評分

已滿足適用檢查項的 100%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通必需25 分
  • 已宣告認證方式必需10 分
  • 已列出工具必需15 分
  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分