FHIR MCP Server

FHIR MCP Server – helping you expose any FHIR Server or API as a MCP Server.

Local serverstdioPython

What is the FHIR MCP server?

FHIR MCP server exists for a simple reason — assistants are far more useful when they can act on FHIR directly instead of describing what you should do. FHIR MCP Server – helping you expose any FHIR Server or API as a MCP Server.

What you get

The FHIR MCP Server is a Model Context Protocol (MCP) server that provides seamless integration with FHIR APIs. Designed for developers, integrators, and healthcare innovators, this server acts as a bridge between modern AI/LLM tools and healthcare data, making it easy to search, retrieve, and analyze clinical information.

Setting it up

Installation goes through your MCP client rather than a global install: point it at @modelcontextprotocol/inspector on npm and it is fetched when the client starts. The copy-paste blocks for Claude Desktop, Claude Code and Cursor are further down this page.

What the assistant can call

Once FHIR is connected, these are the calls the assistant has available:

  • get_capabilities — Retrieves metadata about a specified FHIR resource type, including its supported search parameters and custom operations
  • type — The FHIR resource type name (e.g., "Patient", "Observation", "Encounter")
  • search — Executes a standard FHIR search interaction on a given resource type, returning a bundle or list of matching resources
  • searchParam — A mapping of FHIR search parameter names to their desired values (e.g., {"family":"Simpson","birthdate":"1956-05-12"})
  • response_filter_fhirpaths — (Optional) An array of FHIRPath expressions (e.g., ["Patient.name", "Patient.birthDate", "Bundle.link.where(relation='next').url"]) to apply to the
  • read — Performs a FHIR "read" interaction to retrieve a single resource instance by its type and resource ID, optionally refining the response with search
  • operation — The name of a custom FHIR operation or extended query defined for the resource (e.g., "$everything")
  • create — Executes a FHIR "create" interaction to persist a new resource of the specified type
  • payload — A JSON object representing the full FHIR resource body to be created
  • update — Performs a FHIR "update" interaction by replacing an existing resource instance's content with the provided payload
  • delete — Execute a FHIR "delete" interaction on a specific resource instance
  • get_user — Retrieves the currently authenticated user's FHIR resource (for example the linked Patient resource) and returns a concise profile containing

Configuration and credentials

You will need 8 environment variables: FHIR_SERVER_ACCESS_TOKEN, FHIR_SERVER_BASE_URL, FHIR_SERVER_CLIENT_ID, FHIR_SERVER_CLIENT_SECRET, FHIR_SERVER_SCOPES, FHIR_MCP_HOST, FHIR_MCP_PORT, FHIR_MCP_SERVER_URL. The server will not start without them, which is usually why the tools fail to appear on a first run. Keep credentials in your client's env block or a secrets manager rather than in a file you might commit.

  • Python 3.8+ - uv (for dependency management) - An accessible FHIR API server.

Before you rely on it

  • It runs with your machine's permissions. That is convenient and also the reason to think about what you point it at before you approve a tool call.
  • With 12 tools registered it takes up a noticeable share of the context window; turn it off in projects that never touch FHIR.
  • Missing credentials fail quietly in some clients — if no tools show up, check the environment block first.
  • MCP clients confirm each tool call by default. Leave that on until you have watched what the fhir mcp server does with a few real requests.

Choosing this one

Among the developer tooling options, the useful question is rarely "what can it do" but "what does it cost you to run" — permissions, credentials, and how much of your context its toolset consumes. FHIR's toolset — get_capabilities, type, search and 9 more — is a fair guide to whether it matches your workflow.

SyncDev reviews every entry in this directory against the project's own documentation before publishing, and revisits them as servers change.

Available tools

ToolWhat it does
get_capabilitiesRetrieves metadata about a specified FHIR resource type, including its supported search parameters and custom operations.
typeThe FHIR resource type name (e.g., "Patient", "Observation", "Encounter")
searchExecutes a standard FHIR search interaction on a given resource type, returning a bundle or list of matching resources.
searchParamA mapping of FHIR search parameter names to their desired values (e.g., {"family":"Simpson","birthdate":"1956-05-12"}).
response_filter_fhirpaths(Optional) An array of FHIRPath expressions (e.g., ["Patient.name", "Patient.birthDate", "Bundle.link.where(relation='next').url"]) to apply to the resources in the response bundle.
readPerforms a FHIR "read" interaction to retrieve a single resource instance by its type and resource ID, optionally refining the response with search parameters or custom operations.
operationThe name of a custom FHIR operation or extended query defined for the resource (e.g., "$everything").
createExecutes a FHIR "create" interaction to persist a new resource of the specified type.
payloadA JSON object representing the full FHIR resource body to be created.
updatePerforms a FHIR "update" interaction by replacing an existing resource instance's content with the provided payload.
deleteExecute a FHIR "delete" interaction on a specific resource instance.
get_userRetrieves the currently authenticated user's FHIR resource (for example the linked Patient resource) and returns a concise profile containing available demographic fields such as id, name, and birthDate.

How to install the FHIR MCP server

{
    "mcpServers": {
        "fhir": {
            "command": "npx",
            "args": [
                "-y",
                "mcp-remote",
                "http://localhost:8000/mcp"
            ]
        }
    }
}

Configuration as documented by the project. Restart the client after saving.

Configuration

  • Python 3.8+ - uv (for dependency management) - An accessible FHIR API server.
VariableDescriptionRequired
FHIR_SERVER_ACCESS_TOKENCredential the server authenticates with.Yes
FHIR_SERVER_BASE_URLEndpoint or connection string the server talks to.Yes
FHIR_SERVER_CLIENT_IDConfiguration value read at startup.Optional
FHIR_SERVER_CLIENT_SECRETCredential the server authenticates with.Yes
FHIR_SERVER_SCOPESConfiguration value read at startup.Optional
FHIR_MCP_HOSTEndpoint or connection string the server talks to.Optional
FHIR_MCP_PORTConfiguration value read at startup.Optional
FHIR_MCP_SERVER_URLEndpoint or connection string the server talks to.Yes

Example prompts to try

  • Use FHIR to get capabilities.
  • Use FHIR to type.
  • Use FHIR to search.

Frequently asked questions

It connects FHIR to MCP-compatible AI assistants such as Claude and Cursor, exposing 12 tools (get_capabilities, type, search, and more) that the assistant can call on your behalf. Instead of copying data back and forth by hand, the assistant works with FHIR directly.