fhir-mcp-server
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@fhir-mcp-server find patients with hypertension"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
fhir-mcp-server
FHIR R4 サーバー(JP-Core 準拠の fhir-server や HAPI FHIR 等)に接続する MCP(Model Context Protocol)サーバーです。Claude Desktop / Claude Code などの MCP クライアントから、FHIR データを自然言語で検索・参照・(オプトインで)書き込みできます。
fhir-server とはリポジトリ分離(接点は HTTP + Bearer トークンのみ)
SMART Backend Services(OAuth2
client_credentials+system/*スコープ)のクライアントとして動作FHIR_BASE_URLとクレデンシャルの差し替えで任意の FHIR R4 サーバーに接続可能
クイックスタート
Node.js 20+ が必要です。
npm install
npm run build
# Claude Code に登録(認証なしの fhir-server が localhost:3000 で動いている場合)
claude mcp add fhir -e FHIR_BASE_URL=http://localhost:3000 -- node /path/to/fhir-mcp-server/dist/index.js認証ありの FHIR サーバーには
FHIR_CLIENT_ID/FHIR_CLIENT_SECRETを渡します(両方未設定なら無認証モード)。書き込みツールは
FHIR_MCP_ALLOW_WRITES=trueのときだけ登録されます。Node.js を入れずに Docker で動かす方法と Claude Desktop の設定は docs/setup.md を参照してください。
Related MCP server: medplum-mcp
ドキュメント
ドキュメント | 内容 |
セットアップ、Docker / docker compose、Claude Code・Desktop への接続、環境変数、SMART Backend Services 認証 | |
Web版(リモート HTTP MCP)の起動、Auth0 の要点、Cloud Run・Render へのデプロイ、スマホ Claude アプリへの登録 | |
Web版の OAuth を Auth0 に委譲するための詳細手順 | |
ツール一覧(参照系・書き込み系)とトークン消費を抑えるコツ | |
開発コマンド、integration テスト、ソース構成 | |
設計方針とその背景 |
Available Tools
6 toolsget_capabilitiesGet FHIR server capabilitiesARead-only
Fetch the FHIR server's CapabilityStatement (GET /metadata) and return a compact summary: supported resource types, interactions, search parameters, and operations. Call this first to discover what the server supports.
Inputs: no named parameters.
get_historyGet resource historyARead-only
Fetch version history. With resourceType and id: history of one resource (GET /{type}/{id}/_history). With only resourceType: history across that type. With neither: system-wide history.
Inputs: id, count, since, resourceType.
patient_everythingFetch a patient's full recordARead-only
Fetch all resources in a patient's compartment (GET /Patient/{id}/$everything): conditions, observations, encounters, medications, etc. Use types to limit resource types and since to limit to recently-updated resources — both are recommended to keep responses manageable.
Inputs: patientId (required), count, since, types.
read_fhirRead a FHIR resourceARead-only
Read a single resource by type and id (GET /{resourceType}/{id}).
Inputs: id (required), resourceType (required).
search_fhirSearch FHIR resourcesARead-only
Search resources of a given type (GET /{resourceType}?...). Search parameters are passed through to the server as-is, so chained parameters, _has, _include, _revinclude, _sort, _total etc. all work. To keep responses small, prefer _elements (comma-separated field list) or _summary=true, and page with _count plus the returned hasNextPage flag (use params like _count/_offset or the server's paging links).
Inputs: resourceType (required), count, params.
validate_fhirValidate a FHIR resourceARead-only
Validate a resource against the server's profiles without saving it (POST /{resourceType}/$validate). Use this before create_fhir/update_fhir to catch structural or terminology errors early. The resource JSON must include resourceType.
Inputs: resource (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 6 tools
Each tool targets a distinct FHIR operation: server metadata, searching, reading, patient compartment, history, and validation. No overlaps are apparent.
Most tool names follow a verb_noun pattern (e.g., get_capabilities, search_fhir), except patient_everything which uses a noun_verb form. The inconsistency is minor and does not hinder understanding.
Six tools is appropriate for a FHIR MCP server covering essential interactions: discovery, search, read, patient compartment, history, and validation. The scope is well-balanced.
The toolset lacks create, update, and delete operations, which are core to resource lifecycle management. The validate_fhir tool even references create_fhir/update_fhir as prerequisites, but they are missing.
Maintenance
Related MCP Connectors
Securely access and manage FHIR healthcare data stored in Medplum.
Hosted MCP server for the Healthie EHR & telehealth API: patients, appointments, charting, tasks.
Hosted MCP server for Cliniko — patients, appointments, availability, and invoices for AI agents.
Hosted Apple Health MCP for Claude and ChatGPT, works outside the US. iPhone app, no local server.
Related MCP Servers
- AlicenseNot gradedqualityNot gradedmaintenanceEnables seamless integration with FHIR APIs for healthcare applications, allowing users to search, retrieve, create, update, and analyze clinical information through natural language interactions. Supports SMART-on-FHIR authentication and works with various healthcare systems like EPIC and HAPI FHIR servers.Apache 2.0
- FlicenseNot gradedqualityDmaintenanceProvides access to Medplum FHIR healthcare data, enabling Claude and other MCP clients to read, search, and query FHIR resources from one or more Medplum environments.-
- FlicenseNot gradedqualityAmaintenanceEnables LLM-based agents and MCP-compatible clients such as Claude Desktop to query and manipulate clinical data through natural-language prompts, supporting full CRUD operations on FHIR resources, OAuth2-secured FHIR API access, AI-powered document ingestion, and semantic search over embedded documents via Pinecone. It also provides LOINC terminology lookup and validation, plus RAG-ready context retrieval for clinical data workflows.-
- FlicenseNot gradedqualityAmaintenanceEnables LLM-based agents and MCP-compatible clients such as Claude Desktop to perform full CRUD operations on Fast Healthcare Interoperability Resources and query clinical data through natural-language prompts. It also provides document ingestion with semantic search, a RAG-ready retrieval pipeline, and LOINC terminology lookup and validation.-