Skip to content
MCP server

FHIR MCP Server

Let AI assistants search and read FHIR healthcare records with SMART-on-FHIR login

Runs locally

FHIR MCP Server is an open-source MCP server for health and science. It runs locally on your machine and is started by your AI client.

Pricing
Open source
Platforms
CLI, Self-hosted, API
Runs
Locally
Version
0.11.0
Listing updated

Similar MCP servers

Install

Add with the CLI

Run in a terminal

claude mcp add fhir-mcp-server --env FHIR_SERVER_BASE_URL='<FHIR_SERVER_BASE_URL>' -- uvx fhir-mcp-server

Add --scope user to use it in every project, or --scope project to share it in .mcp.json.

Or share it with your project

Add to .mcp.json

{
  "mcpServers": {
    "fhir-mcp-server": {
      "command": "uvx",
      "args": [
        "fhir-mcp-server"
      ],
      "env": {
        "FHIR_SERVER_BASE_URL": "<FHIR_SERVER_BASE_URL>"
      }
    }
  }
}

Claude Code setup guide

Add to claude_desktop_config.json

{
  "mcpServers": {
    "fhir-mcp-server": {
      "command": "uvx",
      "args": [
        "fhir-mcp-server"
      ],
      "env": {
        "FHIR_SERVER_BASE_URL": "<FHIR_SERVER_BASE_URL>"
      }
    }
  }
}

Settings → Developer → Edit Config, then quit and reopen Claude Desktop.

Claude Desktop setup guide

Add to ~/.cursor/mcp.json

{
  "mcpServers": {
    "fhir-mcp-server": {
      "command": "uvx",
      "args": [
        "fhir-mcp-server"
      ],
      "env": {
        "FHIR_SERVER_BASE_URL": "<FHIR_SERVER_BASE_URL>"
      }
    }
  }
}

Use .cursor/mcp.json in a project to share it with the project.

Cursor setup guide

Add to ~/.copilot/mcp-config.json

{
  "mcpServers": {
    "fhir-mcp-server": {
      "type": "stdio",
      "command": "uvx",
      "args": [
        "fhir-mcp-server"
      ],
      "env": {
        "FHIR_SERVER_BASE_URL": "<FHIR_SERVER_BASE_URL>"
      }
    }
  }
}

Or put the same entry in .mcp.json at your workspace root to share it.

VS Code setup guide

Add with the CLI

Run in a terminal

codex mcp add fhir-mcp-server --env FHIR_SERVER_BASE_URL='<FHIR_SERVER_BASE_URL>' -- uvx fhir-mcp-server

Or add to config.toml

Add to ~/.codex/config.toml

[mcp_servers.fhir-mcp-server]
command = "uvx"
args = ["fhir-mcp-server"]
env = { FHIR_SERVER_BASE_URL = "<FHIR_SERVER_BASE_URL>" }

Codex setup guide

Add to your client's MCP settings (most use this shape)

{
  "mcpServers": {
    "fhir-mcp-server": {
      "command": "uvx",
      "args": [
        "fhir-mcp-server"
      ],
      "env": {
        "FHIR_SERVER_BASE_URL": "<FHIR_SERVER_BASE_URL>"
      }
    }
  }
}
  • Gemini CLI and Antigravity

    Gemini CLI

    Add to ~/.gemini/settings.json

    {
      "mcpServers": {
        "fhir-mcp-server": {
          "command": "uvx",
          "args": [
            "fhir-mcp-server"
          ],
          "env": {
            "FHIR_SERVER_BASE_URL": "<FHIR_SERVER_BASE_URL>"
          }
        }
      }
    }

    Or run: gemini mcp add -s user -e FHIR_SERVER_BASE_URL='<FHIR_SERVER_BASE_URL>' fhir-mcp-server uvx -- fhir-mcp-server

    Antigravity

    Add to ~/.gemini/config/mcp_config.json

    {
      "mcpServers": {
        "fhir-mcp-server": {
          "command": "uvx",
          "args": [
            "fhir-mcp-server"
          ],
          "env": {
            "FHIR_SERVER_BASE_URL": "<FHIR_SERVER_BASE_URL>"
          }
        }
      }
    }

    Use .agents/mcp_config.json to add it to one workspace only.

    Gemini CLI and Antigravity setup guide

  • Devin Desktop (formerly Windsurf)

    Add to ~/.config/devin/mcp_config.json

    {
      "mcpServers": {
        "fhir-mcp-server": {
          "command": "uvx",
          "args": [
            "fhir-mcp-server"
          ],
          "env": {
            "FHIR_SERVER_BASE_URL": "<FHIR_SERVER_BASE_URL>"
          }
        }
      }
    }

    On Windows the file is %APPDATA%\devin\mcp_config.json. Use .devin/mcp_config.json to share it with a project.

    Devin Desktop setup guide

  • Cline

    Add to cline_mcp_settings.json

    {
      "mcpServers": {
        "fhir-mcp-server": {
          "command": "uvx",
          "args": [
            "fhir-mcp-server"
          ],
          "env": {
            "FHIR_SERVER_BASE_URL": "<FHIR_SERVER_BASE_URL>"
          }
        }
      }
    }

    Open it from the MCP Servers icon → Configure → Configure MCP Servers.

    Cline setup guide

  • Zed

    Add to Zed settings.json

    {
      "context_servers": {
        "fhir-mcp-server": {
          "command": "uvx",
          "args": [
            "fhir-mcp-server"
          ],
          "env": {
            "FHIR_SERVER_BASE_URL": "<FHIR_SERVER_BASE_URL>"
          }
        }
      }
    }

    Open it with zed: open settings file. Merge context_servers into the settings you already have.

    Zed setup guide

  • JetBrains AI Assistant and Junie

    AI Assistant

    Add to Settings → Tools → AI Assistant → Model Context Protocol (MCP) → Add

    {
      "mcpServers": {
        "fhir-mcp-server": {
          "command": "uvx",
          "args": [
            "fhir-mcp-server"
          ],
          "env": {
            "FHIR_SERVER_BASE_URL": "<FHIR_SERVER_BASE_URL>"
          }
        }
      }
    }

    The AI Assistant docs only show command and args. If the env block is ignored, use Junie for this server.

    Junie

    Add to ~/.junie/mcp/mcp.json

    {
      "mcpServers": {
        "fhir-mcp-server": {
          "command": "uvx",
          "args": [
            "fhir-mcp-server"
          ],
          "env": {
            "FHIR_SERVER_BASE_URL": "<FHIR_SERVER_BASE_URL>"
          }
        }
      }
    }

    Use .junie/mcp/mcp.json to share it with a project.

    JetBrains AI Assistant and Junie setup guide

  • Kiro

    Add to ~/.kiro/settings/mcp.json

    {
      "mcpServers": {
        "fhir-mcp-server": {
          "command": "uvx",
          "args": [
            "fhir-mcp-server"
          ],
          "env": {
            "FHIR_SERVER_BASE_URL": "<FHIR_SERVER_BASE_URL>"
          }
        }
      }
    }

    Use .kiro/settings/mcp.json to add it to one workspace only.

    Kiro setup guide

Using several servers? Build one config file with the MCP config generator.

Configuration

  • FHIR_SERVER_BASE_URLBase URL of the FHIR Server (eg: https://hapi.fhir.org/baseR5)Required

About FHIR MCP Server

Point this server at any FHIR API through the FHIR_SERVER_BASE_URL setting (the registry example is the public HAPI R5 test server) and an MCP client can search, retrieve and analyse clinical resources. It is published by WSO2 and installs from PyPI with uvx, from source with uv, or as a container image from GitHub Container Registry.

Authorization follows SMART-on-FHIR and is on by default; set a client ID, secret and scopes, or switch it off for open servers. The README demonstrates both an unauthenticated HAPI FHIR server and the full OAuth 2.0 authorization code flow against the Epic sandbox. Results from read and search calls can be trimmed with FHIRPath expressions, which keeps payloads small for the model.

Transports are stdio, SSE and streamable HTTP, with the HTTP listener on localhost:8000 unless FHIR_MCP_HOST and FHIR_MCP_PORT change it. A docker-compose file also starts a WSO2 FHIR server backed by PostgreSQL for a quick test setup. The README notes that authorization should be disabled when the container runs locally.

What it does

SMART-on-FHIR auth
Authenticates against FHIR servers using client ID, secret and scopes, enabled by default.
FHIRPath response filtering
Limits read and search results to the fields a task needs.
Three transports
Serves over stdio, SSE or streamable HTTP.
Docker compose test stack
Starts the MCP server beside a WSO2 FHIR server and PostgreSQL.
Works with common clients
Documented for VS Code, Claude Desktop and MCP Inspector.

Good for

  • Search patient resources on a FHIR test server
  • Retrieve and summarise clinical records for a prototype
  • Try an Epic sandbox OAuth flow from an AI client
  • Cut large FHIR bundles down with FHIRPath before the model reads them

Pricing

Open source

Open source; needs access to a FHIR server

FHIR MCP Server FAQ

What is required to run FHIR MCP Server?

Python 3.8 or newer, uv, and a reachable FHIR server whose base URL goes in FHIR_SERVER_BASE_URL.

Can I use FHIR MCP Server without logging in?

Yes. Set FHIR_SERVER_DISABLE_AUTHORIZATION to True for open servers such as the public HAPI FHIR server.

How do I install FHIR MCP Server?

Run uvx fhir-mcp-server, install from source with uv, or pull ghcr.io/wso2/fhir-mcp-server.

Which port does FHIR MCP Server use?

Localhost port 8000 by default, configurable with FHIR_MCP_HOST and FHIR_MCP_PORT.

Is FHIR MCP Server free?

Yes. FHIR MCP Server is open source, so you can use and self-host it for free.

How do I add FHIR MCP Server to Claude Code?

Run this command in your terminal: claude mcp add fhir-mcp-server --env FHIR_SERVER_BASE_URL='<FHIR_SERVER_BASE_URL>' -- uvx fhir-mcp-server

What are the best alternatives to FHIR MCP Server?

The closest alternatives to FHIR MCP Server are REA, Context7, Chrome DevTools MCP, Codebase Memory and GitHub.

Where this comes from

  • Description: written from the project's README.
  • Install steps: from the official MCP Registry entry.

How AIPoweredBot checks servers