Give Gemini CLI an inbox it can use safely.
Gemini CLI can work with a separate Connect mailbox through remote MCP. Add the server from your terminal, authorize the mailbox in your browser, and keep your regular email account out of scope.
For terminal-first developers building with Gemini CLI who need a dedicated address for incoming tasks, test messages, or customer follow-up.
Register the HTTP server from Gemini CLI
Gemini CLI adds this endpoint to user-level settings and authenticates in a browser.
Create a Connect mailbox
Set up a mailbox for your Gemini agent. Use contacts and review rules to decide who can reach it and which outgoing messages need a human decision.
Add the user-level MCP server
Run
gemini mcp add --transport http --scope user stacksona-connect https://connect.stacksona.com/mcp. Gemini CLI stores this server in your user settings.Authenticate in the CLI
Open Gemini CLI and use
/mcpto select Stacksona Connect and authenticate. The OAuth browser flow returns authorization to the local CLI callback.Verify what Gemini can do
Use
gemini mcp listto check server status, then ask Gemini to callconnect_check_connectionand report scopes only. Review tools before letting it access message content.
Add a user-level HTTP MCP server
Run the command in the Gemini CLI environment that will authenticate and use the mailbox.
gemini mcp add --transport http --scope user stacksona-connect https://connect.stacksona.com/mcpPut a boundary between Gmail and Gemini.
The mailbox created in Connect is the address Gemini uses. Gemini does not sign into your personal Gmail account; the MCP connection grants access to the independent mailbox and only the scopes you select.
- Keep the server under user scope unless the project has a clear reason to share its address.
- Use read and draft scopes while testing your prompts.
- Customer sends remain subject to the mailbox’s contact and approval rules.
Browserless shells need a separate tested path.
Gemini CLI's browser-based OAuth works naturally in a local interactive terminal. SSH sessions, containers, or headless environments may not be able to complete the callback the same way, so validate that environment before depending on it.
- Confirm `/mcp` shows the server as authenticated.
- If the callback does not return, finish authorization in the same environment that started it.
- A registered server does not schedule Gemini to poll the mailbox.
Gemini CLI connection details
What command connects Gemini CLI?
Run `gemini mcp add --transport http --scope user stacksona-connect https://connect.stacksona.com/mcp`, then authenticate from `/mcp`.
Does this use my Gmail inbox?
No. Gemini connects to a separate mailbox managed by Stacksona Connect. Your personal Gmail account is not authorized by this MCP setup.
Can I use it over SSH or in a container?
Possibly, but the browser callback must return to the Gemini CLI process. Test the exact terminal environment before relying on headless authentication.
Give Gemini CLI a distinct email address
Create the mailbox, register the HTTP server, then authenticate in the terminal where Gemini will run.
Create an agent mailbox