MCP server providing integration with FHIR APIs for clinical data access using SMART-on-FHIR authentication.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent — or use 1-click editor setup below.
We ran the install command below but it didn't respond within our test window — this can mean a slow first-time install rather than a real problem.
uvx fhir-mcp-serverNo response to initialize.
This is an experimental automated check and can have false negatives — missing environment variables, a slow cold install, etc. It doesn’t necessarily mean something’s wrong. Last checked 1mo ago.
💡 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.
get_capabilitiesRetrieves metadata about a specified FHIR resource type, including its supported search parameters and custom operations.
typeThe FHIR resource type name (e.g., "Patient", "Observation", "Encounter")
searchExecutes a standard FHIR search interaction on a given resource type, returning a bundle or list of matching resources.
searchParamA mapping of FHIR search parameter names to their desired values (e.g., {"family":"Simpson","birthdate":"1956-05-12"}).
response_filter_fhirpaths(Optional) An array of FHIRPath expressions (e.g., `["Patient.name", "Patient.birthDate", "Bundle.link.where(relation='next').url"]`) to apply to the resources in the response bundle.
readPerforms a FHIR "read" interaction to retrieve a single resource instance by its type and resource ID, optionally refining the response with search parameters or custom operations.
The FHIR MCP Server is a Model Context Protocol (MCP) server that provides seamless integration with FHIR APIs. Designed for developers, integrators, and healthcare innovators, this server acts as a bridge between modern AI/LLM tools and healthcare data, making it easy to search, retrieve, and analyze clinical information.
This video showcases the MCP server's functionality when connected to a public HAPI FHIR server. This example showcases direct interaction with an open FHIR server that does not require an authorization flow.
https://github.com/user-attachments/assets/cc6ac87e-8329-4da4-a090-2d76564a3abf
This video showcases the MCP server's capabilities within the Epic EHR ecosystem. It demonstrates the complete OAuth 2.0 Authorization Code Grant flow.
https://github.com/user-attachments/assets/96b433f1-3e53-4564-8466-65ab48d521de
MCP-compatible transport: Serves FHIR via stdio, SSE, or streamable HTTP
SMART-on-FHIR based authentication support: Securely authenticate with FHIR servers and clients
Response Filtering using FHIRPath: Filter resources and bundles returned by read and search operations using custom FHIRPath expressions to retrieve only the fields needed for the task, reducing payload sizes.
Tool integration: Integratable with any MCP client such as VS Code, Claude Desktop, and MCP Inspector
You can use the FHIR MCP Server by installing our Python package, or by cloning this repository.
Configure Environment Variables:
To run the server, you must set FHIR_SERVER_BASE_URL.
FHIR_SERVER_BASE_URL, FHIR_SERVER_CLIENT_ID, FHIR_SERVER_CLIENT_SECRET, and FHIR_SERVER_SCOPES. Authorization is enabled by default.FHIR_SERVER_DISABLE_AUTHORIZATION to True.By default, the MCP server runs on http://localhost:8000, and you can customize the host and port using FHIR_MCP_HOST and FHIR_MCP_PORT.
You can set these by exporting them as environment variables like below or by creating a .env file (referencing .env.example).
Install the PyPI package and run the server
Clone the repository:
Create a virtual environment and install dependencies:
Or with pip:
Configure Environment Variables: Copy the example file and customize if needed:
Run the server:
You can run the MCP server using Docker for a consistent, isolated environment.
Note on Authorization: When running the MCP server locally via Docker or Docker Compose, authorization should be disabled by setting the environment variable,
FHIR_SERVER_DISABLE_AUTHORIZATION=True. This would be fixed in the future releases.
Build the Docker Image or pull the docker image from the container registry:
Configure Environment Variables
Copy the example environment file and edit as needed:
Alternatively, you can pass environment variables directly with -e flags or use Docker secrets for sensitive values. See the Configuration section for details on available environment variables.
Run the Container
This will start the server and expose it on port 8000. Adjust the port mapping as needed.
For a quick setup that includes both the FHIR MCP server and a HAPI FHIR server (with PostgreSQL), use the provided docker-compose.yml. This sets up an instant development environment for testing FHIR operations.
Prerequisites:
Run the Stack:
This command will:
FHIR_SERVER_BASE_URL set to http://hapi-r4-postgresql:8080/fhir.Access the Services:
docker-compose down.Configure Additional Environment Variables:
If you need to customize OAuth or other settings, adjust the env variables in the docker-compose.yml. The compose file sets basic configuration; refer to the Configuration section for full options.
The FHIR MCP Server is designed for seamless integration with various MCP clients.
Add the following JSON block to your MCP configuration file in VS Code (> V1.104). You can do this by pressing Ctrl + Shift + P and typing MCP: Open User Configuration.
| Streamable HTTP | STDIO | SSE |
|---|---|---|
Factual 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/wso2-fhir-mcp-server)<a href="https://allmcps.com/mcp/wso2-fhir-mcp-server"><img src="https://allmcps.com/api/badge/wso2-fhir-mcp-server?style=directory" alt="Fhir MCP Server on AllMCPs" /></a>