Skip to main content
Glama
Azure AHDS FHIR MCP Server

Azure AHDS FHIR MCP Server

by erikhoward

Azure AHDS FHIR MCP 服务器🚀

Azure 健康数据服务 FHIR(快速医疗保健互操作性资源)的模型上下文协议 (MCP) 服务器实现。此服务提供与 Azure FHIR 服务器交互的标准化接口,支持通过 MCP 工具进行医疗保健数据操作。

执照 Python 版本 微胶囊钙

设置🛠️

安装📦

需要 Python 3.13 或更高版本。

使用pip安装包:

pip install azure-fhir-mcp-server

MCP 配置⚙️

Claude桌面配置

1 - 编辑Claude桌面配置:

打开claude_desktop_config.json并添加以下配置。

在 MacOs 上,该文件位于此处: ~/Library/Application Support/Claude Desktop/claude_desktop_config.json 。

在 Windows 上,该文件位于此处: %APPDATA%\Claude Desktop\claude_desktop_config.json 。

{
    "mcpServers": {
        "fhir": {
            "command": "azure-fhir-mcp-server",
            "env": {
                "LOG_LEVEL": "INFO",
                "fhirUrl": "https://your-fhir-server.azurehealthcareapis.com/fhir",
                "clientId": "your-client-id",
                "clientSecret": "your-client-secret",
                "tenantId": "your-tenant-id"
            }
        }
    }
}

以下是可用的环境配置变量表:

多变的

描述

默认

LOG_LEVEL

日志级别

INFO

fhirUrl

Azure FHIR 服务器 URL

必需的

clientId

OAuth2 客户端 ID

必需的

clientSecret

OAuth2 客户端密钥

必需的

tenantId

Azure AD 租户 ID

必需的

2 - 重新启动 Claude Desktop。

可用工具🔧

FHIR 资源操作

  • search_fhir - 根据搜索参数字典搜索 FHIR 资源

资源访问

服务器通过 MCP 资源协议提供对所有标准 FHIR 资源的访问:

  • fhir://Patient/ - 访问所有患者资源

  • fhir://Patient/{id} - 访问特定的患者资源

  • fhir://Observation/ - 访问所有观察资源

  • fhir://Observation/{id} - 访问特定的观察资源

  • fhir://Medication/ - 访问所有药物资源

  • fhir://Medication/{id} - 访问特定的药物资源

  • 还有更多...

Related MCP server: Smart EHR MCP Server

发展💻

本地开发设置

1-克隆存储库:

git clone https://github.com/erikhoward/azure-fhir-mcp-server.git
cd azure-fhir-mcp-server

2-创建并激活虚拟环境:

Linux/macOS:

python -m venv .venv
source .venv/bin/activate

视窗:

python -m venv .venv
.venv\Scripts\activate

3 - 安装依赖项:

pip install -e ".[dev]"

4-复制并配置环境变量:

cp .env.example .env

使用您的设置编辑 .env:

fhirUrl=https://your-fhir-server.azurehealthcareapis.com/fhir
clientId=your-client-id
clientSecret=your-client-secret
tenantId=your-tenant-id

5 - Claude桌面配置

打开claude_desktop_config.json并添加以下配置。

在 MacOs 上,该文件位于此处: ~/Library/Application Support/Claude Desktop/claude_desktop_config.json 。

在 Windows 上,该文件位于此处: %APPDATA%\Claude Desktop\claude_desktop_config.json 。

{
    "mcpServers": {
        "fhir": {
            "command": "python",
            "args": [
                "-m",
                "fhir_mcp_server.server"
            ],
            "cwd": "/path/to/azure-fhir-mcp-server/repo",
            "env": {
                "LOG_LEVEL": "DEBUG",
                "fhirUrl": "https://your-fhir-server.azurehealthcareapis.com/fhir",
                "clientId": "your-client-id",
                "clientSecret": "your-client-secret",
                "tenantId": "your-tenant-id"
            }
        }
    }
}

6 - 重新启动 Claude Desktop。

贡献🤝

欢迎贡献代码!欢迎提交 Pull 请求。

  1. 分叉存储库

  2. 创建你的功能分支( git checkout -b feature/AmazingFeature )

  3. 提交你的更改( git commit -m '✨ Add some AmazingFeature' )

  4. 推送到分支( git push origin feature/AmazingFeature )

  5. 打开拉取请求

许可证⚖️

根据 MIT 许可 - 请参阅LICENSE.md文件。

这不是 Microsoft 或 Azure 的官方产品。

Available Tools

1 tool
search_fhirA

Search FHIR resources using comprehensive Azure FHIR search capabilities.

Supports resource-specific and common search parameters, modifiers, prefixes, chained searches, and result management. Returns paginated results in FHIR searchset bundles.

Key Features: • Resource-specific and common search parameters (_id, _lastUpdated, _tag, etc.) • Search modifiers (:missing, :exact, :contains, :text, :not, etc.) • Prefixes for ordered parameters (gt, lt, ge, le, etc.) • Chained searches (e.g., Encounter?subject:Patient.name=Jane) • Reverse chained searches using _has parameter • Include and revinclude searches (_include, _revinclude) • Result parameters (_count, _sort, _elements, _summary, _total) • Composite search parameters for complex queries • Pagination support with configurable page sizes (max 1000)

Args: resource_type: FHIR resource type to search (e.g., 'Patient', 'Observation', 'Condition') search_params: Dictionary of FHIR search parameters. Common examples: • {"name": "Smith", "_count": 50} - Search patients by name, limit 50 results • {"birthdate": "gt1990-01-01", "_sort": "birthdate"} - Patients born after 1990, sorted • {"identifier": "12345", "_include": "Patient:general-practitioner"} - Include GP • {"code": "77386006", "_include": "Observation:subject"} - Pregnancy observations with patients • {"_lastUpdated": "gt2024-01-01"} - Resources updated after date ctx: MCP Context for logging and progress reporting

Returns: List of matching FHIR resources extracted from searchset Bundle

Inputs: resource_type (required), search_params. Returns: result

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4.1/5.0

    Scored across 1 tool

    Disambiguation5/5

    With only one tool, there is no possibility of ambiguity or overlap between tools. The single tool 'search_fhir' has a clearly defined purpose focused on FHIR search operations.

    Naming Consistency5/5

    The naming follows a consistent snake_case pattern with a clear verb_noun structure ('search_fhir'). With only one tool, there is no inconsistency to evaluate.

    Tool Count2/5

    A single tool for an FHIR server is insufficient for comprehensive coverage of FHIR operations. FHIR domains typically require CRUD operations (create, read, update, delete) and other interactions beyond just search, making this server feel thin and incomplete for its purpose.

    Completeness2/5

    The tool surface is severely incomplete for an FHIR server. While the search functionality is detailed, there are significant gaps in basic FHIR operations like creating, reading, updating, or deleting resources, which are essential for full FHIR lifecycle management.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      An MCP server that provides healthcare tools for interacting with FHIR data and medical resources on EMRs like Cerner and Epic
      2
      MIT
    • A
      license
      Not graded
      quality
      F
      maintenance
      A Model Context Protocol server that connects AI tools to Electronic Health Records using SMART on FHIR, allowing secure searching, querying, and analysis of patient data from compatible EHRs.
      88
      MIT
    • F
      license
      Not graded
      quality
      D
      maintenance
      A Model Context Protocol server that enables querying FHIR healthcare data using natural language, allowing doctors to retrieve patient information, medications, observations, and other healthcare records.
      1
      -
    • A
      license
      Not graded
      quality
      D
      maintenance
      A server that implements the Model Context Protocol (MCP) with StreamableHTTP transport, enabling standardized interaction with model services through a RESTful API interface.
      2
      MIT