F

Fhir MCP Server

by wso2 · io.github.wso2/fhir-mcp-server

Provides seamless integration with FHIR APIs, enabling AI/LLM tools to search, retrieve, and analyze clinical healthcare data with support for SMART-on-FHIR authentication and multiple transport protocols.

pypi 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-wso2-fhir-mcp-server": {
      "command": "uvx",
      "args": [
        "fhir-mcp-server"
      ],
      "env": {
        "FHIR_SERVER_BASE_URL": "<VALUE>",
        "FHIR_MCP_HOST": "localhost",
        "FHIR_MCP_PORT": "8000",
        "FHIR_SERVER_SCOPES": "<VALUE>",
        "FHIR_MCP_SERVER_URL": "<VALUE>",
        "FHIR_SERVER_CLIENT_ID": "<VALUE>",
        "FHIR_MCP_REQUEST_TIMEOUT": "30",
        "FHIR_SERVER_ACCESS_TOKEN": "<VALUE>",
        "FHIR_SERVER_CLIENT_SECRET": "<VALUE>",
        "FHIR_SERVER_DISABLE_AUTHORIZATION": "<VALUE>"
      }
    }
  }
}

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-wso2-fhir-mcp-server": {
      "command": "uvx",
      "args": [
        "fhir-mcp-server"
      ],
      "env": {
        "FHIR_SERVER_BASE_URL": "<VALUE>",
        "FHIR_MCP_HOST": "localhost",
        "FHIR_MCP_PORT": "8000",
        "FHIR_SERVER_SCOPES": "<VALUE>",
        "FHIR_MCP_SERVER_URL": "<VALUE>",
        "FHIR_SERVER_CLIENT_ID": "<VALUE>",
        "FHIR_MCP_REQUEST_TIMEOUT": "30",
        "FHIR_SERVER_ACCESS_TOKEN": "<VALUE>",
        "FHIR_SERVER_CLIENT_SECRET": "<VALUE>",
        "FHIR_SERVER_DISABLE_AUTHORIZATION": "<VALUE>"
      }
    }
  }
}

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-wso2-fhir-mcp-server": {
      "command": "uvx",
      "args": [
        "fhir-mcp-server"
      ],
      "env": {
        "FHIR_SERVER_BASE_URL": "<VALUE>",
        "FHIR_MCP_HOST": "localhost",
        "FHIR_MCP_PORT": "8000",
        "FHIR_SERVER_SCOPES": "<VALUE>",
        "FHIR_MCP_SERVER_URL": "<VALUE>",
        "FHIR_SERVER_CLIENT_ID": "<VALUE>",
        "FHIR_MCP_REQUEST_TIMEOUT": "30",
        "FHIR_SERVER_ACCESS_TOKEN": "<VALUE>",
        "FHIR_SERVER_CLIENT_SECRET": "<VALUE>",
        "FHIR_SERVER_DISABLE_AUTHORIZATION": "<VALUE>"
      }
    }
  }
}

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-wso2-fhir-mcp-server": {
      "command": "uvx",
      "args": [
        "fhir-mcp-server"
      ],
      "env": {
        "FHIR_SERVER_BASE_URL": "<VALUE>",
        "FHIR_MCP_HOST": "localhost",
        "FHIR_MCP_PORT": "8000",
        "FHIR_SERVER_SCOPES": "<VALUE>",
        "FHIR_MCP_SERVER_URL": "<VALUE>",
        "FHIR_SERVER_CLIENT_ID": "<VALUE>",
        "FHIR_MCP_REQUEST_TIMEOUT": "30",
        "FHIR_SERVER_ACCESS_TOKEN": "<VALUE>",
        "FHIR_SERVER_CLIENT_SECRET": "<VALUE>",
        "FHIR_SERVER_DISABLE_AUTHORIZATION": "<VALUE>"
      }
    }
  }
}

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-wso2-fhir-mcp-server": {
      "command": "uvx",
      "args": [
        "fhir-mcp-server"
      ],
      "env": {
        "FHIR_SERVER_BASE_URL": "<VALUE>",
        "FHIR_MCP_HOST": "localhost",
        "FHIR_MCP_PORT": "8000",
        "FHIR_SERVER_SCOPES": "<VALUE>",
        "FHIR_MCP_SERVER_URL": "<VALUE>",
        "FHIR_SERVER_CLIENT_ID": "<VALUE>",
        "FHIR_MCP_REQUEST_TIMEOUT": "30",
        "FHIR_SERVER_ACCESS_TOKEN": "<VALUE>",
        "FHIR_SERVER_CLIENT_SECRET": "<VALUE>",
        "FHIR_SERVER_DISABLE_AUTHORIZATION": "<VALUE>"
      }
    }
  }
}

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-wso2-fhir-mcp-server": {
      "command": "uvx",
      "args": [
        "fhir-mcp-server"
      ],
      "env": {
        "FHIR_SERVER_BASE_URL": "<VALUE>",
        "FHIR_MCP_HOST": "localhost",
        "FHIR_MCP_PORT": "8000",
        "FHIR_SERVER_SCOPES": "<VALUE>",
        "FHIR_MCP_SERVER_URL": "<VALUE>",
        "FHIR_SERVER_CLIENT_ID": "<VALUE>",
        "FHIR_MCP_REQUEST_TIMEOUT": "30",
        "FHIR_SERVER_ACCESS_TOKEN": "<VALUE>",
        "FHIR_SERVER_CLIENT_SECRET": "<VALUE>",
        "FHIR_SERVER_DISABLE_AUTHORIZATION": "<VALUE>"
      }
    }
  }
}

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
FHIR_SERVER_BASE_URL Yes The base URL of the FHIR server (e.g., https://hapi.fhir.org/baseR4). This is used to generate tool URIs and to route FHIR requests.
FHIR_MCP_HOST No The hostname or IP address the MCP server should bind to (e.g., localhost for local-only access, or 0.0.0.0 for all interfaces). Default: localhost
FHIR_MCP_PORT No The port on which the MCP server will listen for incoming client requests. Default: 8000
FHIR_SERVER_SCOPES No A space-separated list of OAuth2 scopes to request from the FHIR authorization server (e.g., user/Patient.read user/Observation.read). Add fhirUser openid to enable retrieval of user context for the get_user tool.
FHIR_MCP_SERVER_URL No If set, this value will be used as the server's base URL instead of generating it from host and port. Useful for custom URL configurations or when behind a proxy.
FHIR_SERVER_CLIENT_ID No The OAuth2 client ID used to authorize MCP clients with the FHIR server.
FHIR_MCP_REQUEST_TIMEOUT No Timeout duration in seconds for requests from the MCP server to the FHIR server. Default: 30
FHIR_SERVER_ACCESS_TOKEN No The access token to use for authenticating requests to the FHIR server. If this variable is set, the server will bypass the OAuth2 authorization flow and use this token directly for all requests.
FHIR_SERVER_CLIENT_SECRET No The client secret corresponding to the FHIR client ID. Used during token exchange.
FHIR_SERVER_DISABLE_AUTHORIZATION No If set to True, disables authorization checks on the MCP server, allowing connections to publicly accessible FHIR servers.

Similar servers