
MCP FHIR Server
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.
flexpa
README
@flexpa/mcp-fhir
[!WARNING] 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
[!TIP] "Resources" here refers to the MCP definition not 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://
URIs - Resources are returned in FHIR JSON format
- Supports all FHIR Resource types available in the FHIR server's CapabilityStatement
Tools
search_fhir
- Search FHIR resources- Takes
resourceType
andsearchParams
as parameters - Returns FHIR search results
- Takes
read_fhir
- Read an individual FHIR resource- Takes
uri
as a parameter - Returns the FHIR resource in JSON format
- Takes
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 install
Build the server:
npm run build
For development with auto-rebuild:
npm run watch
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
{
"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 inspector
The Inspector will provide a URL to access debugging tools in your browser.
Recommended Servers
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.
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.
serper-search-scrape-mcp-server
This Serper MCP Server supports search and webpage scraping, and all the most recent parameters introduced by the Serper API, like location.
The Verge News MCP Server
Provides tools to fetch and search news from The Verge's RSS feed, allowing users to get today's news, retrieve random articles from the past week, and search for specific keywords in recent Verge content.
Google Search Console MCP Server
A server that provides access to Google Search Console data through the Model Context Protocol, allowing users to retrieve and analyze search analytics data with customizable dimensions and reporting periods.
Crypto Price & Market Analysis MCP Server
A Model Context Protocol (MCP) server that provides comprehensive cryptocurrency analysis using the CoinCap API. This server offers real-time price data, market analysis, and historical trends through an easy-to-use interface.
MCP PubMed Search
Server to search PubMed (PubMed is a free, online database that allows users to search for biomedical and life sciences literature). I have created on a day MCP came out but was on vacation, I saw someone post similar server in your DB, but figured to post mine.
dbt Semantic Layer MCP Server
A server that enables querying the dbt Semantic Layer through natural language conversations with Claude Desktop and other AI assistants, allowing users to discover metrics, create queries, analyze data, and visualize results.
Tavily MCP Server
Provides AI-powered web search capabilities using Tavily's search API, enabling LLMs to perform sophisticated web searches, get direct answers to questions, and search recent news articles.
mixpanel
Connect to your Mixpanel data. Query events, retention, and funnel data from Mixpanel analytics.