F

Fhirhydrant

by faulkj · io.github.faulkj/fhirhydrant

Connects MCP clients to FHIR R4+ clinical APIs over SMART on FHIR v2 Backend Services, exposing resources, named operations, terminology lookup, and pagination as configurable tools. It adds metadata- and scope-aware search/CRUD, compact responses with FHIRPath filtering, safe pagination, audit events, and bundle execution.

npm Local · stdio GlamaOfficial MCP Registry High confidence

Install

Add to ~/Library/Application Support/Claude/claude_desktop_config.json

Windows / Linux path
Windows: %APPDATA%\Claude\claude_desktop_config.json
Linux: ~/.config/Claude/claude_desktop_config.json
{
  "mcpServers": {
    "io-github-faulkj-fhirhydrant": {
      "command": "npx",
      "args": [
        "-y",
        "fhirhydrant"
      ],
      "env": {
        "MCP_TRANSPORT": "http",
        "FHIR_AUTH": "smart",
        "FHIR_SERVER_URL": "<base>/api/FHIR/<FHIR_VERSION>",
        "FHIR_TOKEN_URL": "<base>/oauth2/token",
        "FHIR_CLIENT_ID": "<VALUE>",
        "FHIR_ACTIVE_KEY": "<YOUR_VALUE>",
        "FHIR_JWKS_URL": "",
        "FHIR_VERSION": "R4",
        "PORT": "5000",
        "BIND_HOST": "0.0.0.0",
        "LOG_LEVEL": "info",
        "MCP_AUTHZ": "none",
        "ALLOWED_HOSTS": "",
        "FHIR_BASE_URL": "<VALUE>",
        "FHIR_MAX_COUNT": "0",
        "MCP_JSON_LIMIT": "4mb",
        "FHIR_AUDIT_FILE": "./audit.jsonl",
        "FHIR_AUDIT_SINK": "",
        "FHIR_OPERATIONS": "",
        "MCP_ROLE_PREFIX": "FhirHydrant",
        "FHIR_RETIRED_KEYS": "",
        "FHIR_DEFAULT_COUNT": "0",
        "FHIR_METADATA_MODE": "strict",
        "FHIR_RESPONSE_MODE": "",
        "FHIR_WRITE_DRY_RUN": "false",
        "MCP_ENTRA_AUDIENCE": "",
        "FHIR_AUDIT_HTTP_URL": "",
        "MCP_ENTRA_TENANT_ID": "",
        "FHIR_AUDIT_HTTP_AUTH": "",
        "FHIR_MAX_ARTIFACT_MB": "16",
        "FHIR_VALIDATE_WRITES": "local",
        "FHIR_AUDIT_HTTP_FORAT": "raw",
        "FHIR_PAGINATION_PATHS": "",
        "FHIR_AUDIT_USER_HEADER": "",
        "FHIR_MAX_RESPONSE_BYTES": "262144",
        "FHIR_PREFETCH_MAX_BYTES": "2097152",
        "FHIR_PREFETCH_MAX_PAGES": "5",
        "FHIR_REQUEST_TIMEOUT_MS": "30000",
        "FHIR_WRITE_CAPABILITIES": "",
        "FHIR_BUNDLE_CAPABILITIES": "",
        "FHIR_PREFETCH_TIMEOUT_MS": "25000",
        "FHIR_TEMINOLOGY_BASE_URL": "",
        "FHIR_PREFETCH_MAX_ENTRIES": "5000",
        "FHIR_BUNDLE_WRITES_ENABLED": "false"
      }
    }
  }
}

Restart Claude Desktop to activate the new server.

Add to .cursor/mcp.json (project) or ~/.cursor/mcp.json (global)

Windows / Linux path
Windows: .cursor\mcp.json (project) or %USERPROFILE%\.cursor\mcp.json (global)
Linux: .cursor/mcp.json (project) or ~/.cursor/mcp.json (global)
{
  "mcpServers": {
    "io-github-faulkj-fhirhydrant": {
      "command": "npx",
      "args": [
        "-y",
        "fhirhydrant"
      ],
      "env": {
        "MCP_TRANSPORT": "http",
        "FHIR_AUTH": "smart",
        "FHIR_SERVER_URL": "<base>/api/FHIR/<FHIR_VERSION>",
        "FHIR_TOKEN_URL": "<base>/oauth2/token",
        "FHIR_CLIENT_ID": "<VALUE>",
        "FHIR_ACTIVE_KEY": "<YOUR_VALUE>",
        "FHIR_JWKS_URL": "",
        "FHIR_VERSION": "R4",
        "PORT": "5000",
        "BIND_HOST": "0.0.0.0",
        "LOG_LEVEL": "info",
        "MCP_AUTHZ": "none",
        "ALLOWED_HOSTS": "",
        "FHIR_BASE_URL": "<VALUE>",
        "FHIR_MAX_COUNT": "0",
        "MCP_JSON_LIMIT": "4mb",
        "FHIR_AUDIT_FILE": "./audit.jsonl",
        "FHIR_AUDIT_SINK": "",
        "FHIR_OPERATIONS": "",
        "MCP_ROLE_PREFIX": "FhirHydrant",
        "FHIR_RETIRED_KEYS": "",
        "FHIR_DEFAULT_COUNT": "0",
        "FHIR_METADATA_MODE": "strict",
        "FHIR_RESPONSE_MODE": "",
        "FHIR_WRITE_DRY_RUN": "false",
        "MCP_ENTRA_AUDIENCE": "",
        "FHIR_AUDIT_HTTP_URL": "",
        "MCP_ENTRA_TENANT_ID": "",
        "FHIR_AUDIT_HTTP_AUTH": "",
        "FHIR_MAX_ARTIFACT_MB": "16",
        "FHIR_VALIDATE_WRITES": "local",
        "FHIR_AUDIT_HTTP_FORAT": "raw",
        "FHIR_PAGINATION_PATHS": "",
        "FHIR_AUDIT_USER_HEADER": "",
        "FHIR_MAX_RESPONSE_BYTES": "262144",
        "FHIR_PREFETCH_MAX_BYTES": "2097152",
        "FHIR_PREFETCH_MAX_PAGES": "5",
        "FHIR_REQUEST_TIMEOUT_MS": "30000",
        "FHIR_WRITE_CAPABILITIES": "",
        "FHIR_BUNDLE_CAPABILITIES": "",
        "FHIR_PREFETCH_TIMEOUT_MS": "25000",
        "FHIR_TEMINOLOGY_BASE_URL": "",
        "FHIR_PREFETCH_MAX_ENTRIES": "5000",
        "FHIR_BUNDLE_WRITES_ENABLED": "false"
      }
    }
  }
}

Cursor usually picks up config changes automatically; if the server does not appear, reload the window.

Add to .mcp.json (project) or ~/.claude.json (global)

Windows / Linux path
Windows: .mcp.json (project) or %USERPROFILE%\.claude.json (global)
Linux: .mcp.json (project) or ~/.claude.json (global)
{
  "mcpServers": {
    "io-github-faulkj-fhirhydrant": {
      "command": "npx",
      "args": [
        "-y",
        "fhirhydrant"
      ],
      "env": {
        "MCP_TRANSPORT": "http",
        "FHIR_AUTH": "smart",
        "FHIR_SERVER_URL": "<base>/api/FHIR/<FHIR_VERSION>",
        "FHIR_TOKEN_URL": "<base>/oauth2/token",
        "FHIR_CLIENT_ID": "<VALUE>",
        "FHIR_ACTIVE_KEY": "<YOUR_VALUE>",
        "FHIR_JWKS_URL": "",
        "FHIR_VERSION": "R4",
        "PORT": "5000",
        "BIND_HOST": "0.0.0.0",
        "LOG_LEVEL": "info",
        "MCP_AUTHZ": "none",
        "ALLOWED_HOSTS": "",
        "FHIR_BASE_URL": "<VALUE>",
        "FHIR_MAX_COUNT": "0",
        "MCP_JSON_LIMIT": "4mb",
        "FHIR_AUDIT_FILE": "./audit.jsonl",
        "FHIR_AUDIT_SINK": "",
        "FHIR_OPERATIONS": "",
        "MCP_ROLE_PREFIX": "FhirHydrant",
        "FHIR_RETIRED_KEYS": "",
        "FHIR_DEFAULT_COUNT": "0",
        "FHIR_METADATA_MODE": "strict",
        "FHIR_RESPONSE_MODE": "",
        "FHIR_WRITE_DRY_RUN": "false",
        "MCP_ENTRA_AUDIENCE": "",
        "FHIR_AUDIT_HTTP_URL": "",
        "MCP_ENTRA_TENANT_ID": "",
        "FHIR_AUDIT_HTTP_AUTH": "",
        "FHIR_MAX_ARTIFACT_MB": "16",
        "FHIR_VALIDATE_WRITES": "local",
        "FHIR_AUDIT_HTTP_FORAT": "raw",
        "FHIR_PAGINATION_PATHS": "",
        "FHIR_AUDIT_USER_HEADER": "",
        "FHIR_MAX_RESPONSE_BYTES": "262144",
        "FHIR_PREFETCH_MAX_BYTES": "2097152",
        "FHIR_PREFETCH_MAX_PAGES": "5",
        "FHIR_REQUEST_TIMEOUT_MS": "30000",
        "FHIR_WRITE_CAPABILITIES": "",
        "FHIR_BUNDLE_CAPABILITIES": "",
        "FHIR_PREFETCH_TIMEOUT_MS": "25000",
        "FHIR_TEMINOLOGY_BASE_URL": "",
        "FHIR_PREFETCH_MAX_ENTRIES": "5000",
        "FHIR_BUNDLE_WRITES_ENABLED": "false"
      }
    }
  }
}

The server will be available in the next Claude Code session.

Add to .vscode/mcp.json

Windows / Linux path
Windows: .vscode\mcp.json
Linux: .vscode/mcp.json
{
  "servers": {
    "io-github-faulkj-fhirhydrant": {
      "command": "npx",
      "args": [
        "-y",
        "fhirhydrant"
      ],
      "env": {
        "MCP_TRANSPORT": "http",
        "FHIR_AUTH": "smart",
        "FHIR_SERVER_URL": "<base>/api/FHIR/<FHIR_VERSION>",
        "FHIR_TOKEN_URL": "<base>/oauth2/token",
        "FHIR_CLIENT_ID": "<VALUE>",
        "FHIR_ACTIVE_KEY": "<YOUR_VALUE>",
        "FHIR_JWKS_URL": "",
        "FHIR_VERSION": "R4",
        "PORT": "5000",
        "BIND_HOST": "0.0.0.0",
        "LOG_LEVEL": "info",
        "MCP_AUTHZ": "none",
        "ALLOWED_HOSTS": "",
        "FHIR_BASE_URL": "<VALUE>",
        "FHIR_MAX_COUNT": "0",
        "MCP_JSON_LIMIT": "4mb",
        "FHIR_AUDIT_FILE": "./audit.jsonl",
        "FHIR_AUDIT_SINK": "",
        "FHIR_OPERATIONS": "",
        "MCP_ROLE_PREFIX": "FhirHydrant",
        "FHIR_RETIRED_KEYS": "",
        "FHIR_DEFAULT_COUNT": "0",
        "FHIR_METADATA_MODE": "strict",
        "FHIR_RESPONSE_MODE": "",
        "FHIR_WRITE_DRY_RUN": "false",
        "MCP_ENTRA_AUDIENCE": "",
        "FHIR_AUDIT_HTTP_URL": "",
        "MCP_ENTRA_TENANT_ID": "",
        "FHIR_AUDIT_HTTP_AUTH": "",
        "FHIR_MAX_ARTIFACT_MB": "16",
        "FHIR_VALIDATE_WRITES": "local",
        "FHIR_AUDIT_HTTP_FORAT": "raw",
        "FHIR_PAGINATION_PATHS": "",
        "FHIR_AUDIT_USER_HEADER": "",
        "FHIR_MAX_RESPONSE_BYTES": "262144",
        "FHIR_PREFETCH_MAX_BYTES": "2097152",
        "FHIR_PREFETCH_MAX_PAGES": "5",
        "FHIR_REQUEST_TIMEOUT_MS": "30000",
        "FHIR_WRITE_CAPABILITIES": "",
        "FHIR_BUNDLE_CAPABILITIES": "",
        "FHIR_PREFETCH_TIMEOUT_MS": "25000",
        "FHIR_TEMINOLOGY_BASE_URL": "",
        "FHIR_PREFETCH_MAX_ENTRIES": "5000",
        "FHIR_BUNDLE_WRITES_ENABLED": "false"
      }
    }
  }
}

Reload the VS Code window to activate.

Add to ~/.codeium/windsurf/mcp_config.json

Windows / Linux path
Windows: %USERPROFILE%\.codeium\windsurf\mcp_config.json
Linux: ~/.codeium/windsurf/mcp_config.json
{
  "mcpServers": {
    "io-github-faulkj-fhirhydrant": {
      "command": "npx",
      "args": [
        "-y",
        "fhirhydrant"
      ],
      "env": {
        "MCP_TRANSPORT": "http",
        "FHIR_AUTH": "smart",
        "FHIR_SERVER_URL": "<base>/api/FHIR/<FHIR_VERSION>",
        "FHIR_TOKEN_URL": "<base>/oauth2/token",
        "FHIR_CLIENT_ID": "<VALUE>",
        "FHIR_ACTIVE_KEY": "<YOUR_VALUE>",
        "FHIR_JWKS_URL": "",
        "FHIR_VERSION": "R4",
        "PORT": "5000",
        "BIND_HOST": "0.0.0.0",
        "LOG_LEVEL": "info",
        "MCP_AUTHZ": "none",
        "ALLOWED_HOSTS": "",
        "FHIR_BASE_URL": "<VALUE>",
        "FHIR_MAX_COUNT": "0",
        "MCP_JSON_LIMIT": "4mb",
        "FHIR_AUDIT_FILE": "./audit.jsonl",
        "FHIR_AUDIT_SINK": "",
        "FHIR_OPERATIONS": "",
        "MCP_ROLE_PREFIX": "FhirHydrant",
        "FHIR_RETIRED_KEYS": "",
        "FHIR_DEFAULT_COUNT": "0",
        "FHIR_METADATA_MODE": "strict",
        "FHIR_RESPONSE_MODE": "",
        "FHIR_WRITE_DRY_RUN": "false",
        "MCP_ENTRA_AUDIENCE": "",
        "FHIR_AUDIT_HTTP_URL": "",
        "MCP_ENTRA_TENANT_ID": "",
        "FHIR_AUDIT_HTTP_AUTH": "",
        "FHIR_MAX_ARTIFACT_MB": "16",
        "FHIR_VALIDATE_WRITES": "local",
        "FHIR_AUDIT_HTTP_FORAT": "raw",
        "FHIR_PAGINATION_PATHS": "",
        "FHIR_AUDIT_USER_HEADER": "",
        "FHIR_MAX_RESPONSE_BYTES": "262144",
        "FHIR_PREFETCH_MAX_BYTES": "2097152",
        "FHIR_PREFETCH_MAX_PAGES": "5",
        "FHIR_REQUEST_TIMEOUT_MS": "30000",
        "FHIR_WRITE_CAPABILITIES": "",
        "FHIR_BUNDLE_CAPABILITIES": "",
        "FHIR_PREFETCH_TIMEOUT_MS": "25000",
        "FHIR_TEMINOLOGY_BASE_URL": "",
        "FHIR_PREFETCH_MAX_ENTRIES": "5000",
        "FHIR_BUNDLE_WRITES_ENABLED": "false"
      }
    }
  }
}

Restart Windsurf (or refresh its MCP servers panel) to activate the new server.

Windsurf Next uses ~/.codeium/windsurf-next/mcp_config.json. Devin Desktop (the Windsurf rebrand) uses ~/.config/devin/mcp_config.json and imports the Windsurf file.

Add to ~/Library/Application Support/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json

Windows / Linux path
Windows: %APPDATA%\Code\User\globalStorage\saoudrizwan.claude-dev\settings\cline_mcp_settings.json
Linux: ~/.config/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json
{
  "mcpServers": {
    "io-github-faulkj-fhirhydrant": {
      "command": "npx",
      "args": [
        "-y",
        "fhirhydrant"
      ],
      "env": {
        "MCP_TRANSPORT": "http",
        "FHIR_AUTH": "smart",
        "FHIR_SERVER_URL": "<base>/api/FHIR/<FHIR_VERSION>",
        "FHIR_TOKEN_URL": "<base>/oauth2/token",
        "FHIR_CLIENT_ID": "<VALUE>",
        "FHIR_ACTIVE_KEY": "<YOUR_VALUE>",
        "FHIR_JWKS_URL": "",
        "FHIR_VERSION": "R4",
        "PORT": "5000",
        "BIND_HOST": "0.0.0.0",
        "LOG_LEVEL": "info",
        "MCP_AUTHZ": "none",
        "ALLOWED_HOSTS": "",
        "FHIR_BASE_URL": "<VALUE>",
        "FHIR_MAX_COUNT": "0",
        "MCP_JSON_LIMIT": "4mb",
        "FHIR_AUDIT_FILE": "./audit.jsonl",
        "FHIR_AUDIT_SINK": "",
        "FHIR_OPERATIONS": "",
        "MCP_ROLE_PREFIX": "FhirHydrant",
        "FHIR_RETIRED_KEYS": "",
        "FHIR_DEFAULT_COUNT": "0",
        "FHIR_METADATA_MODE": "strict",
        "FHIR_RESPONSE_MODE": "",
        "FHIR_WRITE_DRY_RUN": "false",
        "MCP_ENTRA_AUDIENCE": "",
        "FHIR_AUDIT_HTTP_URL": "",
        "MCP_ENTRA_TENANT_ID": "",
        "FHIR_AUDIT_HTTP_AUTH": "",
        "FHIR_MAX_ARTIFACT_MB": "16",
        "FHIR_VALIDATE_WRITES": "local",
        "FHIR_AUDIT_HTTP_FORAT": "raw",
        "FHIR_PAGINATION_PATHS": "",
        "FHIR_AUDIT_USER_HEADER": "",
        "FHIR_MAX_RESPONSE_BYTES": "262144",
        "FHIR_PREFETCH_MAX_BYTES": "2097152",
        "FHIR_PREFETCH_MAX_PAGES": "5",
        "FHIR_REQUEST_TIMEOUT_MS": "30000",
        "FHIR_WRITE_CAPABILITIES": "",
        "FHIR_BUNDLE_CAPABILITIES": "",
        "FHIR_PREFETCH_TIMEOUT_MS": "25000",
        "FHIR_TEMINOLOGY_BASE_URL": "",
        "FHIR_PREFETCH_MAX_ENTRIES": "5000",
        "FHIR_BUNDLE_WRITES_ENABLED": "false"
      }
    }
  }
}

Cline reloads cline_mcp_settings.json automatically; if the server does not appear, reload the VS Code window.

Open it from Cline's MCP Servers panel → Configure. Roo Code uses a different file and format.

Configuration

Environment variables this server reads. Secrets stay on your machine.

NameRequiredDescription
MCP_TRANSPORT Yes http or stdio. Default: http
FHIR_AUTH Yes smart (SMART Backend Services) or none (unauthenticated, for public test endpoints). Default: smart
FHIR_SERVER_URL Yes Explicit FHIR API URL override. Default: <base>/api/FHIR/<FHIR_VERSION>
FHIR_TOKEN_URL No Explicit token endpoint override. Default: <base>/oauth2/token
FHIR_CLIENT_ID No SMART Backend Services client ID (not needed when FHIR_AUTH=none).
FHIR_ACTIVE_KEY secret No Base64-encoded PKCS#8 PEM signing key, RSA or EC P-384 (not needed when FHIR_AUTH=none).
FHIR_JWKS_URL No External JWKS URL. Omit in HTTP mode to enable built-in /jwks.
FHIR_VERSION No Active R4+ FHIR release; controls derived URL, FHIRPath model, and compact model metadata. Default: R4
PORT No HTTP listener port. Default: 5000
BIND_HOST No HTTP bind address. Default: 0.0.0.0
LOG_LEVEL No Log verbosity: error, warn, info, or debug. Default: info
MCP_AUTHZ No Authorization provider: none or entra. Gates tools per caller (HTTP + Authorization: Bearer only). Default: none
ALLOWED_HOSTS No Comma-separated hostnames for DNS rebinding protection.
FHIR_BASE_URL No Base URL used to derive the FHIR server URL and token URL. Optional when FHIR_SERVER_URL is set (and, for smart auth, FHIR_TOKEN_URL).
FHIR_MAX_COUNT No Cap on explicit caller _count values; 0 = no cap. Default: 0
MCP_JSON_LIMIT No Max accepted MCP request body size (Express json limit string); raise if large write/bundle payloads are rejected. Default: 4mb
FHIR_AUDIT_FILE No JSONL file used when the file audit sink is enabled. Default: ./audit.jsonl
FHIR_AUDIT_SINK No Any combination of console, file, http.
FHIR_OPERATIONS No Comma-separated operation keys; none disables all catalog operations. Default catalog: everything, lastn, validate, docref, expand, lookup, translate, summary, match.
MCP_ROLE_PREFIX No Prefix on granted role values (e.g. FhirHydrant.Patient.Read). Default: FhirHydrant
FHIR_RETIRED_KEYS No Comma-separated base64-encoded PEMs for JWKS rotation.
FHIR_DEFAULT_COUNT No Default _count injected into searches when allowed; 0 = server decides. Default: 0
FHIR_METADATA_MODE No strict, warn, or off for /metadata validation. Default: strict
FHIR_RESPONSE_MODE No compact, full, or compact-locked; unset means search defaults compact and direct reads default full.
FHIR_WRITE_DRY_RUN No Set to true to validate and log writes without executing them against the FHIR server. Default: false
MCP_ENTRA_AUDIENCE No API application (client) ID expected in the v2 access token aud; required when MCP_AUTHZ=entra.
FHIR_AUDIT_HTTP_URL No Destination URL for the http audit sink; required when http is enabled.
MCP_ENTRA_TENANT_ID No Entra tenant GUID (not a domain alias); required when MCP_AUTHZ=entra.
FHIR_AUDIT_HTTP_AUTH No Authorization header value sent verbatim by the http sink.
FHIR_MAX_ARTIFACT_MB No Separate byte ceiling (MiB) for native/binary artifact bodies; independent of the JSON limit (base64 transport ≈ +33%). Default: 16
FHIR_VALIDATE_WRITES No off, local (client-side structural checks), or server (local + server $validate preflight for create/update). Default: local
FHIR_AUDIT_HTTP_FORAT No raw (internal AuditEvent JSON) or fhir-auditevent (FHIR R4 AuditEvent). Default: raw
FHIR_PAGINATION_PATHS No Extra allowed path prefixes for pagination links, e.g. FHIRProxy.
FHIR_AUDIT_USER_HEADER No Proxy-authenticated user header copied into audit events.
FHIR_MAX_RESPONSE_BYTES No Byte limit for model-facing JSON responses; oversized Bundles are chunked. Default: 262144
FHIR_PREFETCH_MAX_BYTES No Max raw bytes fetched before stopping. Default: 2097152
FHIR_PREFETCH_MAX_PAGES No Max upstream pages fetched per coalesced compact search. Default: 5
FHIR_REQUEST_TIMEOUT_MS No Per-attempt timeout for outgoing FHIR requests. Default: 30000
FHIR_WRITE_CAPABILITIES No Comma-separated write actions: create, update, patch, delete.
FHIR_BUNDLE_CAPABILITIES No Comma-separated Bundle types: batch, transaction; enables bundle tool.
FHIR_PREFETCH_TIMEOUT_MS No Wall-clock budget for the coalescing loop. Default: 25000
FHIR_TEMINOLOGY_BASE_URL No Enables terminology tools, e.g. https://tx.fhir.org/r4.
FHIR_PREFETCH_MAX_ENTRIES No Max upstream entries accumulated before stopping. Default: 5000
FHIR_BUNDLE_WRITES_ENABLED No Set to true to allow write entries inside Bundles (also requires FHIR_WRITE_CAPABILITIES). Default: false

Similar servers