@flexpa/mcp-fhir
[!警告] 这是一个实验性的演示,不适用于生产用途。
这是一个基于 TypeScript 的 MCP 服务器,用于连接到 FHIR 服务器。它通过以下方式提供与 FHIR 资源交互的核心 MCP 功能:
通过 URI 访问 FHIR 资源
提供 FHIR 资源的搜索功能
特征
资源
此处的“资源”指的是 MCP 定义*,而非*FHIR 定义。MCP 资源是模型上下文协议 (MCP) 中的核心原语,允许服务器公开可供客户端读取并用作 LLM 交互上下文的数据和内容。
通过
fhir://URI 列出并访问 FHIR 资源资源以 FHIR JSON 格式返回
支持 FHIR 服务器 CapabilityStatement 中可用的所有 FHIR 资源类型
工具
search_fhir- 搜索 FHIR 资源以
resourceType和searchParams作为参数返回 FHIR 搜索结果
read_fhir- 读取单个 FHIR 资源以
uri作为参数以 JSON 格式返回 FHIR 资源
配置
服务器需要以下环境变量:
FHIR_BASE_URL:FHIR 服务器的基本 URLFHIR_ACCESS_TOKEN:用于身份验证的 FHIR 访问令牌上的 SMART
发展
安装依赖项:
构建服务器:
对于使用自动重建的开发:
安装
要与 Claude Desktop 一起使用,请添加服务器配置:
在 MacOS 上: ~/Library/Application Support/Claude/claude_desktop_config.json在 Windows 上: %APPDATA%/Claude/claude_desktop_config.json
调试
由于 MCP 服务器通过 stdio 进行通信,调试起来可能比较困难。我们推荐使用MCP Inspector ,它以包脚本的形式提供:
检查器将提供一个 URL 来访问浏览器中的调试工具。
This server cannot be installed
remote-capable server
The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.
基于 TypeScript 的 MCP 服务器连接到 FHIR 服务器,允许通过 fhir:// URI 访问医疗保健数据并提供 FHIR 资源的搜索功能。
Related Resources
Related MCP Servers
- -security-license-qualityAn MCP server that provides healthcare tools for interacting with FHIR data and medical resources on EMRs like Cerner and EpicLast updated -82MIT License
- -security-license-qualityA TypeScript framework for building MCP servers with features for client sessions, authentication, image/audio content, and typed server events.Last updated -MIT License
- Asecurity-licenseAqualityA Model Context Protocol server that enables standardized interaction with Azure Health Data Services FHIR servers, allowing healthcare data operations through MCP tools.Last updated -113MIT License
- -security-license-qualityAn MCP server that enables interaction with Google's Cloud Healthcare API, allowing users to manage healthcare data, FHIR resources, DICOM stores, and healthcare datasets through natural language commands.Last updated -