Skip to main content
Glama
FHIR MCP Server

FHIR MCP Server

by wso2

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
FHIR_MCP_HOSTNoThe 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_PORTNoThe port on which the MCP server will listen for incoming client requests.8000
FHIR_SERVER_SCOPESNoA 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_URLNoIf 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_URLNoThe 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_IDNoThe OAuth2 client ID used to authorize MCP clients with the FHIR server.
FHIR_MCP_REQUEST_TIMEOUTNoTimeout duration in seconds for requests from the MCP server to the FHIR server.30
FHIR_SERVER_ACCESS_TOKENNoThe 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_SECRETNoThe client secret corresponding to the FHIR client ID. Used during token exchange.
FHIR_SERVER_DISABLE_AUTHORIZATIONNoIf set to True, disables authorization checks on the MCP server, allowing connections to publicly accessible FHIR servers.

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

This server publishes no instructions, or was last inspected before Glama recorded them.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": false
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}
experimental
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
get_capabilitiesA

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.

searchA

Executes a standard FHIR search interaction on a given resource type, returning a bundle or list of matching resources. Use this when you need to query for multiple resources based on one or more search-parameters. Do not use this tool for create, update, or delete operations, and be aware that large result sets may be paginated by the FHIR server. Optionally specify fields to filter the response to only the data your task needs (e.g., Patient.birthDate, Observation.valueQuantity).

readA

Performs a FHIR read interaction to retrieve a single resource instance by its type and resource ID, optionally refining the response with search parameters or custom operations. Use it when you know the exact resource ID and require that one resource; do not use it for bulk queries. If additional query-level parameters or operations are needed (e.g., _elements or $validate), include them in searchParam or operation. Optionally specify fields to filter the response to only the data your task needs (e.g., Patient.birthDate, Observation.valueQuantity).

createA

Creates a new FHIR resource on the server (FHIR create interaction: POST [base]/{type}). Use it to add a record that does not exist yet, such as a new Patient, Observation or Appointment. Do not use it to change an existing resource; use update for that. The server assigns a new id on every call, so repeating a call creates duplicates; use search first if the record may already exist. On success it returns the resource as stored, including the server-assigned id and meta. On failure it returns OperationOutcome issues whose diagnostics explain what to fix, such as a missing required element or an invalid code.

updateA

Replaces the full content of an existing FHIR resource (FHIR update interaction: PUT [base]/{type}/{id}). Use it to correct or complete a record whose logical id you already know. Elements left out of the payload are removed from the stored resource, not kept, so first get the current version with read, change what you need, and send the whole resource back. Do not use it to add new records; use create for that. On success it returns the resource as stored, with an updated meta.versionId and meta.lastUpdated. On failure it returns OperationOutcome issues whose diagnostics explain what to fix.

deleteA

Execute a FHIR delete interaction on a specific resource instance. Use this tool when you need to remove a single resource identified by its logical ID or optionally filtered by search parameters. The optional id parameter must match an existing resource instance when present. If you include searchParam, the server will perform a conditional delete, deleting the resource only if it matches the given criteria. If you supply operation, it will execute the named FHIR operation (e.g., $expunge) on the resource. This tool returns a FHIR OperationOutcome describing success or failure of the deletion.

get_userA

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

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

A3.9/5.0

Scored across 7 tools

Disambiguation4/5

Each tool maps to a distinct FHIR interaction (capabilities, search, read, create, update, delete) with clear boundaries called out in the descriptions. Minor blur: `read` accepts searchParam/operation refinements and `get_user` overlaps conceptually with reading the current user's Patient/Practitioner resource, so an agent could occasionally hesitate between read/search and get_user/read.

Naming Consistency3/5

Two conventions coexist: get_-prefixed helpers (`get_capabilities`, `get_user`) alongside bare FHIR interaction names (`search`, `read`, `create`, `update`, `delete`). The split has a semantic rationale (get_* for non-resource metadata), but it is still an inconsistent verb pattern rather than a single predictable scheme.

Tool Count5/5

Seven tools is well-scoped for a generic FHIR client: exactly the CRUD interactions plus search, capability discovery, and current-user lookup. Nothing feels redundant or missing at the count level.

Completeness4/5

Core lifecycle is fully covered: create/read/update/delete plus search and capability discovery, which is strong for a generic FHIR server. Gaps remain for advanced interactions such as patch, versioned read/history, and batch/transaction bundles, but agents can work around most of these.

Maintenance

ActivityNo data
ResponsivenessOutdated data