mcp-icd10

mcp-icd10

Offline MCP server for ICD medical code lookup, search, and crosswalk translation with 124K codes and 102K mappings, all local with zero network calls.

Category
访问服务器

README

mcp-icd10

Offline MCP server for ICD medical code lookup, search, and crosswalk translation.

Zero API keys. Zero network calls. Zero data leakage.

124K codes across three coding systems with 102K bidirectional crosswalk mappings, all running locally in a SQLite database.

License: MIT Python 3.10+ MCP

Why?

Existing medical terminology services are thin wrappers around remote APIs — rate-limited, network-dependent, and they send your clinical queries to third-party servers. That's a non-starter for HIPAA-conscious workflows.

This server embeds everything locally. A pre-built SQLite database with FTS5 full-text search ships inside the package. Queries resolve in microseconds. Nothing leaves your machine.

What's included

System Codes Source
ICD-10-CM FY2026 98,186 CMS.gov (incl. 74,719 billable)
ICD-9-CM 14,567 CMS GEMs package
ICD-10 WHO 2019 11,243 WHO
GEMs crosswalk 102,591 CMS (bidirectional ICD-9 ↔ ICD-10)

Total: 123,996 codes + 102,591 crosswalk mappings

Performance

All benchmarks on Apple Silicon. Every query hits an index or FTS5 — no table scans.

Operation Latency
Exact code lookup 4.4 µs
Full-text search 0.23 ms
Category browse 0.04 ms
Crosswalk translation 5.9 µs
DB decompress (first run only) ~38 ms

Quick start

Claude Desktop / Kiro / any MCP client

{
  "mcpServers": {
    "icd": {
      "command": "uvx",
      "args": ["mcp-icd10"]
    }
  }
}

Docker

docker build -t mcp-icd10 .
{
  "mcpServers": {
    "icd": {
      "command": "docker",
      "args": ["run", "--rm", "-i", "mcp-icd10"]
    }
  }
}

Install from source

git clone https://github.com/stabgan/mcp-icd10.git
cd mcp-icd10
pip install .
mcp-icd10

Tools

lookup_code

Look up a medical code and return its description. Accepts codes with or without dots. Searches across all systems when no system is specified.

> lookup_code("E11.9")
[icd10cm] E119: Type 2 diabetes mellitus without complications

> lookup_code("250.00")
[icd9cm] 25000: Diabetes mellitus without mention of complication, type II or unspecified type, not stated as uncontrolled

search_codes

Full-text search across all 124K code descriptions. Supports natural language clinical queries.

> search_codes("acute myocardial infarction")
Found 20 result(s) for 'acute myocardial infarction':
  [icd10cm] I219: Acute myocardial infarction, unspecified
  [icd10cm] I2101: ST elevation (STEMI) myocardial infarction involving left main coronary artery
  [icd9cm] 41071: Acute myocardial infarction of subendocardial wall, initial episode of care
  ...

browse_category

Browse all codes under a category prefix within a specific system.

> browse_category("E11", system="icd10cm")
50 code(s) under 'E11' [icd10cm]:
  E1100: Type 2 diabetes mellitus with hyperosmolarity without nonketotic hyperglycemic-hyperosmolar coma
  E1101: Type 2 diabetes mellitus with hyperosmolarity with coma
  ...

translate_code

Translate between ICD-9-CM and ICD-10-CM using the CMS General Equivalence Mappings (GEMs).

> translate_code("250.00")
Crosswalk for '25000':
  25000 → [icd10cm] E119 — Type 2 diabetes mellitus without complications [≈]

> translate_code("E119", source_system="icd10cm")
Crosswalk for 'E119':
  E119 → [icd9cm] 25000 — Diabetes mellitus without mention of complication, type II ... [≈]

get_stats

Returns code counts per system and total crosswalk mappings.

Architecture

┌─────────────────────────────────────────────┐
│         Claude / Kiro / AI Agent            │
│              (MCP Client)                   │
└──────────────────┬──────────────────────────┘
                   │ MCP Protocol (stdio)
┌──────────────────▼──────────────────────────┐
│            mcp-icd10 Server                 │
│  ┌────────────────────────────────────────┐ │
│  │  FastMCP — 5 tools                     │ │
│  │  lookup · search · browse              │ │
│  │  translate · stats                     │ │
│  └──────────────┬─────────────────────────┘ │
│  ┌──────────────▼─────────────────────────┐ │
│  │  SQLite + FTS5 (read-only)             │ │
│  │  124K codes │ 102K crosswalk mappings  │ │
│  │  Integer system IDs │ Bitmask flags    │ │
│  └──────────────┬─────────────────────────┘ │
│  ┌──────────────▼─────────────────────────┐ │
│  │  Pre-built DB (5.2 MB gzipped)         │ │
│  │  Decompresses on first run → 23 MB     │ │
│  └────────────────────────────────────────┘ │
└─────────────────────────────────────────────┘
           100% local · zero network calls

How it works

The package ships a pre-built, gzipped SQLite database (icd.db.gz, ~5 MB). On first run, it decompresses to ~23 MB and opens in read-only mode with memory-mapped I/O.

Key design decisions:

  • Integer system IDs (0/1/2) instead of text strings for compact storage and fast comparisons
  • CROSS JOIN in FTS queries forces SQLite's query planner to use the FTS index first, avoiding full table scans on broad search terms
  • No FTS5 rankingORDER BY rank forces full-scan scoring on all matches. Instead, we cap at 500 FTS candidates and sort by description length (shorter = more specific = better relevance proxy for medical codes)
  • Bitmask flags on crosswalk entries pack approximate/no-map/combination into a single integer
  • WITHOUT ROWID on the crosswalk table for clustered primary key access

Data sources

Limitations

  • No ICD-10-PCS (procedure codes), ICD-11, or SNOMED CT
  • GEMs crosswalk covers ICD-9-CM ↔ ICD-10-CM only (not WHO codes)
  • FTS5 uses Porter stemming — some medical abbreviations may not stem perfectly
  • Update frequency depends on new package releases

License

MIT

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选