Skip to main content
Glama

MCP FHIR Server

by flexpa

@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 and searchParams as parameters
    • Returns FHIR search results
  • read_fhir - Read an individual FHIR resource
    • Takes uri as a parameter
    • Returns the FHIR resource in JSON format

Configuration

The server requires the following environment variables:

  • FHIR_BASE_URL: The base URL of your FHIR server
  • FHIR_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.

-
security - not tested
A
license - permissive license
-
quality - not tested

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.

  1. Features
    1. Resources
    2. Tools
  2. Configuration
    1. Development
      1. Installation
        1. Debugging

      Related MCP Servers

      • -
        security
        A
        license
        -
        quality
        An MCP server that provides healthcare tools for interacting with FHIR data and medical resources on EMRs like Cerner and Epic
        Last updated -
        70
        JavaScript
        MIT License
        • Apple
      • -
        security
        A
        license
        -
        quality
        A TypeScript framework for building MCP servers with features for client sessions, authentication, image/audio content, and typed server events.
        Last updated -
        TypeScript
        MIT License
      • A
        security
        A
        license
        A
        quality
        A Model Context Protocol server that enables standardized interaction with Azure Health Data Services FHIR servers, allowing healthcare data operations through MCP tools.
        Last updated -
        1
        11
        Python
        MIT License
        • Apple
        • Linux
      • -
        security
        F
        license
        -
        quality
        An 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 -
        Python
        • Linux
        • Apple

      View all related MCP servers

      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/flexpa/mcp-fhir'

      If you have feedback or need assistance with the MCP directory API, please join our Discord server