Skip to main content

Gemini CLI

Google's terminal CLI for Gemini supports remote MCP servers (HTTP) including OAuth discovery. Configuration runs through ~/.gemini/settings.json.

Setup

  1. In the inboxmcp portal under Integrations, copy your MCP URL.

  2. Open ~/.gemini/settings.json (or create it if it doesn't exist yet) and add this block:

    {
    "mcpServers": {
    "inboxmcp": {
    "httpUrl": "https://mcp.inboxmcp.io/mcp",
    "authProviderType": "dynamic_discovery",
    "timeout": 30000
    }
    }
    }
  3. Start Gemini CLI. On the first tool call against inboxmcp the CLI opens a browser for the inboxmcp login; after signing in, the token is stored in ~/.gemini/mcp-oauth-tokens.json and refreshed automatically.

Use the tools

Reference the MCP server in your prompt with an @ mention:

> @inboxmcp Show me the last 10 mails from INBOX.

Disconnect

Remove the token file:

rm ~/.gemini/mcp-oauth-tokens.json

Or delete the inboxmcp block from settings.json.