FHIR MCP Server
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| 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). | localhost |
| FHIR_MCP_PORT | No | The port on which the MCP server will listen for incoming client requests. | 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_BASE_URL | No | 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_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. | 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. |
Capabilities
Features and capabilities supported by this server
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| get_capabilities | Retrieves metadata about a specified FHIR resource type, including its supported search parameters and custom operations. This tool MUST always be invoked before performing any resource operation (such as search, read, create, update, or delete) to discover the valid searchParams and operations permitted for that resource type. Do not use this tool to fetch actual resources. |
| search | Executes a standard FHIR |
| read | Performs a FHIR |
| create | Executes a FHIR |
| update | Performs a FHIR |
| delete | Execute a FHIR |
| get_user | Retrieves the authenticated user's FHIR profile. Use this tool when you need to access the current user's demographic and contact details. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/wso2/fhir-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server