fhir-inspector-mcp

v0.0.6
fhir-inspector-mcp Checked 8 hours ago Published 13 days ago

Zero-cost MCP server to inspect, validate, summarize, and generate FHIR R4/R5 resources from CytoCync

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

inspect_resource Inspect Resource

Inspect a FHIR resource: element tree, references, and contained resources. Structural (pydantic) parsing only; FHIRPath invariants are not evaluated. Returns the unified envelope with data containing resource_type, fhir_version, element_tree, references, contained, and summary counts.

ParameterTypeDescription
resource *stringThe FHIR resource as a JSON string.
include_typesbooleanInclude the FHIR type of each element node.
max_depthintegerElement-tree depth, clamped to [1, 10].
versionFHIR version, 'R4' (default) or 'R5'.

validate_resource Validate Resource

Validate a FHIR resource structurally (pydantic only). Structural (pydantic) validation only. FHIRPath invariants and ValueSet terminology bindings are NOT enforced - the fhir.resources library has no engine for them.

ParameterTypeDescription
resource *stringThe FHIR resource as a JSON string.
versionFHIR version, 'R4' (default) or 'R5'.

summarize_bundle Summarize Bundle

Summarize a FHIR Bundle: type, entry counts, resource distribution, references. Accepts all 9 FHIR bundle types. O(n) over entries with a bounded, cycle-safe reference graph. Non-Bundle resources return E_NOT_A_BUNDLE.

ParameterTypeDescription
bundle *stringThe FHIR Bundle as a JSON string.
include_referencesbooleanInclude the bounded reference edge list.
max_entriesintegerCaller cap on entries summarised, clamped to [1, 10000].
versionFHIR version, 'R4' (default) or 'R5'.

generate_example Generate Example

Generate a minimal valid example of any FHIR resource type. Introspection-driven: covers every resource type in the selected FHIR version without hand-written templates. Only required fields are populated; overrides are flat dotted-path patches applied as JSON data.

ParameterTypeDescription
resource_type *stringFHIR resource type name, e.g. 'Patient'.
overridesOptional flat dotted-path overrides, e.g. {"gender": "male"}.
versionFHIR version, 'R4' (default) or 'R5'.