fhirhydrant

v0.17.3
io.github.faulkj/fhirhydrant Checked 1 hour ago Published 3 months ago

FHIR MCP server with SMART Backend Services, response compaction, FHIRPath, and guarded writes.

Values you need

VariableWhat it is
MCP_TRANSPORTrequired Run the installed package over MCP stdio.
FHIR_AUTHrequired FHIR authentication mode. Use none only for an unauthenticated FHIR endpoint. Default: smart
FHIR_SERVER_URLrequired Full base URL of the FHIR API, such as https://fhir.example.org/fhir/R4.
FHIR_TOKEN_URLoptional SMART Backend Services token endpoint. Required when FHIR_AUTH=smart unless it can be derived from FHIR_BASE_URL.
FHIR_CLIENT_IDoptional SMART Backend Services client ID. Required when FHIR_AUTH=smart.
FHIR_ACTIVE_KEYoptional secret Base64-encoded PKCS#8 private signing key. Required when FHIR_AUTH=smart.
FHIR_JWKS_URLoptional Externally reachable JWKS URL for the signing key. Recommended for SMART authentication over stdio.
FHIR_VERSIONoptional FHIR release used for FHIRPath and response shaping. Default: R4

npm (npx)

Requires Node.js 18+

Run in a terminal
claude mcp add fhirhydrant -e FHIR_AUTH=smart -e 'FHIR_SERVER_URL=<FHIR_SERVER_URL>' -e 'MCP_TRANSPORT=<MCP_TRANSPORT>' -- npx -y fhirhydrant@0.17.3
Add to claude_desktop_config.json
{
  "mcpServers": {
    "fhirhydrant": {
      "args": [
        "-y",
        "fhirhydrant@0.17.3"
      ],
      "command": "npx",
      "env": {
        "FHIR_AUTH": "smart",
        "FHIR_SERVER_URL": "<FHIR_SERVER_URL>",
        "MCP_TRANSPORT": "<MCP_TRANSPORT>"
      }
    }
  }
}
Add to ~/.cursor/mcp.json
{
  "mcpServers": {
    "fhirhydrant": {
      "args": [
        "-y",
        "fhirhydrant@0.17.3"
      ],
      "command": "npx",
      "env": {
        "FHIR_AUTH": "smart",
        "FHIR_SERVER_URL": "<FHIR_SERVER_URL>",
        "MCP_TRANSPORT": "<MCP_TRANSPORT>"
      }
    }
  }
}
Add to .vscode/mcp.json
{
  "inputs": [
    {
      "description": "FHIR_AUTH",
      "id": "fhir-auth",
      "password": true,
      "type": "promptString"
    },
    {
      "description": "FHIR_SERVER_URL",
      "id": "fhir-server-url",
      "password": true,
      "type": "promptString"
    },
    {
      "description": "MCP_TRANSPORT",
      "id": "mcp-transport",
      "password": true,
      "type": "promptString"
    }
  ],
  "servers": {
    "fhirhydrant": {
      "args": [
        "-y",
        "fhirhydrant@0.17.3"
      ],
      "command": "npx",
      "env": {
        "FHIR_AUTH": "${input:fhir-auth}",
        "FHIR_SERVER_URL": "${input:fhir-server-url}",
        "MCP_TRANSPORT": "${input:mcp-transport}"
      },
      "type": "stdio"
    }
  }
}
Add to ~/.codex/config.toml
[mcp_servers.fhirhydrant]
command = "npx"
args = ["-y", "fhirhydrant@0.17.3"]
env = { "FHIR_AUTH" = "smart", "FHIR_SERVER_URL" = "<FHIR_SERVER_URL>", "MCP_TRANSPORT" = "<MCP_TRANSPORT>" }

For AI agents

  1. Ask the user for: MCP_TRANSPORT, FHIR_AUTH, FHIR_SERVER_URL. Never invent or guess these values; secrets go into the client config, not into chat logs.
  2. Pick the user's MCP client and apply the matching config from the first install method (it is the one verified by the smoke test when available).
  3. Restart or reload the client so it starts the server.
  4. If it fails, check that the required runtime is installed (Node.js 18+) and that the values above are set.

Machine-readable: install.md · manifest.json