Skip to main content
Glama
Azure AHDS FHIR MCP Server

Azure AHDS FHIR MCP Server

by erikhoward

Сервер Azure AHDS FHIR MCP 🚀

Реализация сервера Model Context Protocol (MCP) для Azure Health Data Services FHIR (Fast Healthcare Interoperability Resources). Эта служба предоставляет стандартизированный интерфейс для взаимодействия с серверами Azure FHIR, позволяя выполнять операции с данными здравоохранения с помощью инструментов MCP.

Лицензия Версия Python МКП

Настройка 🛠️

Установка 📦

Требуется Python 3.13 или выше.

Установите пакет с помощью pip :

pip install azure-fhir-mcp-server

Конфигурация MCP ⚙️

Конфигурация рабочего стола Клода

1 - Изменить конфигурацию рабочего стола Клода:

Откройте 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

URL-адрес сервера Azure FHIR

Необходимый

clientId

Идентификатор клиента OAuth2

Необходимый

clientSecret

Секрет клиента OAuth2

Необходимый

tenantId

Идентификатор клиента Azure AD

Необходимый

2 — Перезапустите Claude Desktop.

Доступные инструменты 🔧

Операции с ресурсами FHIR

  • search_fhir — Поиск ресурсов FHIR на основе словаря параметров поиска

Доступ к ресурсам

Сервер обеспечивает доступ ко всем стандартным ресурсам FHIR через протокол ресурсов MCP:

  • fhir://Patient/ — Доступ ко всем ресурсам для пациентов

  • fhir://Patient/{id} — доступ к определенному ресурсу пациента

  • fhir://Observation/ - Доступ ко всем ресурсам Observation

  • fhir://Observation/{id} — доступ к определенному ресурсу Observation

  • 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_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.

Вклады 🤝

Вклады приветствуются! Пожалуйста, не стесняйтесь отправлять запрос на включение.

  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