Skip to content

Add manual OAuth registration (cli only - CE mode)#310

Draft
slimslenderslacks wants to merge 3 commits intomainfrom
slim/manual-oauth-registration
Draft

Add manual OAuth registration (cli only - CE mode)#310
slimslenderslacks wants to merge 3 commits intomainfrom
slim/manual-oauth-registration

Conversation

@slimslenderslacks
Copy link
Collaborator

What I did

This commit adds support for manually registering OAuth client credentials for MCP servers that don't support Dynamic Client Registration (DCR), along with comprehensive documentation of OAuth flows in Docker CE mode.

Changes:

  • Add 'docker mcp oauth register' command for manual client registration
    • Supports both confidential and public OAuth clients
    • Stores credentials securely in Docker credential helpers
    • Includes validation for URLs and required fields
  • Add detailed OAuth CE mode documentation (572 lines)
    • Documents DCR flow, authorization, token storage, and refresh
    • Includes architecture diagrams, CLI examples, and troubleshooting
    • Provides file references with line numbers for code navigation
    • Covers security features (PKCE, token binding, credential helpers)
  • Fix linting issues in OAuth command handlers
    • Add explicit error handling for MarkFlagRequired calls
    • Rename unused context parameter to underscore
    • Apply gofmt formatting to imports

The manual registration feature enables OAuth integration with providers that don't support RFC 7591 DCR, expanding compatibility with a wider range of OAuth providers.

CE mode

See manual oauth registration for details but this feature does not rely on Docker Desktop. OAuth-enabled MCP servers that do not support dynamic client registration, can be enabled as long as the user registers a custom MCP client (with both client id and client secret). Oauth flows can be triggered either by the docker mcp oauth authorize ... cli command or using dynamic mcps, which will write auth urls into the agent flow.

This allows users to use Oauth flows to enable MCP servers like the new ones from Google (as announced here https://cloud.google.com/blog/products/ai-machine-learning/announcing-official-mcp-support-for-google-services)

slimslenderslacks and others added 3 commits December 16, 2025 14:07
This commit adds support for manually registering OAuth client credentials
for MCP servers that don't support Dynamic Client Registration (DCR), along
with comprehensive documentation of OAuth flows in Docker CE mode.

Changes:
- Add 'docker mcp oauth register' command for manual client registration
  - Supports both confidential and public OAuth clients
  - Stores credentials securely in Docker credential helpers
  - Includes validation for URLs and required fields
- Add detailed OAuth CE mode documentation (572 lines)
  - Documents DCR flow, authorization, token storage, and refresh
  - Includes architecture diagrams, CLI examples, and troubleshooting
  - Provides file references with line numbers for code navigation
  - Covers security features (PKCE, token binding, credential helpers)
- Fix linting issues in OAuth command handlers
  - Add explicit error handling for MarkFlagRequired calls
  - Rename unused context parameter to underscore
  - Apply gofmt formatting to imports

The manual registration feature enables OAuth integration with providers
that don't support RFC 7591 DCR, expanding compatibility with a wider
range of OAuth providers.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
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.

2 participants