An MCP server that provides tools for interacting with FHIR (Fast Healthcare Interoperability Resources) servers, enabling resource CRUD operations, capability queries, search, transactions, and batch operations.
This FHIR MCP server has 13 tools covering capability discovery, CRUD, search, and transaction operations. All tools are explicitly registered via [McpServerTool] attributes with descriptions. However, critical gaps exist: (1) Input parameter schemas are under-specified, most parameters lack explicit type constraints, enums, ranges, or format documentation in descriptions; (2) Output schemas are not documented, callers don't know what fields to expect from serialized FHIR resources; (3) Error handling is generic (catch-all exceptions returning raw exception messages), no recovery guidance, categorization, or actionable next steps; (4) Parameter descriptions are sparse, many repeat 'e.g.' without constraints; (5) Naming is mostly verb-forward but could be more explicit (e.g., 'ListResourceCapabilities' vs 'GetResourceCapabilities'). The tools themselves are domain-appropriate, but the tool interface lacks the rigor expected of production-grade agent tools. Average per-tool score: 51/100.
Creates a new FHIR resource - body: JSON string representing the resource.
Deletes a FHIR resource of the given type and ID. resourceType: e.g. 'Patient'. id: The resource identifier.
Performs a FHIR batch with a bundle of operation. Each operation in the batch is processed independently - some may succeed while others fail. body: JSON string representing a Bundle with type 'batch'.
Performs a FHIR transaction with a bundle of operation. All operations in the bundle will be treated as a single atomic unit - either all succeed or all fail. body: JSON string representing a Bundle with type 'transaction'.
Returns the total number of resources of a given FHIR resource type. resourceType: e.g. 'Patient', 'Observation', 'Encounter'.
Returns the FHIR version this server supports.
Gets the history of a FHIR resource, showing all versions. resourceType: e.g. 'Patient'. id: The resource identifier.
Output schemas are entirely undocumented. All tools return serialized FHIR resources or error strings, but callers have no specification of which fields to expect, what structure the Bundle will have, or how to extract downstream references. This forces LLMs to guess field names and structure, increasing errors and wasting context tokens on parsing JSON responses.
Input parameters lack type constraints, enums, ranges, and format documentation in descriptions. For example, 'resourceType' is described as 'e.g. Patient' but does not specify valid FHIR resource types, case sensitivity, or where to discover the full list. SearchResources accepts 'criteria' as an array of name=value strings but does not document valid search parameter names or format expectations. These under-specified parameters invite hallucinated or invalid input from LLMs.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-22 | F | 42 | 2026-07-28+ | v2 |
| 2026-03-09 | F | 35 | - | v1 |
Lists resource capabilities, including supported search parameters, interactions, operations, etc. resourceType: e.g. 'Patient'.
Lists all resource types the FHIR server supports.
Lists supported formats the server can handle (e.g., JSON, XML).
Reads a FHIR resource of the given type and ID. resourceType: e.g. 'Patient'. id: The resource identifier.
Searches for FHIR resources of the given type with the given criteria. - resourceType: (Required) The type of resource to search for (e.g., 'Patient', 'Observation'). - criteria: (Optional) An array of search parameters in 'name=value' format (e.g., ['name=John', 'gender=male']). - pageSize: (Optional) Maximum number of results to return per page (default: 10).
Updates an existing FHIR resource. resourceType: e.g. 'Patient'. id: The resource identifier. body: JSON string representing the updated resource.
Error handling is non-actionable. All tools wrap exceptions in generic error strings (e.g., 'Failed to create resource: {ex.Message}'). Errors do not guide the LLM on recovery, retry eligibility, or next steps. For example, a FhirOperationException for 'resource not found' vs 'validation failed' are both returned as strings with no classification. This prevents intelligent error recovery.
No pagination support visible in tool definitions or error returns. SearchResources accepts a pageSize parameter but no offset, cursor, or total-count metadata in the response. This means agents cannot iterate through large result sets without manual page calculation or re-running searches. SearchResources should return total count and next_cursor or page tokens.
Tool composition risk: CreateResource, UpdateResource, ExecuteTransaction, and ExecuteBatch all accept 'body' as a JSON string parameter. This invites prompt injection if user input is embedded in the JSON without sanitization. The pattern of passing raw JSON as a string also forces LLMs to construct valid FHIR JSON from scratch, a frequent failure mode. Consider higher-level tools that accept structured fields (e.g., create_patient_with_name_dob) that build valid FHIR internally.
Destructive operations (DeleteResource, ExecuteTransaction) lack confirmation or dry-run support. An LLM could accidentally delete a patient or execute an irreversible transaction bundle. At minimum, provide a dry_run parameter or a separate confirm_operation tool to gate destructive actions.
Tool descriptions are brief (50 - 65 chars typical) and lack context on WHEN to use each tool vs. similar tools. For instance, ExecuteTransaction and ExecuteBatch both accept Bundle objects but differ critically in atomicity. The descriptions mention this but are not emphasized. Callers need to understand which to choose based on failure tolerance.
No idempotency guarantees documented. Tools like CreateResource, UpdateResource, and DeleteResource do not state whether repeated calls with identical parameters are safe or will produce duplicates/errors. Agents rely on idempotency to retry safely, without it, they risk side effects on transient failures.