smart-fhir
Click on "Install 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., "@smart-fhirSearch for Patients with family name Smith"
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.
smart-fhir
A connector that will not invent a patient.
Install · Tools · How it works · Limits
Install
stdio only. After the TypeScript build, add a local connector:
name: smart-fhir
command: node
args: dist/index.jsnpm install
npm run buildEnv for that add (defaults, not secrets):
FHIR_ISS = https://launch.smarthealthit.org/v/r4/fhir
FHIR_VERSION = R4
FHIR_AUTH_MODE = open
FHIR_WRITE = off
FHIR_AUDIT_PATH = ./audit/audit.jsonlDo not put secret values in the repo. No public HTTP port. Do not bind TCP.
Morning shortcut (same env)
npx -y tsx src/index.tsSee package.json scripts: install, build, test, prove.
Related MCP server: smart-mcp-server
Tools
Four tools. No create / update / delete.
Tool | Action |
| GET |
|
|
| GET |
| GET |
resourceType allowlist: Patient | Observation | Condition | MedicationRequest | Encounter. Anything else → { ok: false, error: "resourceType not in v1 allowlist" }.
How it works
FHIR_VERSION must be R4. Anything else refuses to start.
What | URL | How to read it |
FHIR index (published page is R5 5.0.0) | Official index only. Not implemented. | |
FHIR R4 (v1) | FHIR Release 4, 4.0.1. Resource model. | |
SMART App Launch 2.2.0 (STU 2.2) | Current published SMART IG. Based on FHIR R4. | |
App launch + authorization | Discovery, standalone/EHR launch, PKCE, token. App Launch (code+PKCE) is out of v1. | |
Backend Services | client_credentials + private-key JWT. Implemented; unused unless env is set. |
ISS allowlist (trailing slash stripped, anything else refused):
https://launch.smarthealthit.org/v/r4/fhir(default)https://r4.smarthealthit.orghttps://hapi.fhir.org/baseR4
Set FHIR_ISS to another allowlisted base to point at a later ISS. A new ISS needs a review first. Do not point this at a live EHR without that review plus a real client_id.
FHIR_AUTH_MODE | Behavior |
| Discover, then FHIR GET without Authorization. Discovery 404 is not fatal in open (logged; continue). 401/403 FHIR → |
| Same discovery. FHIR GET with Authorization Bearer token. |
| Only if both |
App Launch (code+PKCE) is out. FHIR_REDIRECT_URI is reserved and unused.
Auth failure shape: { ok: false, http_status, issue?, error? }. Never a synthetic Patient.
FHIR_WRITE defaults off. v1 has no write tools even if someone sets on. Writes never POST AuditEvent to FHIR.
Name | Default | Notes |
FHIR_ISS | default launcher R4 | Must stay allowlisted |
FHIR_VERSION | R4 | Reject anything else |
FHIR_AUTH_MODE | open | open / bearer / backend_jwt |
FHIR_WRITE | off | Writes stay off in v1 |
FHIR_AUDIT_PATH |
| Append-only JSONL; set |
FHIR_ACCESS_TOKEN | unset | Bearer only |
FHIR_CLIENT_ID | unset | Backend Services |
SMART_CLIENT_ID | unset | Alias of FHIR_CLIENT_ID |
FHIR_PRIVATE_KEY_PEM | unset | Backend Services JWT |
FHIR_JWKS_URL | unset | Reserved if an EHR wants JWKS |
FHIR_SCOPE | five system/*.rs types | JWT mode override |
FHIR_REDIRECT_URI | unset | Reserved for later App Launch |
Audit lines: ts, tool, iss, mode, resourceType, id?, http_status, entry_count?. No resource body, no token, no PEM, no name/MRN query values.
Limits
R5 / R4B as default. Extra resource types. CRUD. Bulk. App Launch browser/PKCE.
Real EHR / real PHI. Production deploy. Public bind or Streamable HTTP.
momentum / fhirhydrant / Atrium / Pinecone / Medplum.
Not a medical product. Does not diagnose, treat, or store PHI.
No PHI. No live EHR.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceEnables AI applications to securely search and manage healthcare data from FHIR R4-compliant servers with built-in safety validation for AI-generated clinical observations, preventing recording of physiologically impossible values.8MIT
- FlicenseNot gradedqualityDmaintenanceEnables AI assistants to securely interact with FHIR R4 servers for clinical decision support workflows, including PlanDefinition execution, FHIR resource management, terminology services, and Questionnaire/StructureMap transformation via Matchbox.1
- AlicenseAqualityAmaintenanceRead-only MCP server for licensed Healthpoint HL7 FHIR API access.101Apache 2.0
- AlicenseAqualityAmaintenanceEnables read-only FHIR access to Practice Fusion EHR to search patients, appointments, conditions, medications, and lab results.13223MIT
Related MCP Connectors
Securely access and manage FHIR healthcare data stored in Medplum.
Hosted MCP endpoint with realistic fake data for prototyping agents. 12 tools, no setup.
Guardrailed FHIR access for AI agents: PHI redaction, audit trail, step-up auth, tenant isolation
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/swami8791/smart-fhir-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server