fhir-mcp-server-medagentbench
About
An implementation of Model Context Protocol server for use with MedAgentBench (FHIR request generation)
Details
- Author
- mike-holcomb
- Downloads
- 176
- Categories
- Other
Jump to
- Implements MCP handlers: list_resources, read_resource, list_tools, call_tool.
- Simulates FHIR operations: search_fhir, read_fhir, create_fhir_resource.
- No actual HTTP requests; returns textual request representations.
- Uses mcp-server library for MCP communication.
- Configured and packaged with Poetry.
- Includes asynchronous unit tests with pytest and pytest-asyncio.
Install with Poetry (requires Python >= 3.10). Set the FHIR_BASE_URL environment variable to your desired FHIR server base URL. Run fhir-mcp-server-medagentbench to start the server, which listens for MCP requests over standard input/output.
fhir-mcp-server-medagentbench
A Python-based MCP (MedAgentBench Communications Protocol) server designed for the MedAgentBench environment. This server simulates interactions with a FHIR (Fast Healthcare Interoperability Resources) API.
Instead of making actual HTTP requests to a FHIR server, it intercepts MCP requests for FHIR operations and returns a textual representation of the HTTP request that would have been made (e.g., GET https://fhir.example.com/Patient/123 or POST https://fhir.example.com/Observation\n{...}). This allows testing MedAgentBench agents without needing a live FHIR endpoint.
Features
Implements MCP handlers:
list_resources: Lists available simulated resources (currently CapabilityStatement).
read_resource: Simulates reading a FHIR resource by its URI.
list_tools: Lists available FHIR simulation tools.
call_tool: Simulates executing FHIR operations:
search_fhir: Simulates searching for FHIR resources.
read_fhir: Simulates reading a specific FHIR resource by URI.
create_fhir_resource: Simulates creating a new FHIR resource.
Uses mcp-server library for MCP communication.
Configured and packaged using Poetry.
- Includes asynchronous unit tests with
pytestandpytest-asyncio.
Installation
Ensure you have Python >= 3.10 and Poetry installed.
poetry install
Configuration
Before running the server, you must set the FHIR_BASE_URL environment variable. This URL is used to construct the simulated request strings.
```bash
export FHIR_BASE_URL="https://your-fhir-server-base.com/fhir"
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.



