validar-codigo-medico

io.github.encodi由 GitHub 帳號 encodi 發布v1.0.1更新於 Oct 25, 2026

Validates ICD-10-CM against the real FY2026 catalog (NCHS/CDC) and CPT by structure/category.

已驗證Streamable HTTP可網頁執行金融資料與分析

概覽

AI 產生的概覽

遠端 MCP 伺服器,讓助理依官方 FY2026 目錄驗證 ICD-10-CM 代碼,並檢查 CPT 代碼結構。

可以做什麼
驗證醫療代碼:將 ICD-10-CM 代碼與內建的 FY2026 NCHS/CDC 可計費目錄比對並回傳官方簡短描述,或檢查 CPT 代碼的結構與類別(I、II、III 類)並依數字區間估算所屬領域。每次呼叫皆為無狀態,呼叫之間沒有資料庫或持久化資料。
適用情境
適合助理需要確認診斷或處置代碼格式是否正確、是否存在於官方 ICD-10-CM 目錄的情境,例如草擬或審閱臨床與計費文字時。它不能取代合格專業編碼人員。
執行需求
透過 streamable HTTP 連線的遠端端點;未宣告需要本機執行環境、帳號或 API 金鑰。每次呼叫皆計費,用戶端需能在 Base 主網完成 x402 的 USDC 付款並重試。
安裝前請注意
每次呼叫收取真實費用:Base 主網上 0.02 USDC,付款隨 MCP 請求傳遞而非透過標頭。CPT 結果僅涵蓋格式,不含逐條描述,因為 CPT 目錄由 AMA 授權。輸出屬於結構或目錄驗證,不構成醫療或計費建議。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 validar-codigo-medico,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

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

交給代理程式安裝

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

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

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

其他 MCP 客戶端

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

{
  "mcpServers": {
    "validar-codigo-medico": {
      "type": "http",
      "url": "https://validar-codigo-medico.encodari.workers.dev/mcp"
    }
  }
}

README

validar-codigo-medico

[validar-codigo-medico MCP server]

Remote MCP server (Cloudflare Workers) with one tool that validates medical codes against real data:

  • validate_medical_code — system: "icd10" does a real lookup against the official billable ICD-10-CM code catalog (FY2026, NCHS/CDC, public domain as a work of the U.S. government) and returns the official short description. system: "cpt" validates the real structure of a CPT code (Category I: 5 digits; Category II: 4 digits + F; Category III: 4 digits + T) and estimates its area by public numeric range — it doesn't include per-code descriptions, because the CPT catalog is owned by the AMA and requires a paid license (it can't be redistributed).

No database, no persistent state between calls: each call builds a fresh McpServer (see createServer() in src/index.ts). The ICD-10-CM catalog (~6MB, 74,719 codes) is bundled into the Worker itself as static data (src/tools/data/icd10cm.ts) and parsed once per isolate into an in-memory Map — see src/tools/codigoMedico.ts.

Why CPT has no descriptions

The CPT (Current Procedural Terminology) description catalog is owned by the American Medical Association and requires a paid license to redistribute its content — unlike ICD-10-CM, which is a work of the U.S. government and therefore public domain. That's why this tool validates a CPT code's real format (regex + numeric range, publicly available information about the code's structure) but doesn't offer the procedure's description: that requires an AMA-licensed codebook.

Billing (x402)

Charges per call via x402 — real USDC payment on Base mainnet, against the Coinbase Developer Platform (CDP) facilitator. The payment travels inside the MCP JSON-RPC itself (_meta), not as an HTTP header; see src/payments.ts.

ToolPrice
validate_medical_code$0.02 USDC

An unpaid tools/call returns isError: true with the accepts (network, amount, payTo) the client needs to pay and retry — not an unexplained exception.

Structure

src/  index.ts             # registers the tool in the McpServer and exposes the MCP HTTP handler  payments.ts          # x402 billing on Base mainnet via the CDP facilitator  tools/    codigoMedico.ts       # pure logic for validate_medical_code (testable without Workers)    codigoMedico.test.ts    data/      icd10cm.ts          # bundled FY2026 ICD-10-CM catalog (generated, do not edit by hand)scripts/  dev-node.ts           # dev server that runs the handler in plain Node, no wrangler  gen-icd10-data.mjs    # regenerates tools/data/icd10cm.ts from a new CMS/NCHS order file

Updating the ICD-10-CM catalog

When NCHS publishes a new version (new fiscal year or addenda):

  1. Download the "Code Descriptions" zip from https://ftp.cdc.gov/pub/health_statistics/nchs/publications/ICD10CM/<YEAR>/.
  2. Unzip it and locate icd10cm-codes-<YEAR>.txt.
  3. node scripts/gen-icd10-data.mjs <path-to-txt> src/tools/data/icd10cm.ts.

Running it locally

⚠️ Note on wrangler dev: the real Cloudflare Workers runtime (workerd) requires macOS 13.5+. If your Mac has an older version, wrangler dev (and npm run dev) will fail. This project includes a plain-Node shim that runs the exact same fetch() handler without needing workerd.

1. Install dependencies

bash
npm install

2. Run the unit tests

bash
npm test

3a. If your wrangler dev works (macOS 13.5+, Linux, Windows)

bash
npm run dev

3b. If wrangler dev fails because of the macOS version

bash
npm run dev:node

Starts at http://localhost:8787/mcp, reading CDP credentials from ~/.mcp-tools-factory-credentials.env (shared across all tools in this factory).

4. Test with curl

bash
# 1) initializecurl -s -X POST http://localhost:8787/mcp \  -H "Content-Type: application/json" \  -H "Accept: application/json, text/event-stream" \  -d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-06-18","capabilities":{},"clientInfo":{"name":"curl-test","version":"0.0.1"}}}'
# 2) tools/listcurl -s -X POST http://localhost:8787/mcp \  -H "Content-Type: application/json" \  -H "Accept: application/json, text/event-stream" \  -d '{"jsonrpc":"2.0","id":2,"method":"tools/list","params":{}}'
# 3) tools/call — validate_medical_code (ICD-10-CM)curl -s -X POST http://localhost:8787/mcp \  -H "Content-Type: application/json" \  -H "Accept: application/json, text/event-stream" \  -d '{"jsonrpc":"2.0","id":3,"method":"tools/call","params":{"name":"validate_medical_code","arguments":{"system":"icd10","codes":["A00.0","Z21","does-not-exist"]}}}'

Responses come as Server-Sent Events (event: message + data: {...}); the data: line is the usual JSON-RPC response.

Deploy and listings

Deployed at https://validar-codigo-medico.encodari.workers.dev/mcp (Cloudflare Workers). Published on the official MCP registry, Smithery, mcp.so, and with an open PR to awesome-mcp-servers.

What it doesn't do (yet)

  • Doesn't include per-code CPT descriptions (see "Why CPT has no descriptions" above).
  • Charges on Base mainnet with real money. To switch back to testnet (Base Sepolia, eip155:84532) during development, change NETWORK in src/payments.ts.
  • No database or persistent state between calls (beyond the billing config and the ICD-10-CM catalog Map, cached in memory per isolate).
  • Not medical or billing advice: this is a structural/catalog validation, not a substitute for a certified professional coder.

來源:README.md,提交 6a10b7b

工具

0
SourceWeft 尚未讀取此伺服器的工具。

版本歷史

1
  1. v1.0.1最新Sep 16, 2026

評分

已滿足適用檢查項的 50%

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

  • 近 30 天內可連通必需25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式必需10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分