MCP server enabling LLM agents to perform full CRUD and semantic search on FHIR healthcare data via natural language.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent — or use 1-click editor setup below.
💡 Paste the JSON block into your client's configuration file under mcpServers, then restart the application.
Inspect callable tools, capabilities, and parameters exposed to AI agents by Fhir MCP Server.
SecurityOAuth2 authentication and proper access control for all operations
Model Context Protocol (MCP) Server for Fast Healthcare Interoperability Resources (FHIR)
FHIR MCP Server implements a complete Model Context Protocol (MCP) server, designed to facilitate seamless interaction between LLM-based agents and a FHIR-compliant backend. It provides a standardized interface that enables full CRUD operations on FHIR resources through a comprehensive suite of tools - accessible from MCP-compatible clients such as Claude Desktop, allowing users to query and manipulate clinical data using natural-language prompts.
.env-based configuration optionsThe server is built with a modular architecture:
This demo shows how Claude uses the fhir-mcp-server to communicate with a FHIR server (in this case Medplum) to answer questions. You will see, among other things:
request_patient_resource tool which retrieves basic patient informationrequest_condition_resource tool to answer the question whether any of the previously diagnosed diseases may cause symptoms that the patient is currently complaining aboutrequest_medication_resource, request_encounter_resource, request_generic_resource tools to answer the question whether the patient has already received any treatment for hypertensionYou can observe how Claude automatically selects the tools worth using to answer the question based on the user's query.
https://github.com/user-attachments/assets/3a3a8ed3-f881-447d-af03-5f24432a2cdd
Here you can observe how Claude first uses the tool searching for LOINC codes for the lipid panel specific codes, but not finding any related observations in FHIR server, it repeats the search for individual biomarkers that make up such a panel.
https://github.com/user-attachments/assets/2fb39801-d5d6-4461-bedd-9f58ab4d52ec
Developers working with FHIR often need to generate specific test data to validate FHIR server functionality, such as search capabilities and data relationships. While you can use Synthea to generate synthetic data and then manually import the resulting bundles to your server, fhir-mcp-server streamlines this process by allowing you to generate and deploy test data directly through Claude.
This eliminates the typical workflow of running synthea separately, downloading bundles, and manually importing them to your FHIR server. Instead, you can create targeted test scenarios, generate appropriate synthetic data, and populate your server all within Claude's interface.
https://github.com/user-attachments/assets/d87da1d8-6401-4a9e-a6f0-50ba23396e12
Note: fhir-mcp-server was not designed with this use case in mind, so as you'll see in the demo, it doesn't work perfectly - what can be observed, however, is how well the LLM handles using trial and error to correct any wrong choices.
Follow these steps to set up FHIR MCP Server in your environment.
Docker (recommended) or uv: For dependency management
FHIR Server Account: Access to FHIR API (e.g. Medplum)
Pinecone API key (required for document search): Enables vector-based search over processed documents. Without it, semantic retrieval features will be unavailable.
LOINC Account (optional): Enables retrieval of the latest LOINC codes from the official API. Without it, the system relies on static or language model-inferred codes, which may be outdated or imprecise.
Clone the repository:
Set up environment variables:
Edit the config/.env file with your credentials and configuration. See Environment Variables
Install Dependencies
For Docker-based execution run:
For uv-based execution run:
Update the MCP Client configuration
e.g. Claude Desktop -> edit claude_desktop_config.json
Docker
Make sure to replace <your-project-path> with the actual path to your installation
uv
Firstly, get uv path from terminal:
Windows:
MacOS/Linux:
Then, update config file:
Make sure to replace with the actual uv path (to bin folder)
Restart MCP Client
After completing all of the above steps, restart the MCP Client to apply the changes. In some cases, you may need to terminate all related processes using Task Manager or your system's process manager. This ensures that:
The FHIR MCP Server includes built-in encryption infrastructure to protect sensitive configuration values. Sensitive fields like API keys and passwords are automatically encrypted and decrypted at runtime.
You are allowed to store passwords as a plain text, but if you want to have them encrypted, follow the instruction below.
For most users, use the automated setup script:
This script will:
MASTER_KEY in config/.env and generate one if neededLOINC_PASSWORD, FHIR_SERVER_CLIENT_SECRET, PINECONE_API_KEY).env file with encrypted valuesFactual signals from GitHub, npm, and our automated checks — not a rating.
No reviews yet — be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/the-momentum-fhir-mcp-server)<a href="https://allmcps.com/mcp/the-momentum-fhir-mcp-server"><img src="https://allmcps.com/api/badge/the-momentum-fhir-mcp-server?style=directory" alt="Fhir MCP Server on AllMCPs" /></a>