oauth command group handles authentication against MCP servers that require OAuth. Use oauth login to obtain tokens interactively, and the proxy/metadata commands to debug discovery and endpoint behavior.
Quick start
--oauth-access-token or --access-token.
Commands
oauth login
Runs a full OAuth flow: discovery, registration, authorization, token exchange. Supports all three registration strategies and auth modes.
--debug-out <path> flag captures a structured debug artifact with full HTTP traces — useful for filing bug reports or handing off to another engineer.
oauth metadata
Fetch and display OAuth metadata from a URL. Useful for verifying your server’s discovery endpoints are correct.
oauth proxy
Send an arbitrary HTTP request through the OAuth proxy with hosted-mode safety checks. Useful for testing individual OAuth endpoints (registration, token, etc.) without building raw HTTP requests.
oauth debug-proxy
Same as oauth proxy but routes through the debug proxy path. Use when testing endpoints that behave differently for debug vs. production requests.
Login flags
| Flag | Required | Default | Description |
|---|---|---|---|
--url <url> | Yes | MCP server URL | |
--protocol-version <v> | Yes | 2025-03-26, 2025-06-18, or 2025-11-25 | |
--registration <s> | Yes | cimd, dcr, or preregistered | |
--auth-mode <m> | No | interactive | headless, interactive, or client_credentials |
--client-id <id> | No | OAuth client ID (required for preregistered) | |
--client-secret <s> | No | OAuth client secret | |
--client-metadata-url <url> | No | CIMD metadata document URL | |
--redirect-url <url> | No | Auto-generated | OAuth redirect URL |
--scopes <scopes> | No | Space-separated scope string | |
--header <header> | No | HTTP header Key: Value (repeatable) | |
--step-timeout <ms> | No | 30000 | Per-step timeout |
--verify-tools | No | After login, connect and list tools | |
--verify-call-tool <name> | No | After listing, also call a named tool | |
--debug-out <path> | No | Write debug artifact to file |
For interactive login, a custom
--redirect-url must still be an
http://localhost or http://127.0.0.1 loopback URL. Custom callback paths
are supported.Using tokens from login
After a successfuloauth login, use the printed access token with other commands:

