Skip to main content
Glama

smart-fhir

환자를 꾸며내지 않는 커넥터입니다.

MCP v1 transport stdio FHIR R4 4.0.1 SMART 2.2.0 writes off

tools 4 sandbox public synthetic empty search stays empty unknown id 404 PHI none

설치 · 도구 · 동작 방식 · 제한 사항


설치

stdio 전용입니다. TypeScript 빌드 후 로컬 커넥터를 추가하세요:

name: smart-fhir
command: node
args: dist/index.js
npm install
npm run build

이 env를 추가하세요(기본값이며 비밀값은 아닙니다):

FHIR_ISS = https://launch.smarthealthit.org/v/r4/fhir
FHIR_VERSION = R4
FHIR_AUTH_MODE = open
FHIR_WRITE = off
FHIR_AUDIT_PATH = ./audit/audit.jsonl

저장소에 비밀값을 넣지 마세요. 공개 HTTP 포트를 열지 마세요. TCP를 바인딩하지 마세요.

오전 단축 실행(같은 env)

npx -y tsx src/index.ts

package.json의 스크립트를 참고하세요: install, build, test, prove.

Related MCP server: smart-mcp-server

도구

도구는 네 가지입니다. create / update / delete는 없습니다.

도구

동작

smart_discover

GET {iss}/.well-known/smart-configuration. 파싱된 JSON 또는 명시적 오류를 반환합니다. 엔드포인트를 꾸며내지 않습니다.

fhir_auth_status

{ mode, iss, fhir_version: "R4", write: "off", token_present, discovery_ok, last_error? }. token이나 PEM을 절대 출력하지 않습니다.

fhir_search

GET {iss}/{resourceType}?... _count 기본값 10, 최대 50. 한 페이지만. 빈 Bundle은 그대로 반환합니다.

fhir_read

GET {iss}/{resourceType}/{id}. 404는 찾을 수 없음(not found)을 의미하며, 꾸며낸 리소스가 아닙니다.

resourceType 허용 목록: Patient | Observation | Condition | MedicationRequest | Encounter. 그 외에는 → { ok: false, error: "resourceType not in v1 allowlist" }.

동작 방식

FHIR_VERSIONR4여야 합니다. 그 외 값이면 시작을 거부합니다.

항목

URL

읽는 방법

FHIR index(현재 바라보는 페이지는 R5 5.0.0)

http://hl7.org/fhir/

공식 인덱스만. https://hl7.org/fhir/R4/ **0.

FHIR R4 (v1)

https://hl7.org/fhir/R4/

FHIR Release 4, 4.0.1. Resource 리소스 모델.

SMART App Launch 2.2.0 (STU 2.2)

https://hl7.org/fhir/smart-app-launch/

현재 발행된 SMART IG. FHIR R4 기반.

App launch + authorization

https://hl7.org/fhir/smart-app-launch/app-launch.html

Discovery, standalone/EHR launch, PKCE, token. App Launch(code+PKCE)는 v1 범위 밖.

Backend Services

https://hl7.org/fhir/smart-app-launch/backend-services.html

client_credentials + private-key JWT. 구현 되어 있으며, env가 설정된 경우에만 사용.

ISS 허용 목록 (끝나는 슬래시는 제거되며, 그 외 값은 거부됩니다):

  • https://launch.smarthealthit.org/v/r4/fhir (기본값)

  • https://r4.smarthealthit.org

  • https://hapi.fhir.org/baseR4

FHIR_ISS를 허용 목록에 있는 다른 base로 설정하면 다른 ISS를 가리킬 수 있습니다. 새 ISS는 먼저 검토가 필요합니다. 검토와 실제 client_id가 없으면 운영 중인 EHR을 가리키지 마세요.

FHIR_AUTH_MODE

동작

open (기본값)

Discovery 후 Authorization 없이 FHIR GET. Discovery 404는 open 모드에서는 치명적이지 않음(로그로 남기고 계속). FHIR 401/403 → { ok: false, http_status, ... }.

bearer

Discovery는 동일하게 수행함. Authorization Bearer 토큰을 붙여 FHIR GET.

backend_jwt

FHIR_CLIENT_ID(또는 SMART_CLIENT_ID)와 FHIR_PRIVATE_KEY_PEM이 모두 있을 때만 정상 동작. SMART Backend Services JWT. env가 없으면 시작을 거부. 자격 증명을 꾸며내지 않습니다.

App Launch(code+PKCE)는 범위 밖입니다. FHIR_REDIRECT_URI는 reserved 되어 있으며 아직 사용하지 않습니다.

인증 실패 형태: { ok: false, http_status, guide?, error? }. 합성 Patient는 반환하지 않습니다.

FHIR_WRITE 기본값은 off입니다. v1은 누가 on을 설정해도 쓰기 도구가 없습니다. 쓰기 통신은 FHIR에 AuditEvent를 POST하지 않습니다.

이름

기본값

설명

FHIR_ISS

default launcher R4

반드시 allowlisted 유지

FHIR_VERSION

R4

다른 값은 거부

FHIR_AUTH_MODE

open

open / bearer / Backend_jwt

FHIR_WRITE

off

v1에서는 쓰기(write)는 항상 off

FHIR_AUDIT_PATH

/workspace/smart-fhir-mcp/audit/audit.jsonl

Append-only JSONL; 로컬에서는 ./audit/audit.jsonl

FHIR_ACCESS_TOKEN

미설정

Bearer 전용

FHIR_CLIENT_ID

미설정

Backend Services용

SMART_CLIENT_ID

미설정

FHIR_CLIENT_ID의 별칭

FHIR_PRIVATE_KEY_PEM

미설정

Backend Services JWT 용

FHIR_JWKS_URL

미설정

EHR가 JWKS를 원할 경우에 사용

FHIR_SCOPE

five system/*. 못한 types

Install Server
F
license - not found
A
quality
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

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

View all related MCP servers

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

View all MCP Connectors

Latest Blog Posts

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