Fhir MCP Server logo

Fhir MCP Server

by wso2

Connects AI assistants to FHIR APIs for authenticated search, retrieval, filtering, and resource management.

Install Fhir MCP Server

Pick your client, then add it in one click or paste the config.

STDIOPython
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "wso2-fhir-mcp-server": {
      "command": "uvx",
      "args": [
        "fhir-mcp-server"
      ],
      "env": {
        "FHIR_SERVER_BASE_URL": "YOUR_VALUE_HERE",
        "FHIR_SERVER_CLIENT_ID": "YOUR_VALUE_HERE",
        "FHIR_SERVER_CLIENT_SECRET": "YOUR_VALUE_HERE",
        "FHIR_SERVER_SCOPES": "YOUR_VALUE_HERE",
        "FHIR_SERVER_DISABLE_AUTHORIZATION": "YOUR_VALUE_HERE",
        "FHIR_MCP_HOST": "YOUR_VALUE_HERE",
        "FHIR_MCP_PORT": "YOUR_VALUE_HERE"
      }
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

Values are written into the snippet above so you can paste it as is. They never leave your browser.

Install not yet sandbox-tested— we haven't run this command through our automated sandbox yet. Not a red flag; we're working through the catalog.

Overview

wso2/fhir-mcp-server connects MCP clients to FHIR APIs and exposes tools for discovering resource capabilities, searching, reading, creating, updating, and deleting FHIR resources. It supports stdio, SSE, and streamable HTTP transports, along with SMART-on-FHIR authentication. Search and read responses can be reduced with FHIRPath expressions, which is useful when an assistant only needs selected clinical fields. Reach for it when an AI workflow needs to work with an accessible FHIR server such as HAPI FHIR, an Epic sandbox, or a WSO2 FHIR deployment.

Use cases

  • Search Patient records by demographic criteria
  • Retrieve selected fields from clinical resource bundles
  • Create or update FHIR resources from an MCP client
  • Invoke custom FHIR operations such as $everything
  • Identify the authenticated user’s linked FHIR resource

Key features

  • FHIR resource capability discovery
  • Standard FHIR search and read operations
  • Create, update, and delete resource operations
  • SMART-on-FHIR authentication support
  • FHIRPath response filtering
  • stdio, SSE, and streamable HTTP transports

Tools13

What Fhir MCP Server lets your agent do. Expand a tool for its parameters.

Self-reported~402 tokens of context

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked Today

Recent health check succeeded.

23/24 checks healthy over the last 85d

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 16d ago via OSV.dev · fhir-mcp-server (PyPI)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars137Stargazers on the source repository.
Last commit1d agoMost recent push to the default branch.
Tools exposed13Callable tools this server registers over MCP.
Directory activity6 viewsConfig copies, upvotes, and views on AllMCPs.

How Fhir MCP Server works

What wso2/fhir-mcp-server does

wso2/fhir-mcp-server exposes FHIR API operations through the Model Context Protocol. It gives an MCP client access to resource metadata, standard searches, individual resource reads, custom operations, and write operations. Supported writes include creating a resource, replacing an existing resource with an update, and deleting a resource instance.

The server also provides a user-focused lookup that returns the authenticated user’s FHIR resource, such as a linked Patient record, with concise demographic fields including an ID, name, and birth date. This can support assistants that need to identify the current user before querying related data.

How it works

The server targets an externally accessible FHIR API configured through its base URL. MCP clients communicate with it over stdio, Server-Sent Events, or streamable HTTP. The default network endpoint listens on localhost port 8000 when the HTTP-based configuration is used, with host and port settings available for customization.

Authentication uses SMART-on-FHIR settings by default. Client credentials and requested scopes are supplied through environment variables, while authorization can be disabled for suitable local or unauthenticated FHIR environments. The repository demonstrates connections to a public HAPI FHIR server and an Epic sandbox, including an OAuth 2.0 authorization code flow for the latter.

Search accepts a FHIR resource type and a mapping of search parameter names to values, then returns matching resources in a bundle or list. Reads can target a resource ID and can invoke a custom operation such as $everything. Search and read results may be narrowed with FHIRPath expressions, including paths that select fields or retrieve a pagination link.

Setup and configuration

Python 3.8 or newer and an accessible FHIR API are prerequisites. The package can be run with uvx fhir-mcp-server, or installed from source in a virtual environment using uv or pip. A Docker image is also available, and the project includes a Docker Compose setup that starts a WSO2 FHIR Server with PostgreSQL alongside the MCP server.

At minimum, configure FHIR_SERVER_BASE_URL. With authorization enabled, also configure FHIR_SERVER_CLIENT_ID, FHIR_SERVER_CLIENT_SECRET, and FHIR_SERVER_SCOPES. For an unauthenticated local setup, set FHIR_SERVER_DISABLE_AUTHORIZATION=True. FHIR_MCP_HOST and FHIR_MCP_PORT change the MCP server’s bind address and port. Environment variables can be exported directly or placed in a .env file.

VS Code and Claude Desktop are documented MCP client integrations. MCP Inspector is also listed as a client for testing or inspecting the server.

Tools and capabilities

  • get_capabilities reports metadata for a FHIR resource type, including available search parameters and custom operations.
  • search performs a standard FHIR search and accepts optional FHIRPath response filtering.
  • read retrieves one resource by type and ID, with support for optional parameters and custom operations.
  • create persists a supplied JSON FHIR resource.
  • update replaces the contents of an existing resource with a supplied payload.
  • delete removes a specified resource instance.
  • get_user returns a concise profile for the authenticated user’s FHIR resource.

Limitations and notes

The server depends on a reachable FHIR API and on that API supporting the requested resource types, parameters, and operations. Authentication settings must match the target FHIR deployment. For local Docker or Docker Compose use, the project recommends disabling authorization. The Compose configuration is intended for development and removes database data when docker compose down is used; docker compose stop preserves it between runs.

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Fhir MCP Server

wso2/fhir-mcp-server is an MCP server that connects AI assistants to FHIR APIs. Its tools discover resource capabilities, search and read clinical resources, apply FHIRPath response filters, create, update, and delete resources, invoke custom operations, and retrieve the authenticated user’s FHIR profile.

Install it with the Python package and run `uvx fhir-mcp-server`, or clone the repository and install its requirements in a virtual environment. Docker and Docker Compose are also supported. Configure the FHIR server environment variables before starting it.

Set `FHIR_SERVER_BASE_URL` for the target FHIR API. Authorization additionally uses `FHIR_SERVER_CLIENT_ID`, `FHIR_SERVER_CLIENT_SECRET`, and `FHIR_SERVER_SCOPES`. Set `FHIR_SERVER_DISABLE_AUTHORIZATION=True` for an unauthenticated setup, and use `FHIR_MCP_HOST` or `FHIR_MCP_PORT` to change the listener.

Cursor is not listed among the documented client integrations. The project documents VS Code, Claude Desktop, and MCP Inspector, and supports standard MCP transports including stdio, SSE, and streamable HTTP.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewFhir MCP Server AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/wso2-fhir-mcp-server?style=directory)](https://allmcps.com/mcp/wso2-fhir-mcp-server)
HTML Embed
<a href="https://allmcps.com/mcp/wso2-fhir-mcp-server"><img src="https://allmcps.com/api/badge/wso2-fhir-mcp-server?style=directory" alt="Fhir MCP Server on AllMCPs" /></a>