Skip to main content
Gemini CLI supports remote Streamable HTTP MCP servers with OAuth. Its default 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.
For coding-agent access and the approved MCP setup, contact Novaplan Support.

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.
Register the exact 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

Then edit ~/.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:
On first connection, Gemini will automatically detect the 401 response, discover the OAuth endpoints, and open a browser for login. Tokens are stored securely in ~/.gemini/mcp-oauth-tokens.json and refreshed automatically.

Manage Servers

OAuth Configuration Properties

Current Gemini CLI validates the OAuth callback’s iss (issuer) parameter when an issuer is discovered. If sign-in fails with Missing issuer parameter in response, contact Novaplan AI support. Do not disable issuer validation. Compatibility must be confirmed against the deployed Enterprise OAuth server.
OAuth requires a local browser. It will not work in headless environments, remote SSH without X11 forwarding, or containers without browser access.