SNOMED CT术语查询服务

通过BioPortal REST API查询SNOMED CT临床术语的模型上下文协议服务器。

  • by robsyc
  • Python
  • 本地部署
  • 1 星标
  • 更新于
在 GitHub 查看 robsyc/snomed-mcp

使用说明

SNOMED CT MCP服务器

A. 模型上下文协议 查询服务器 SNOMED CT 通过临床术语 NCBO生物门户 REST API。

可用工具

工具 参数 描述
search query limit domain 通过文本查询搜索SNOMED CT概念。可选的 domain 滤波器将结果限制到SNOMED分支(例如。, procedure).
get_concept concept_id include_detail 获取完整的概念细节:标签、定义、同义词、父母和临床关系。
get_hierarchy concept_id relation limit 浏览SNOMED CT层次结构(父母、子女、祖先、后代)。

快速开始

先决条件

作为工具安装

git clone https://github.com/robsyc/snomed-mcp && cd snomed-mcp
uv tool install .

然后添加到您的 .cursor/mcp.json 或Claude桌面配置:

{
  "mcpServers": {
    "snomed-mcp": {
      "command": "snomed-mcp",
      "env": {
        "BIOPORTAL_API_KEY": "your-api-key"
      }
    }
  }
}

用紫外线跑步

git clone https://github.com/robsyc/snomed-mcp && cd snomed-mcp
uv sync

添加到您的 .cursor/mcp.json 或Claude桌面配置:

{
  "mcpServers": {
    "SNOMED CT": {
      "command": "uv",
      "args": ["tool", "run", "snomed-mcp"],
      "env": {
        "BIOPORTAL_API_KEY": "your-api-key"
      }
    }
  }
}

使用示例

“搜索与心力衰竭相关的SNOMED CT概念”

“搜索阑尾切除术 procedure 仅域”

“获取SNOMED概念195967001的完整细节”

“让我看看73211009(糖尿病)概念的孩子”

生物门户API

此服务器包装 BioPortal REST API.关键细节:

  • 认证:API密钥通过 Authorization: apikey token=... 头球
  • SNOMED CT本体:访问方式为 SNOMEDCT 在BioPortal
  • 概念URI: http://purl.bioontology.org/ontology/SNOMEDCT/{concept_id}
  • 速率限制:15个请求/秒(客户端强制)

发展

uv sync --group dev

# Lint
uv run ruff check src/ tests/

# Tests
uv run pytest tests/ -v

# MCP Inspector (web UI for testing tools)
BIOPORTAL_API_KEY=your-key uv run fastmcp dev inspector src/snomed_mcp/server.py:mcp

致谢