FHIR MCP Server
Enables AI applications to query and retrieve healthcare data (patients, conditions, observations, medications) from a public FHIR R4 server via MCP tools.
README
š„ FHIR MCP Server
A FastMCP server that exposes healthcare data from the Public HAPI FHIR R4 Server using the Model Context Protocol (MCP).
This project demonstrates how AI applications can interact with standardized Electronic Health Record (EHR) data through FHIR resources.
Features
- Search patients by name
- Retrieve patient demographics
- Retrieve medical conditions
- Retrieve observations
- Retrieve medication requests
- Async communication using HTTPX
- Compatible with MCP Inspector
- Built using FastMCP
Technologies
- Python 3.11+
- FastMCP
- MCP
- HTTPX
- FHIR R4
- Public HAPI FHIR Server
Project Structure
fhir-mcp-server/
ā
āāā server.py
āāā requirements.txt
āāā README.md
āāā LICENSE
āāā .gitignore
ā
āāā screenshots/
ā āāā home.png
ā āāā search_patient.png
ā āāā get_patient.png
ā āāā get_conditions.png
ā āāā get_observations.png
ā āāā get_medications.png
ā āāā architecture.png
ā
āāā docs/
āāā architecture.md
Installation
Clone the repository:
git clone https://github.com/baala-saravanan/fhir-mcp-server.git
cd fhir-mcp-server
Create a virtual environment:
python -m venv .venv
Activate the environment:
Windows:
.venv\Scripts\activate
Install dependencies:
pip install -r requirements.txt
Running the Project
Launch the MCP development server:
mcp dev server.py
The MCP Inspector will open automatically in your browser.
Available MCP Tools
| Tool | Description |
|---|---|
| search_patient | Search patients by name |
| get_patient | Retrieve patient demographics |
| get_conditions | Retrieve patient conditions |
| get_observations | Retrieve laboratory results and observations |
| get_medications | Retrieve medication history |
Data Source
Public HAPI FHIR R4 Test Server
https://hapi.fhir.org/baseR4
This server provides synthetic healthcare data for development and testing.
Architecture
The application follows the Model Context Protocol (MCP) architecture.
See:
docs/architecture.mdscreenshots/architecture.png
Screenshots
The project includes screenshots demonstrating the available MCP tools.
- Home
- Search Patient
- Get Patient
- Get Conditions
- Get Observations
- Get Medications
- Architecture Diagram
Future Improvements
- Patient Timeline
- Clinical Summary
- Laboratory Trend Analysis
- Medication Intelligence
- Clinical Decision Support
- AI-powered Patient Summaries
- Streamlit Dashboard
- FastAPI Backend
- LLM Integration
License
This project is licensed under the MIT License.
See the LICENSE file for details.
Author
Bala Saravanan Muthukumar
- Data Scientist
- Biomedical Engineer
- AI & Healthcare Enthusiast
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.
E2B
Using MCP to run code via e2b.