Skip to content

feat: add MCP_ENABLED for the remote MCP surface - #5

Merged
lakhansamani merged 1 commit into
mainfrom
feat/mcp-enabled
Aug 11, 2026
Merged

feat: add MCP_ENABLED for the remote MCP surface#5
lakhansamani merged 1 commit into
mainfrom
feat/mcp-enabled

Conversation

@lakhansamani

Copy link
Copy Markdown
Contributor

Adds MCP_ENABLED so this deployment can serve Authorizer's MCP tool surface over HTTP at POST <AUTHORIZER_URL>/mcp, shipped in authorizerdev/authorizer#757.

Off by default — it is a new internet-facing authenticated surface and should be opted into.

It requires AUTHORIZER_URL, and that is a hard failure

Every token presented at /mcp is checked against this deployment's canonical resource identifier, <url>/mcp. Without --url that identifier would be derived from request headers (X-Authorizer-URL, X-Forwarded-Host, Host) — which lets a caller name the audience their own token must match, i.e. no check at all.

The server therefore exits at boot in that configuration rather than serving an endpoint that looks authenticated and is not. Enabling MCP without AUTHORIZER_URL is a crash, not a degraded mode.

No new port

MCP is served on the main HTTP port, not one of its own: it must be publicly reachable on the same origin as the OAuth metadata clients discover it through. So there is no Service, Ingress or port change — it inherits the existing routing, CORS, security headers and rate limiting.

Verification

The CMD array still parses as JSON after joining Dockerfile line continuations (the way Docker itself parses it), and the resulting command string passes sh -n.

Authorizer 2.4.0 can serve its MCP tool surface over HTTP at POST <url>/mcp as
an OAuth 2.1 resource server (authorizerdev/authorizer#757). Exposes it through
MCP_ENABLED, defaulting to false — it is a new internet-facing authenticated
surface and should be opted into.

It requires AUTHORIZER_URL. Every token presented at /mcp is checked against
this deployment's canonical <url>/mcp, and with no --url that identifier would
come from request headers, letting a caller name the audience their own token
must match. The server exits at boot rather than serve that, so enabling MCP
without AUTHORIZER_URL is a crash, not a degraded mode.

Verified: the CMD array still parses as JSON after joining Dockerfile line
continuations, and the command string passes `sh -n`.
@lakhansamani
lakhansamani merged commit 365f597 into main Aug 11, 2026
@lakhansamani
lakhansamani deleted the feat/mcp-enabled branch August 11, 2026 05:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant