FHIR Tools MCP Server

FHIR Tools MCP Server

Provides FHIR resource validation, synthetic test fixture generation, and HIPAA-safe logging review as MCP tools for AI agents.

Category
Visit Server

README

FHIR Tools MCP Server

An MCP (Model Context Protocol) server exposing FHIR resource validation, synthetic test fixture generation, and HIPAA-safe logging review as tools an AI agent can call directly.

What it does

Three tools:

  • fhir_validate_resource — validates a FHIR resource JSON payload: checks resourceType presence, id format, required fields for known resource types (Observation, Encounter, Condition, MedicationRequest), reference field format (ResourceType/id), and whether Coding system URIs are recognized (LOINC, SNOMED CT, ICD-10, RxNorm) rather than placeholder/made-up values.
  • fhir_generate_test_fixture — generates synthetic FHIR test data (Patient, Observation, Condition) for use in tests. All generated data is obviously fake (TEST- prefixed ids, placeholder names) — this tool never uses or produces real patient data.
  • fhir_check_hipaa_safe_logging — reviews code for patterns that could leak PHI into application logs: logging full request/response bodies, logging clinical resource variables directly (vs. just their id), and exception handlers that log raw request context.

Why an MCP server instead of just asking an LLM

FHIR schema rules (required fields per resource type, valid coding systems, reference formats) are precise and well-documented — the kind of thing that should be checked deterministically, not re-derived by an LLM from training data each time (which risks subtly wrong or outdated schema assumptions). Wrapping this as MCP tools means an agent gets a guaranteed-correct validation result and can iterate on a payload until it actually passes, rather than trusting a plausible-sounding but unverified answer.

Running it

pip install -r requirements.txt
python server.py

Connect it to Claude Code, Claude Desktop, or any MCP client via the client's MCP server config (stdio transport by default).

Example: generating a test fixture

Request: generate an Observation fixture for scenario "blood pressure reading"

Output:

# Scenario: blood pressure reading
{
  "resourceType": "Observation",
  "id": "TEST-4f9a1b2c",
  "status": "final",
  "code": {
    "coding": [{"system": "http://loinc.org", "code": "85354-9", "display": "Blood pressure panel"}]
  },
  "subject": {"reference": "Patient/TEST-8e2d0a91"},
  "effectiveDateTime": "2026-08-11",
  "_note": "SYNTHETIC TEST DATA -- not a real observation"
}

Tests

pytest -v

13 tests covering validation (valid/invalid resources, malformed references, unknown coding systems), fixture generation, and logging safety review.

Limitations

  • Required-field checks cover a handful of common resource types, not the full FHIR resource catalog.
  • Coding system recognition is an allowlist of common systems (LOINC, SNOMED CT, ICD-10, RxNorm, etc.) — legitimate but less common systems will be flagged as "unrecognized" and need manual confirmation.
  • Logging safety checks are pattern-based static analysis, not a full data-flow analysis — treat findings as a starting point for review, not a compliance guarantee.

Possible extensions

  • Expand required-field rules to cover more FHIR resource types
  • Add a tool that checks a resource against a specific FHIR Implementation Guide / profile, not just base FHIR structure
  • Add a tool that redacts PHI fields from a resource for safe logging, rather than just flagging unsafe patterns

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured