Skip to content

Commit 6dff3c6

Browse files
authored
docs: Add MCP OAuth 2.1 deployment configuration (#1638)
* docs: Add MCP OAuth 2.1 env vars to demo .env example Document all MCP OAuth configuration variables with descriptions, generation commands, and format notes (escaped newlines for PEM keys). * fix: Mark required OAuth vars and document PEM format prerequisite --------- Co-authored-by: Ben Coombs <bjcoombs@users.noreply.github.com>
1 parent 3c43ca9 commit 6dff3c6

1 file changed

Lines changed: 38 additions & 0 deletions

File tree

deploy/demo/.env.demo.example

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,44 @@ MCP_BASE_URL=https://demo.meridianhub.cloud
176176
# Must match an entry in API_KEYS above (format: "key:identity").
177177
MERIDIAN_API_KEY=changeme
178178

179+
# [OPTIONAL] Enable OAuth 2.1 for MCP clients (Claude.ai, etc.).
180+
# When true, MCP clients must complete an OAuth flow to get a JWT.
181+
MCP_OAUTH_ENABLED=false
182+
183+
# [OPTIONAL] OAuth client ID that MCP clients use to authenticate.
184+
#MCP_OAUTH_CLIENT_ID=meridian-mcp
185+
186+
# [OPTIONAL] Base domain for subdomain-based tenant resolution on MCP requests.
187+
#MCP_BASE_DOMAIN=demo.meridianhub.cloud
188+
189+
# [REQUIRED when MCP_OAUTH_ENABLED=true] Dex OIDC issuer URL (internal).
190+
# The MCP server acts as an OIDC client of Dex for delegated authentication.
191+
#MCP_DEX_ISSUER_URL=http://dex:5556/dex
192+
193+
# [OPTIONAL] Dex static client ID for the MCP server's OIDC integration.
194+
#MCP_DEX_CLIENT_ID=meridian-service
195+
196+
# [REQUIRED when MCP_OAUTH_ENABLED=true] MCP server's OIDC callback URL (must be registered in dex.yaml).
197+
#MCP_DEX_CALLBACK_URL=https://demo.meridianhub.cloud/oauth/callback
198+
199+
# [REQUIRED when MCP_OAUTH_ENABLED=true] JWKS URL for validating bearer tokens on MCP requests.
200+
# Points to the BFF's JWKS endpoint so BFF-issued tokens are accepted.
201+
#MCP_JWKS_URL=https://demo.meridianhub.cloud/api/auth/jwks
202+
203+
# [REQUIRED when MCP_OAUTH_ENABLED=true] RSA private key for JWT signing.
204+
# Must be the same key used by the BFF for cross-subdomain session sharing.
205+
# Store as a single line with literal \n for newlines (docker-compose .env limitation).
206+
# Generate: openssl genrsa 2048 | awk '{printf "%s\\n", $0}'
207+
# NOTE: The Meridian binary must include the escaped-newline PEM fix
208+
# (strings.ReplaceAll for \n literals) for this format to work.
209+
#JWT_SIGNING_KEY=-----BEGIN PRIVATE KEY-----\nMIIEv...base64...==\n-----END PRIVATE KEY-----
210+
211+
# [OPTIONAL] Key ID for the JWT signing key (must match JWKS).
212+
#JWT_SIGNING_KEY_ID=meridian-1
213+
214+
# [OPTIONAL] JWT issuer claim.
215+
#JWT_SIGNING_ISSUER=meridian
216+
179217
# ---------------------------------------------------------------------------
180218
# Frontend
181219
# ---------------------------------------------------------------------------

0 commit comments

Comments
 (0)