FHIR MCP Server
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@FHIR MCP ServerFind patients named Smith and summarize their conditions."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
FHIR MCP Server
An MCP (Model Context Protocol) server that gives AI assistants safe, read-only access to healthcare data using the FHIR R4 standard — built on a public sandbox, so it's completely safe to run, share, and extend.
Instead of an AI assistant guessing at what a "patient," "observation," or "condition" looks like, this server lets it query real FHIR-shaped data through a small set of well-defined, guardrailed tools.
⚠️ Data note: This project connects to the SMART Health IT public sandbox (
r4.smarthealthit.org), which serves synthetic, non-real test data for development purposes. No real patient data is used or stored anywhere in this project. This is a technical demonstration of AI-assisted healthcare data workflows — not a clinical or diagnostic tool.
Why this project exists
Healthcare data is one of the most valuable — and most sensitive — domains for AI to work in. Most public MCP examples connect AI to generic APIs (weather, GitHub, Slack). This one demonstrates something closer to real enterprise work: giving an AI assistant controlled, read-only access to structured clinical data, with the same instincts you'd want in a production system — least privilege, hard limits, and no write access at all.
It pairs naturally with an orchestrating agent: point an AI assistant (Claude, or any MCP-compatible client) at this server, and it can look up patients, pull their vitals, and summarize conditions in plain language — all through auditable, typed tool calls instead of free-form scraping.
Related MCP server: MCP FHIR Server
Tools
Tool | What it does |
| Search the sandbox for patients by name |
| Get demographic details for a patient by id |
| Get recent vitals/lab observations for a patient |
| Get a plain-language summary of a patient's recorded conditions |
All tools are read-only — there is no create, update, or delete capability anywhere in this server, by design.
Guardrails
This server is built with the same discipline you'd want in any production integration:
Read-only, always. No write, update, or delete operations exist in the codebase.
Result caps. Every query is capped (default 10, max 20 results) to prevent runaway responses.
Request timeouts. All outbound FHIR requests time out after 10 seconds.
Sandbox-only data source. Points exclusively at a public, synthetic FHIR test server — never a production or real clinical system.
Getting started
Prerequisites
Node.js 18+
An MCP-compatible client (e.g. Claude Desktop, or any client supporting the MCP stdio transport)
Install & build
git clone https://github.com/brianbastian01/fhir-mcp-server.git
cd fhir-mcp-server
npm install
npm run buildRun it
npm startThe server communicates over stdio, so in practice you'll point your MCP client at it rather than running it standalone. For example, in Claude Desktop's config:
{
"mcpServers": {
"fhir": {
"command": "node",
"args": ["/absolute/path/to/fhir-mcp-server/dist/index.js"]
}
}
}Restart your MCP client, and the four tools above will be available for the AI to call.
Try it
Once connected, ask your AI assistant something like:
"Search the FHIR sandbox for patients named Smith, then summarize the conditions for the first result."
The assistant will call search_patients, then summarize_conditions, and give you a plain-language answer — all backed by real tool calls you can inspect.
Project structure
fhir-mcp-server/
├── src/
│ └── index.ts # Server setup + all four tool definitions
├── dist/ # Compiled output (generated by `npm run build`)
├── package.json
├── tsconfig.json
├── LICENSE
└── README.mdRoadmap / ideas for extending this
Add a
medicationstool (FHIRMedicationRequestresource)Add pagination support for large result sets
Add an in-memory cache to reduce repeated calls to the sandbox
Swap the sandbox URL for a real FHIR server behind proper auth (OAuth2/SMART on FHIR) for a production-grade version
Pair with a small orchestrating agent that chains these tools automatically
About
Built by Brian Bastian, Solution Architect with 14+ years in enterprise software, cloud architecture, and — more recently — AI-assisted engineering, agents, and MCP servers.
License
MIT — see LICENSE.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- -license-quality-maintenanceEnables AI assistants to securely access Epic Healthcare Systems patient data through FHIR R4 API integration. Provides tools for searching patients, retrieving clinical summaries, vital signs, medications, and generating healthcare reports with HIPAA-compliant OAuth 2.0 authentication.
- FlicenseAqualityDmaintenanceProvides read/write access to any FHIR-compliant healthcare API with built-in validation, supporting resource management, search operations, and granular permissions through natural language.51
- AlicenseAqualityAmaintenanceProvides seamless integration with FHIR APIs, enabling AI/LLM tools to search, retrieve, and analyze clinical healthcare data with support for SMART-on-FHIR authentication and multiple transport protocols.7129Apache 2.0
- Alicense-qualityBmaintenanceEnables AI applications to securely search and manage healthcare data from FHIR R4-compliant servers with built-in safety validation for AI-generated clinical observations, preventing recording of physiologically impossible values.8MIT
Related MCP Connectors
Securely access and manage FHIR healthcare data stored in Medplum.
Guardrailed FHIR access for AI agents: PHI redaction, audit trail, step-up auth, tenant isolation
Hosted MCP endpoint with realistic fake data for prototyping agents. 12 tools, no setup.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/brianbastian01/fhir-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server