Connects to SMART on FHIR servers, enabling access to healthcare data with proper authentication via access tokens.
@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
resourceType
andsearchParams
as parametersReturns FHIR search results
read_fhir
- Read an individual FHIR resourceTakes
uri
as a parameterReturns the FHIR resource in JSON format
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:
Build the server:
For development with auto-rebuild:
Installation
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
Debugging
Since MCP servers communicate over stdio, debugging can be challenging. We recommend using the MCP Inspector, which is available as a package script:
The Inspector will provide a URL to access debugging tools in your browser.
This server cannot be installed
remote-capable server
The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.
A TypeScript-based MCP server that connects to FHIR servers, allowing access to healthcare data via fhir:// URIs and providing search capabilities for FHIR resources.
Related Resources
Related MCP Servers
- -securityAlicense-qualityAn MCP server that provides healthcare tools for interacting with FHIR data and medical resources on EMRs like Cerner and EpicLast updated -82MIT License
- -securityAlicense-qualityA TypeScript framework for building MCP servers with features for client sessions, authentication, image/audio content, and typed server events.Last updated -MIT License
- AsecurityAlicenseAqualityA Model Context Protocol server that enables standardized interaction with Azure Health Data Services FHIR servers, allowing healthcare data operations through MCP tools.Last updated -113MIT License
- -securityFlicense-qualityAn 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.Last updated -