MCP
The Aidbox MCP module is available starting from version 2505 and is currently in the alpha stage.
MCP server is a lightweight service that exposes tools and data sources through standardized MCP endpoints. It lets any MCP‑enabled Large Language Model securely discover and invoke those resources, acting as a universal bridge between the model and the outside world.
Aidbox MCP Server
Aidbox MCP server works through Server-Sent Events (SSE) protocol and provides two endpoints:
<aidbox-base-url>/mcp
- to connect the server and discover tools<aidbox-base-url>/mcp/<mcp-client-id>/messages
- to send messages to the server
Tools
Aidbox provides a set of MCP tools to cover FHIR CRUDS operations.
read-fhir-resource
- resourceType (string, required) - id (string, required)
Read an individual FHIR resource
create-fhir-resource
- resourceType (string, required) - body (JSON object, required)
Create a new FHIR resource
update-fhir-resource
- resourceType (string, required) - id (string, required) - body (JSON object, required)
Update an existing FHIR resource
delete-fhir-resource
- resourceType (string, required) - id (string, required)
Delete an existing FHIR resource
search-fhir-resources
- resourceType (string, required) - query (string, required)
Search existing FHIR resources
Configure Aidbox MCP server
Runme command
The easiest way to run Aidbox with MCP is use the runme command:
You will get Aidbox with enabled MCP server and created AccessPolicy
for it.
Already existed Aidbox
If you have already configured Aidbox to enable the MCP server:
Create
AccessPolicy
Aidbox MCP endpoints are not public, so you need to set up Acces Control for these endpoints.
The easiest way (but not the safest) is to create allow AccessPolicy
for mcp operations:
This means that Aidbox MCP endpoints become public and anybody has access to them.
The second way (safer one) is to create Client
, AccessPolcy
, get a token and use this token to connect to Aidbox MCP server.
Create Client
resource
Create AccessPolicy resource:
Get token:
Save a token from the response to connect to MCP server.
Connect to MCP server
Using LLM agents
Aidbox MCP server config:
For the
Cursor
editor add this config to your project folder.cursor/mcp.json
and make sure thatSettings
->Cursor Settings
->MCP
is enabled.For the LLM Desktop applications, such
Claude
,ChatGPT
etc. go to theSettings
and set the config. For example, inClaude
desktop app go toSettings
->Developer
->Edit Config
.
Now you can ask your LLM agent to Create, Read, Update or Delete FHIR resources in Aidbox
Using MCP Inspector
MCP Inspector is a tool that helps you to discover and test MCP tools. It is a web application that allows you to connect to the Aidbox MCP server and explore its capabilities.
Run MCP Inspector
Open the inspector in the browser:
Connect to Aidbox MCP server
Select SSE
in Transport Type
dropdown. And set URL to <your-aidbox-base-url>/mcp
.
Add your Aidbox token to
Authentication
->Bearer Token
(only if you created Aidbox Client and got the token).Click
Connect
button.
Now you can discover tools and use them.
Last updated
Was this helpful?