Gemini CLI
Google's terminal CLI for Gemini supports remote MCP servers (HTTP) including OAuth
discovery. Configuration runs through ~/.gemini/settings.json.
Setup
-
In the inboxmcp portal under Integrations, copy your MCP URL.
-
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}}} -
Start Gemini CLI. On the first tool call against
inboxmcpthe CLI opens a browser for the inboxmcp login; after signing in, the token is stored in~/.gemini/mcp-oauth-tokens.jsonand 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.