Gemini CLI supports remote MCP servers with OAuth viaDocumentation Index
Fetch the complete documentation index at: https://docs.pipeshub.com/llms.txt
Use this file to discover all available pages before exploring further.
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.
Authenticate
Inside Gemini CLI, use the/mcp auth commands:
~/.gemini/mcp-oauth-tokens.json and refreshed automatically.
Manage Servers
OAuth Configuration Properties
| Property | Required | Description |
|---|---|---|
clientId | Yes | OAuth 2.0 Client ID from PipesHub |
clientSecret | No | OAuth 2.0 Client Secret (for confidential clients) |
scopes | No | OAuth scopes to request |
authorizationUrl | No | Override authorization endpoint (auto-discovered by default) |
tokenUrl | No | Override token endpoint (auto-discovered by default) |
redirectUri | No | Override redirect URI (defaults to http://localhost:7777/oauth/callback) |


















