Interacting with FHIR Server from LLM using MCP protocol

Aleksandr Kislitsyn
May 9, 2025
7 min

The Setup MCP FHIR Server

‍

1. Launch a New Aidbox Instance

Start by running the following command in your terminal:

curl -JO https://aidbox.app/runme/mcp && docker compose up

This command will download the Docker Compose configuration file for the new Aidbox instance with the MCP server enabled and then launch the services.

‍

2. Activate your Aidbox instance

Open your browser and go to `http://localhost:8080` to activate your Aidbox instance:

MCP FHIR Server get instance

Issuing a development license is free – just register in the Aidbox user portal and create a new development license.

‍

3. Connect Your LLM Desktop Application to Use Aidbox MCP Server

If you're using Claude Desktop, follow these steps: Settings -> Developer -> Edit Config and update the the `claude_desktop_config.json` file with the following configuration:

{
  "mcpServers": {
    "aidbox": {
      "command": "npx",
      "args": [
        "-y",
        "@latitude-data/supergateway",
        "--sse",
        "http://localhost:8080/mcp"
      ]
    }
  }
}

For detailed information about Aidbox's MCP server and how to configure different LLM applications, please visit: https://docs.aidbox.app/modules/other-modules/mcp

‍

Let's See It in Action

Once everything is configured, you’re ready to interact with your FHIR server using Claude Desktop powered by the MCP protocol.

‍

Creating a Basic Patient Resource

We’ll start by creating a basic Patient resource:

create patient in MCP FHIR Server

You’ll be prompted to allow Claude to use the external tool:

cloud for MCP FHIR Server

That's it! The Patient resource has been created:

MCP FHIR Server result

Claude used the `create-fhir-resource` tool to interact with the FHIR Server and create the Patient resource. To verify it, open the Aidbox Console UI (http://localhost:8080), navigate to the Resource Browser, and confirm that the Patient was successfully created:

resource for MCP FHIR Server

‍

Creating Related Resources

Let’s go a step further and create a couple of related resources:

creating resource for MCP FHIR Server

Here’s what’s interesting: while creating the Task resource, Claude received feedback from Aidbox, analyzed the root cause of any issues, and managed to fix them automatically.

‍

Creating a Profile-Conformant Resource

Now, let’s create a resource that conforms to a specific FHIR profile:

create profile for MCP FHIR Server

‍

Try It Yourself

Now it’s your turn! Setting up a development instance of Aidbox is completely free. Try integrating your own LLM application and start exploring how AI can streamline your FHIR workflows.

How did you like the article?

contact us

Get in touch with us today!

By submitting the form you agree to Privacy Policy and Cookie Policy.
Thank you!
We’ll be in touch soon.

In the meantime, you can:
Oops! Something went wrong while submitting the form.

Never miss a thing
Subscribe for more content!

Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.
By clicking “Subscribe” you agree to Health Samurai Privacy Policy and consent to Health Samurai using your contact data for newsletter purposes