fhir_readLABSCO SUMMARY
One target server, read-only, with its own capability statement shaping the tools.
Generic HTTP wrappers make a model guess at FHIR search parameters, and FHIR servers differ enough that the guess often fails. Reading the live CapabilityStatement alongside embedded definitions closes that gap. Nothing here writes, and the target is fixed at configuration time.
What it is
A read-only MCP layer in front of a single configured FHIR R4 or R5 server. It ships embedded conformance definitions and fetches the target server's live CapabilityStatement, so tool calls are shaped by what that endpoint really supports.
What you get
- fhir_read — read a resource by type and id
- fhir_search — typed search, grounded in the target server's declared parameters
- fhir_capability_statement — what this particular server can do
- fhir_structure_definition and fhir_operation_definition — the shape of a resource, and the definition of an operation
- fhir_invoke_operation — conservative read-only operation invocation
- Discovery resources under fhirmcp://, including a server guide, an overview, a search guide and the schema registries
Requirements
Go, to build the binary. One config file naming the target FHIR base URL, and the bearer-token environment variable it references if that server needs authentication. Conformance artifacts are synced by a bundled script before the first build. Runs over stdio, or as a native SSE endpoint on 127.0.0.1:8081 by default.
Setup effort
Build from source — git clone https://github.com/healsens/healsens-fhirmcp.git
USE CASES
Searching a FHIR server you did not build
Read its capability statement first, then run a typed search using parameters it declares it supports.
Understanding a resource before parsing it
Pull the structure definition for that resource type and read the field shapes rather than inferring them.
Running a FHIR operation safely
Look up the operation definition, then invoke it through the read-only path.
Fetching one known record
Read the resource directly by type and id, without composing a search.
6 tools
Listed in project docs. Your client may show a different list.
fhir_searchfhir_capability_statementfhir_structure_definitionfhir_operation_definitionfhir_invoke_operationBEFORE YOU INSTALL
What to know first
Tools you get
6 tools named in the project's documentation. The server is read-only by design. fhir_invoke_operation is controlled by operations.enable_invoke and operations.allowlist_without_affects_state; the fhirmcp:// entries are resources, not tools.
Requires
Go 1.26 or newer
Optional
FHIR_BEARER_TOKEN in your environment
INSTALLATION
Connect your client
This one is built from source rather than installed with a single command.
Server setup
git clone https://github.com/healsens/healsens-fhirmcp.git
cd healsens-fhirmcp
cp examples/config.yaml config.yamlIn config.yaml, set target.base_url to your FHIR R4 or R5 server.
Export the bearer token environment variable named in the config if your server requires authentication.
./scripts/sync_fhir_core_defs.sh
go mod tidy
go build -o bin/healsens-fhirmcp ./cmd/healsens-fhirmcp
FHIRMCP_CONFIG=./config.yaml ./bin/healsens-fhirmcpPoint your MCP client at the built binary: over stdio the client launches bin/healsens-fhirmcp (by its full path) with FHIRMCP_CONFIG set to your config file; with server.transport set to sse, connect to http://127.0.0.1:8081/sse.
FHIR_BEARER_TOKEN is only named in config.yaml (bearer_token_env: FHIR_BEARER_TOKEN). If your FHIR server requires authentication, export that variable before you start the server.