dynamic_discovery (the default), which auto-discovers authorization and token endpoints from PipesHub’s /.well-known/oauth-protected-resource/mcp.
Before you start, create an OAuth app in PipesHub and note your Client ID and Client Secret. See MCP Server Overview.
Option A: Settings File
Edit~/.gemini/settings.json:
Adjust the
scopes list to match what your OAuth app was granted. If you only need a subset of tools, you can limit the scopes accordingly.Option B: CLI Command
~/.gemini/settings.json to add the oauth block as shown above. Gemini CLI reads httpUrl as a Streamable HTTP endpoint; a plain url key is treated as a Server-Sent Events endpoint and will not connect to /mcp.
Authenticate
Inside Gemini CLI, use the/mcp auth commands:
~/.gemini/mcp-oauth-tokens.json and refreshed automatically.
Manage Servers
OAuth Configuration Properties
Because the default port changes on each run, set
redirectUri to a fixed value such as http://localhost:7777/oauth/callback and register that same URI in your PipesHub OAuth app. Otherwise PipesHub rejects the login with a redirect URI mismatch.