MCP Server for FHIR
@quiquemz
An MCP server built in C# for querying and managing FHIR healthcare data.
Overview
What is MCP Server for FHIR?
A C#-based Model Context Protocol (MCP) server that enables interaction with FHIR servers. It is designed for developers working with FHIR R4 implementations.
How to use MCP Server for FHIR?
Set up a local FHIR server environment by running docker compose up -d --wait to start HAPI FHIR and Azure FHIR servers. Configure the server in VS Code by updating the .vscode/mcp.json file with your local path to the .csproj. Invoke the tools (e.g., CreateResource, SearchResources) through an MCP client like Claude.
Key features of MCP Server for FHIR
- Full CRUD operations (Create, Read, Update, Delete) on FHIR resources.
- Search resources with criteria and count matching results.
- Execute FHIR transactions and retrieve resource history.
- Query FHIR server capabilities (version, formats, resource types).
- Supports R4 FHIR implementations.
Use cases of MCP Server for FHIR
- Generate synthetic FHIR data for testing or demonstrations.
- Search for patients and related resources across FHIR servers.
- Visualize FHIR search results through graphical representations.
- Automate clinical data management workflows with AI assistants.
FAQ from MCP Server for FHIR
What FHIR version does MCP Server for FHIR support?
It is designed for FHIR R4 implementations.
How do I set up a local FHIR server to use with MCP Server for FHIR?
Run docker compose up -d --wait to start two FHIR servers: HAPI FHIR (pre‑loaded with sample data) and Azure FHIR (empty database).
Can I use MCP Server for FHIR with VS Code?
Yes, follow the official MCP server setup documentation for VS Code and configure the .vscode/mcp.json file with the path to your .csproj.
What tools does MCP Server for FHIR provide?
It provides tools for CRUD, search, resource history, transactions, and capability queries: CreateResource, ReadResource, UpdateResource, DeleteResource, SearchResources, FindNumberOfResources, GetResourceHistory, ExecuteTransaction, GetFhirVersion, ListSupportedFormats, ListResourceTypes, and ListResourceCapabilities.