# fhirhydrant

Connects AI clients to FHIR APIs with tools for resource search, clinical operations, response shaping, and gated writes.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 18
- Author: faulkj
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/faulkj/fhirHydrant
- Updated: 2026-09-15
- HTML: https://affpapa.org/en/nevibecode/mcp/fhirhydrant

## What it does

fhirhydrant connects MCP clients to FHIR APIs from R4 onward. It exposes configured resource access, named operations, terminology actions, and Bundle pagination as agent tools. JSON files control the resource set, while server metadata and granted SMART scopes determine which actions are available.

The server can search and read resources, inspect history, run configured operations, trim output with FHIRPath, and apply byte limits. Write actions stay disabled until `FHIR_WRITE_CAPABILITIES` is configured; batch and transaction Bundles need their own capability setting. SMART Backend Services uses a registered client, a signing private key, and a JWKS endpoint for the corresponding public key. Public test endpoints can run with `FHIR_AUTH=none`.

Node.js `>= 24` is required for startup. MCP results may include PHI, so transcript storage and client logging need to match the compliance rules of your environment.

## Requirements
- Needs: Node.js (commands run via npx)
- Environment variables: `MCP_TRANSPORT`, `FHIR_AUTH`, `FHIR_SERVER_URL`, `FHIR_TOKEN_URL`, `FHIR_CLIENT_ID`, `FHIR_ACTIVE_KEY`, `FHIR_JWKS_URL`, `FHIR_VERSION` — keys and tokens: ask the human for the values, never commit them or put them in shared files.

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add --env MCP_TRANSPORT=<MCP_TRANSPORT> --env FHIR_AUTH=<FHIR_AUTH> --env FHIR_SERVER_URL=<FHIR_SERVER_URL> --env FHIR_TOKEN_URL=<FHIR_TOKEN_URL> --env FHIR_CLIENT_ID=<FHIR_CLIENT_ID> --transport stdio fhirhydrant -- npx -y fhirhydrant
```
Replace <…> with your own values. 3 more environment variables are in the server README

### Codex

**Platform CLI**
```bash
codex mcp add fhirhydrant --env MCP_TRANSPORT=<MCP_TRANSPORT> --env FHIR_AUTH=<FHIR_AUTH> --env FHIR_SERVER_URL=<FHIR_SERVER_URL> --env FHIR_TOKEN_URL=<FHIR_TOKEN_URL> --env FHIR_CLIENT_ID=<FHIR_CLIENT_ID> -- npx -y fhirhydrant
```
Replace <…> with your own values. 3 more environment variables are in the server README

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "fhirhydrant": {
            "command": "npx",
            "args": [
                "-y",
                "fhirhydrant"
            ],
            "env": {
                "MCP_TRANSPORT": "<MCP_TRANSPORT>",
                "FHIR_AUTH": "<FHIR_AUTH>",
                "FHIR_SERVER_URL": "<FHIR_SERVER_URL>",
                "FHIR_TOKEN_URL": "<FHIR_TOKEN_URL>",
                "FHIR_CLIENT_ID": "<FHIR_CLIENT_ID>"
            }
        }
    }
}
```
Replace <…> with your own values. 3 more environment variables are in the server README

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "fhirhydrant": {
            "type": "stdio",
            "command": "npx",
            "args": [
                "-y",
                "fhirhydrant"
            ],
            "env": {
                "MCP_TRANSPORT": "<MCP_TRANSPORT>",
                "FHIR_AUTH": "<FHIR_AUTH>",
                "FHIR_SERVER_URL": "<FHIR_SERVER_URL>",
                "FHIR_TOKEN_URL": "<FHIR_TOKEN_URL>",
                "FHIR_CLIENT_ID": "<FHIR_CLIENT_ID>"
            }
        }
    }
}
```
Replace <…> with your own values. 3 more environment variables are in the server README

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add -e MCP_TRANSPORT=<MCP_TRANSPORT> -e FHIR_AUTH=<FHIR_AUTH> -e FHIR_SERVER_URL=<FHIR_SERVER_URL> -e FHIR_TOKEN_URL=<FHIR_TOKEN_URL> -e FHIR_CLIENT_ID=<FHIR_CLIENT_ID> fhirhydrant npx -y fhirhydrant
```
Replace <…> with your own values. 3 more environment variables are in the server README

## When to use it
- search FHIR resources with configured parameters
- read a resource version or its change history
- run named clinical and terminology operations
- trim responses with FHIRPath and byte limits
- inspect capabilities and registered tools

## Example prompts
- Search the FHIR server for matching resources and return a compact response.
- Show the change history for this resource ID.
- Inspect the CapabilityStatement and list the operations available to me.

## Similar
- [MCP Toolbox for Databases](https://affpapa.org/en/nevibecode/mcp/googleapis-mcp-toolbox-for-databases.md) — MCP server · ★ 16717
- [PostHog MCP Server](https://affpapa.org/en/nevibecode/mcp/posthog-mcp-server.md) — MCP server · ★ 40409
- [OpenWork MCP Gateway](https://affpapa.org/en/nevibecode/mcp/openwork-mcp-gateway.md) — MCP server · ★ 24242
- [Keploy](https://affpapa.org/en/nevibecode/mcp/keploy.md) — MCP server · ★ 18727
- [Nhost](https://affpapa.org/en/nevibecode/mcp/nhost.md) — MCP server · ★ 9366
- [basebalance.cloud — x402 RPC & MCP gateway](https://affpapa.org/en/nevibecode/mcp/basebalancecloud-x402-rpc-mcp-gateway.md) — MCP server · ★ 7506

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
