Dynamic Client Registration is now supported¶
The SDK now supports Dynamic Client Registration (DCR) for OAuth2 authentication. With DCR, the platform automatically discovers OAuth endpoints and registers client credentials with the provider, so you no longer need to manually create an application in a developer console or upload a client ID and secret.
This is especially useful when connecting to MCP servers, many of which support DCR out of the box. Enabling it is as simple as setting a single flag:
pack.setUserAuthentication({
type: sdk.AuthenticationType.OAuth2,
useDynamicClientRegistration: true,
useProofKeyForCodeExchange: true,
scopes: ["read", "write"],
});
For more details, including how to combine DCR with manually specified endpoints, see the OAuth2 authentication guide and the MCP guide.