-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.env.example
More file actions
128 lines (102 loc) · 12 KB
/
Copy path.env.example
File metadata and controls
128 lines (102 loc) · 12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
# ═══════════════════════════════════════════════════════════════════════════
# Required
# ═══════════════════════════════════════════════════════════════════════════
FHIR_BASE_URL=https://fhir.example.org # Base FHIR URL. Derives server -> <base>/api/FHIR/<version> and token -> <base>/oauth2/token
# Optional if FHIR_SERVER_URL is set (and FHIR_TOKEN_URL for smart auth)
FHIR_CLIENT_ID=your-client-id # SMART Backend Services client ID
FHIR_ACTIVE_KEY=your-base64-encoded-key # Base64-encoded PKCS#8 PEM private key (RSA or EC P-384)
# ═══════════════════════════════════════════════════════════════════════════
# Server & Transport
# ═══════════════════════════════════════════════════════════════════════════
# MCP_TRANSPORT=http # Transport the server listens on
# Options: "http" (default) | "stdio"
# PORT=5000 # HTTP listen port
# BIND_HOST=0.0.0.0 # Bind address (127.0.0.1 under --dev)
# ALLOWED_HOSTS=app.example.com # Comma-separated; DNS-rebinding protection, required when 0.0.0.0
# MCP_JSON_LIMIT=4mb # Max MCP request body (Express limit string); raise for large writes/bundles
# ═══════════════════════════════════════════════════════════════════════════
# FHIR Connection
# ═══════════════════════════════════════════════════════════════════════════
# FHIR_VERSION=R4 # Active FHIR release
# Options: "R4" (default) | "R4B" | "R5"
# FHIR_SERVER_URL=https://fhir.example.org/fhir/R4 # Override derived FHIR API URL
# FHIR_TOKEN_URL=https://auth.example.org/token # Override derived token endpoint
# FHIR_REQUEST_TIMEOUT_MS=30000 # Per-attempt timeout (ms) for outgoing FHIR requests
# FHIR_PAGINATION_PATHS=FHIRProxy # Extra path prefixes allowed in pagination links
# ═══════════════════════════════════════════════════════════════════════════
# Auth & Keys
# ═══════════════════════════════════════════════════════════════════════════
# FHIR_AUTH=smart # Auth mode. "none" disables SMART auth for public no-auth
# test endpoints (FHIR_CLIENT_ID and FHIR_ACTIVE_KEY not needed)
# Options: "smart" (default) | "none"
# FHIR_RETIRED_KEYS=... # Comma-separated base64 PEMs kept in JWKS during rotation
# FHIR_JWKS_URL= # External JWKS URL; omit to serve the built-in /jwks endpoint
# ═══════════════════════════════════════════════════════════════════════════
# MCP Tool Authorization (optional, per-caller Entra App Roles)
# ═══════════════════════════════════════════════════════════════════════════
# MCP_AUTHZ=entra # Per-caller tool gating provider. "entra" requires HTTP + Authorization: Bearer
# Options: "none" (default) | "entra"
# MCP_ROLE_PREFIX=FhirHydrant # Prefix on granted role values (e.g. FhirHydrant.Patient.Read)
# Roles: <Resource>.Read | <Resource>.Write | Operation.<key> | Bundle | SystemHistory.Read | Admin
# MCP_ENTRA_TENANT_ID=00000000-0000-0000-0000-000000000000 # Required when entra; tenant GUID (not a domain alias)
# MCP_ENTRA_AUDIENCE=00000000-0000-0000-0000-000000000000 # Required when entra; API application (client) ID GUID (v2 token aud)
# Entra app manifest must set requestedAccessTokenVersion to 2
# ═══════════════════════════════════════════════════════════════════════════
# Metadata & Scope Gating
# ═══════════════════════════════════════════════════════════════════════════
# FHIR_METADATA_MODE=strict # How the server handles /metadata mismatches
# Options: "strict" (default) | "warn" | "off"
# ═══════════════════════════════════════════════════════════════════════════
# Response Shaping
# ═══════════════════════════════════════════════════════════════════════════
# FHIR_RESPONSE_MODE=compact # Response shape (compact-locked hides responseMode from AI)
# Options: "compact" | "full" | "compact-locked"
# FHIR_MAX_RESPONSE_BYTES=262144 # Byte limit per model-facing JSON response; chunked when exceeded
# FHIR_MAX_ARTIFACT_MB=16 # Separate byte ceiling (in MiB) for native/binary artifact bodies
# (base64 transport ≈ +33%). Independent of FHIR_MAX_RESPONSE_BYTES.
# FHIR_DEFAULT_COUNT=0 # Default _count injected when advertised (0 = server decides)
# FHIR_MAX_COUNT=0 # Cap on caller _count values (0 = no cap)
# ═══════════════════════════════════════════════════════════════════════════
# Writes
# ═══════════════════════════════════════════════════════════════════════════
# FHIR_WRITE_CAPABILITIES=create,patch # Comma-separated; unset = read-only; gated by /metadata
# Options: "create" | "update" | "patch" | "delete"
# FHIR_VALIDATE_WRITES=local # Write-payload validation level
# Options: "off" | "local" (default, structural) | "server" (local + $validate preflight)
# FHIR_WRITE_DRY_RUN=false # Validate and log writes without executing them
# ═══════════════════════════════════════════════════════════════════════════
# Bundles & Operations
# ═══════════════════════════════════════════════════════════════════════════
# FHIR_BUNDLE_CAPABILITIES=batch # Comma-separated; unset = bundle tool off
# Options: "batch" | "transaction"
# FHIR_BUNDLE_WRITES_ENABLED=false # Allow write entries in bundles (also needs FHIR_WRITE_CAPABILITIES)
# FHIR_OPERATIONS=summary,match # Comma-separated catalog keys ($ optional); "none" disables all; unset = all
# Options: "everything" | "lastn" | "validate" | "docref" | "expand" | "lookup" | "translate" | "summary" | "match"
# ═══════════════════════════════════════════════════════════════════════════
# Terminology
# ═══════════════════════════════════════════════════════════════════════════
FHIR_TERMINOLOGY_BASE_URL=https://tx.fhir.org/r4 # Base URL for terminology services; unset = terminology tools off
# ═══════════════════════════════════════════════════════════════════════════
# Audit
# ═══════════════════════════════════════════════════════════════════════════
# FHIR_AUDIT_SINK=console,file # Comma-separated; off when unset
# Options: "console" | "file" | "http"
# FHIR_AUDIT_FILE=./audit.jsonl # JSONL destination for the file sink (parent dir must exist)
# FHIR_AUDIT_USER_HEADER=X-MS-CLIENT-PRINCIPAL-NAME # Proxy header recorded as the audit "user"
# HTTP sink — POST each event to a collector / SIEM / FHIR audit repository (not the FHIR server)
# FHIR_AUDIT_HTTP_URL=https://audit-collector.internal/ingest # Required when "http" sink is active
# FHIR_AUDIT_HTTP_FORMAT=raw # Body shape for the http sink
# Options: "raw" (default, internal JSON, generic collectors) | "fhir-auditevent" (R4, ATNA)
# FHIR_AUDIT_HTTP_AUTH=Bearer your-token # Sent verbatim as the Authorization header
# ═══════════════════════════════════════════════════════════════════════════
# Advanced Tuning (page coalescing)
# ═══════════════════════════════════════════════════════════════════════════
# FHIR_PREFETCH_MAX_PAGES=5 # Max upstream pages per coalesced compact search
# FHIR_PREFETCH_MAX_ENTRIES=5000 # Max entries accumulated before stopping
# FHIR_PREFETCH_MAX_BYTES=2097152 # Max raw bytes fetched before stopping
# FHIR_PREFETCH_TIMEOUT_MS=25000 # Wall-clock budget for the coalescing loop
# ═══════════════════════════════════════════════════════════════════════════
# Logging
# ═══════════════════════════════════════════════════════════════════════════
# LOG_LEVEL=info # Log verbosity
# Options: "error" | "warn" | "info" (default) | "debug"