Client registration: CIMD vs DCR
ezForge supports two registration paths, matching the MCP Authorization Spec (2025-11 revision):CIMD registration (preferred)
CIMD is the preferred path for clients that can host a metadata document at a stable HTTPS URL (Claude Desktop, Gemini ADK, Cursor, etc.). The client hosts a JSON document at a URL it controls, e.g.:client_id:
client_id, fetches the metadata document, validates it, and registers the client automatically. No separate registration step is required.
The metadata cache is refreshed every 24 hours using ETag-based conditional requests (RFC 7232). Metadata fetch failures degrade safely — the authorization request is rejected with a clear error and no token is issued.
You can also pre-register a CIMD client explicitly (e.g. to validate the document ahead of the auth flow):
DCR registration (fallback)
DCR (RFC 7591) remains fully supported for clients that cannot host a metadata URL. See Dynamic Client Registration below.Why OAuth 2.1?
The Model Context Protocol specification recommends OAuth 2.1 as the standard auth mechanism for HTTP-based MCP servers. It provides:- Short-lived access tokens that limit the impact of token leakage
- Refresh tokens for long-lived sessions without re-authentication
- Fine-grained scopes to control what clients can do
- PKCE to prevent authorization code interception attacks (mandatory —
plainmethod not accepted)
How it works
Resource Indicators (RFC 8707)
Access tokens are bound to a specific server URI using RFC 8707 Resource Indicators. A token issued formy-server.mcp.ezforge.ai cannot be used to call any other server. This prevents token replay attacks across servers.
MCP scopes
ezforge_managed mode
When a server usesezforge_managed auth (the default), ezForge acts as the OAuth authorization server:
- ezForge registers the MCP client
- Handles the authorization flow
- Issues and validates tokens
- No configuration required from you
BYOA mode (Bring Your Own Auth)
If you already run an OAuth 2.1 authorization server, you can configure your ezForge server to accept tokens from it:Authorization: Bearer <token> header, ezForge performs a lightweight structural check: it confirms that a syntactically valid Bearer token is present (RFC 6750 §2.1). If the header is absent or malformed, the request is rejected immediately.
If the structural check passes, ezForge forwards the token as-is to your MCP server via the auth header proxy (spec §3.3 auth header proxy). Your MCP server — or the external IdP configured in byoaConfig — is responsible for full JWT verification: signature validation, iss claim check, aud claim check, and expiry.
Customers using BYOA mode are responsible for JWT verification at their own MCP server endpoint. ezForge does not fetch your JWKS, verify JWT signatures, or inspect claims on your behalf.
--byoa-jwks-uri value is forwarded verbatim into the RFC 9728 Protected Resource Metadata response so MCP clients can discover your IdP’s JWKS endpoint; ezForge itself does not fetch or validate against it.
Choosing between ezforge_managed and BYOA
Both modes deliver the same MCP-spec compliance (OAuth 2.1, PKCE, RFC 8707 resource binding, RFC 9728 protected resource metadata). The choice is about who owns identity issuance.
Both modes use the same
ezforge servers update --auth-mode {ezforge_managed,byoa} command — see the BYOA mode section above for the BYOA-specific flags.
Protected Resource Metadata
All ezForge-hosted servers expose the RFC 9728 standard endpoint:Token lifetimes
Security recommendations
- Request only the scopes your application needs
- Use
offline_accessonly when a long-lived session is necessary - Treat access tokens as secrets — don’t log them or include them in URLs
- Rotate refresh tokens regularly; ezForge rotates them automatically on use