FHIR

FHIR

MCP server enabling seamless access to FHIR data via multiple transports for AI tools.

64
Stars
22
Forks
2
Releases

Overview

The FHIR MCP Server is a Model Context Protocol (MCP) server that provides seamless integration between AI/LLM tools and FHIR healthcare data. It acts as a bridge between modern AI workflows and healthcare data, enabling natural language and programmatic search, retrieval, and analysis across FHIR resources. The server supports multiple transport modalities (streamable HTTP, Server-Sent Events, and STDIO) to accommodate diverse client setups. It uses SMART-on-FHIR based authentication to securely connect to FHIR servers, with configurable OAuth2 parameters and an option to disable authorization for public servers. The MCP server exposes a suite of operations (get_capabilities, search, read, create, update, delete, get_user) against FHIR resource types, enabling tool developers to discover capabilities, run queries, and manipulate resources. It can be run from PyPI or from source, and supports Docker and Docker Compose deployments, including an instant development stack with a HAPI FHIR server and PostgreSQL. It is designed for easy integration with MCP clients such as VS Code, Claude Desktop, and MCP Inspector, facilitating AI-assisted healthcare data workflows.

Details

Owner
wso2
Language
Python
License
Apache License 2.0
Updated
2025-12-07

Features

MCP-compatible transport

Serves FHIR via stdio, SSE, or streamable HTTP, enabling flexible client connections.

SMART-on-FHIR authentication

Supports SMART-on-FHIR based authentication to securely access FHIR servers using OAuth2 flows and tokens.

Tool integration with MCP clients

Designed to integrate with common MCP clients such as VS Code, Claude Desktop, and MCP Inspector.

OAuth2 configuration for MCP

Configurable via environment variables (e.g., FHIR_SERVER_BASE_URL, FHIR_SERVER_CLIENT_ID, FHIR_SERVER_SCOPES) and optional authorization disablement.

Docker & Docker Compose deployment

Provides a Docker image and docker-compose setup for quick, isolated deployment including a dev stack with HAPI FHIR and PostgreSQL.

FHIR resource toolset

Exposes MCP operations such as get_capabilities, search, read, create, update, delete, and get_user for FHIR resources.

Demo scenarios

Includes demonstrations with HAPI FHIR and Epic Sandbox to illustrate OAuth flows and MCP integration.

MCP Inspector support

Supports visualization and debugging via MCP Inspector to inspect tool invocations and payloads.

Audience

DevelopersBuild AI-enabled healthcare data tools by connecting to FHIR servers via MCP and multiple transports.
IntegratorsIntegrate FHIR data access into AI workflows and external MCP clients.
Healthcare innovatorsExperiment with searching, retrieving, and analyzing clinical data from FHIR servers through MCP.

Tags

FHIRMCPModel Context ProtocolAILLMSMART-on-FHIROAuth2HAPI FHIREPICDockerDocker ComposeVS CodeClaude DesktopMCP InspectorSSESTDIOStreamable HTTP