MCP FHIR Server
Connects to SMART on FHIR servers, enabling access to healthcare data with proper authentication via access tokens.
Click on "Deploy 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., "@MCP FHIR Serversearch for patients named Smith born after 2000"
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.
@flexpa/mcp-fhir
This is an experimental demo not intended for production use.
This is a TypeScript-based MCP server that connects to a FHIR server. It provides core MCP functionality for interacting with FHIR resources by:
Accessing FHIR resources via URIs
Providing search capabilities for FHIR resources
Features
Resources
"Resources" here refers to the MCP definitionnot the FHIR one. MCP Resources are a core primitive in the Model Context Protocol (MCP) that allow servers to expose data and content that can be read by clients and used as context for LLM interactions.
List and access FHIR resources via
fhir://URIsResources are returned in FHIR JSON format
Supports all FHIR Resource types available in the FHIR server's CapabilityStatement
Tools
search_fhir- Search FHIR resourcesTakes
resourceTypeandsearchParamsas parametersReturns FHIR search results
read_fhir- Read an individual FHIR resourceTakes
urias a parameterReturns the FHIR resource in JSON format
Related MCP server: Myrcael
Configuration
The server requires the following environment variables:
FHIR_BASE_URL: The base URL of your FHIR serverFHIR_ACCESS_TOKEN: A SMART on FHIR access token for authentication
Development
Install dependencies:
npm installBuild the server:
npm run buildFor development with auto-rebuild:
npm run watchInstallation
To use with Claude Desktop, add the server config:
On MacOS: ~/Library/Application Support/Claude/claude_desktop_config.json
On Windows: %APPDATA%/Claude/claude_desktop_config.json
{
"mcpServers": {
"fhir": {
"command": "/path/to/@flexpa/mcp-fhir/build/index.js"
},
"env": {
"FHIR_BASE_URL": "<FHIR_BASE_URL>",
"FHIR_ACCESS_TOKEN": "<FHIR_ACCESS_TOKEN>"
}
}
}Debugging
Since MCP servers communicate over stdio, debugging can be challenging. We recommend using the MCP Inspector, which is available as a package script:
npm run inspectorThe Inspector will provide a URL to access debugging tools in your browser.
Related MCP Connectors
Hosted MCP server for the Healthie EHR & telehealth API: patients, appointments, charting, tasks.
MCP server for US nursing facility search and ownership lookup (NursingHomeDatabase).
An MCP server that provides read access to your cloud storage providers, bank accounts and more.
MCP server for secureFlows: token-free URL builders and integration-linting tools for AI agents.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceAn MCP server that provides healthcare tools for interacting with FHIR data and medical resources on EMRs like Cerner and Epic1MIT
- -licenseNot gradedqualityNot gradedmaintenanceA TypeScript framework for building MCP servers with features for client sessions, authentication, image/audio content, and typed server events.-
- AlicenseAqualityDmaintenanceA Model Context Protocol server that enables standardized interaction with Azure Health Data Services FHIR servers, allowing healthcare data operations through MCP tools.118MIT
- FlicenseNot gradedqualityDmaintenanceAn MCP server that enables interaction with Google's Cloud Healthcare API, allowing users to manage healthcare data, FHIR resources, DICOM stores, and healthcare datasets through natural language commands.-