dynamic_discovery mode discovers authorization and token endpoints from Novaplan AI’s metadata.
Before you start, ask Novaplan Support to confirm the approved OAuth app, Client ID, and Client Secret for your workspace.
Option A: Settings File
Edit~/.gemini/settings.json:
httpUrl selects Streamable HTTP. The url key selects SSE in Gemini CLI and is not correct for Novaplan AI’s /mcp endpoint. Adjust the scopes list to the tools and permissions approved for your OAuth app. Set NOVAPLAN_CLIENT_SECRET in your protected local environment before starting Gemini CLI; Gemini expands $NOVAPLAN_CLIENT_SECRET when it reads the settings file. Keep the actual secret out of shared or committed files.http://localhost:7777/oauth/callback URI in your Novaplan OAuth app. Gemini CLI otherwise chooses a random local callback port, which cannot be pre-registered reliably; the explicit redirectUri above fixes it to port 7777.
Option B: CLI Command
~/.gemini/settings.json to add the oauth block as shown above. --scope user makes the CLI command write to that user settings file; the CLI otherwise defaults to project scope.
Authenticate
Inside Gemini CLI, use the/mcp auth commands:
~/.gemini/mcp-oauth-tokens.json and refreshed automatically.