Command Palette

Search for a command to run...

UnylyUnyly
Весь каталог

Validar Codigo Medico

БесплатноНе проверен

MCP server that validates medical codes (ICD-10-CM with official descriptions, CPT structural checks) via a single tool, with x402 billing.

GitHubEmbed

Описание

MCP server that validates medical codes (ICD-10-CM with official descriptions, CPT structural checks) via a single tool, with x402 billing.

README

validar-codigo-medico MCP server

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

  • validate_medical_codesystem: "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.

Tool Price
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

npm install

2. Run the unit tests

npm test

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

npm run dev

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

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

# 1) initialize
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":1,"method":"initialize","params":{"protocolVersion":"2025-06-18","capabilities":{},"clientInfo":{"name":"curl-test","version":"0.0.1"}}}'

# 2) tools/list
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":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.

from github.com/encodi/validar-codigo-medico

Установка Validar Codigo Medico

У этого сервера нет опубликованного пакета — он собирается из исходников. Открой репозиторий и следуй инструкции в README.

▸ github.com/encodi/validar-codigo-medico

FAQ

Validar Codigo Medico MCP бесплатный?

Да, Validar Codigo Medico MCP бесплатный — установка в пару кликов через Unyly без оплаты.

Нужен ли API-ключ для Validar Codigo Medico?

Нет, Validar Codigo Medico работает без API-ключей и переменных окружения.

Validar Codigo Medico — hosted или self-hosted?

Доступен hosted-вариант: Unyly запускает сервер в облаке, локальная установка не обязательна.

Как установить Validar Codigo Medico в Claude Desktop, Claude Code или Cursor?

Открой Validar Codigo Medico на unyly.org, выбери вкладку своего клиента (Claude Desktop, Claude Code, Cursor) и нажми Install — конфиг сгенерируется автоматически, без правки JSON.

Похожие MCP

$5

Stripe

Payments, customers, subscriptions

Stripeавтор: Stripe

malamutemayhem/unclick-agent-native-endpoints

110+ tools for AI agents spanning social media, finance, gaming, music, AU-specific services, and utilities. Zero-config local tools plus platform connectors. n

malamutemayhemавтор: malamutemayhem

whiteknightonhorse/APIbase

Unified API hub for AI agents with 56+ tools across travel (Amadeus, Sabre), prediction markets (Polymarket), crypto, and weather. Pay-per-call via x402 micropa

whiteknightonhorseавтор: whiteknightonhorse

trackerfitness729-jpg/sitelauncher-mcp-server

Deploy live HTTPS websites in seconds. Instant subdomains ($1 USDC) or custom .xyz domains ($10 USDC) on Base chain. Templates for crypto tokens and AI agent pr

trackerfitness729-jpgавтор: trackerfitness729-jpg

embeddedlayers/mcp-analytics

Statistical analysis, forecasting, and ML for business data (Shopify, Stripe, WooCommerce, eBay, GA4, Search Console). Upload a CSV or connect live data sources

embeddedlayersавтор: embeddedlayers

carrierone/verilexdata-mcp

20 structured datasets (NPI healthcare, SEC filings, OFAC sanctions, crypto whales, Polymarket signals, patents, economic indicators) via x402 pay-per-query wit

carrieroneавтор: carrierone

tipdotmd/tip-md-x402-mcp-server

MCP server for cryptocurrency tipping through AI interfaces using x402 payment protocol and CDP Wallet.

tipdotmdавтор: tipdotmd

laundromatic/shopgraph

Structured product data from the open web — Schema.org + AI extraction for e-commerce enrichment. Pay per call via Stripe. [shopgraph.dev](https://shopgraph.dev

laundromaticавтор: laundromatic

mrslbt/xendit-mcp

Xendit payment gateway for Southeast Asia. Invoices, disbursements, balance checks, and bank transfers across Indonesia, Philippines, Thailand, Vietnam, and Mal

mrslbtавтор: mrslbt

@arbitova/mcp-server

Non-custodial on-chain escrow + AI dispute arbitration for agent-to-agent USDC payments on Base. Seven tools covering the full EscrowV1 contract surface: create

jiayuanliang0716-maxавтор: jiayuanliang0716-max

Compare Validar Codigo Medico with

Не уверен что выбрать?

Найди свой стек за 60 секунд

Автор?

Embed-бейдж для README

Похожее

Все в категории finance