Let your users connect Gemini CLI to your app
Agent-ready apps: make the app you build with the SDK ready for Gemini CLI. Your users add your app's MCP server to Gemini CLI, sign in on your hosted page and approve it, and Gemini CLI acts as them, never as more.
How your users add your app to Gemini CLI
Give your users your app's MCP address. npx buildbase agent install --url <your MCP address> prints the setup for each AI tool, Gemini CLI included, with your address filled in.
- In Gemini CLI, your user adds a remote MCP server: gemini mcp add, or settings.json. They use your app's MCP address, https://app.example.com/api/mcp in these examples, or the command or config below.
- Sign in: run /mcp auth acme. Gemini CLI finds the sign-in from the server's first answer and opens a browser. It needs a browser on the same machine, so it does not sign in over SSH without port forwarding.
- Your hosted sign-in page opens. Your user signs in and approves the consent screen, which names Gemini CLI and what it asks for.
- Gemini CLI can now use your tools, as that user and with that user's permissions.
gemini mcp add --transport http acme https://app.example.com/api/mcp{
"mcpServers": {
"acme": {
"httpUrl": "https://app.example.com/api/mcp"
}
}
}The plan it needs
Gemini CLI's MCP page does not name a plan. Its documentation says Antigravity CLI replaced it on 18 June 2026 for unpaid and Google One users.
How sign-in looks in Gemini CLI
Gemini CLI finds the sign-in from the server's first answer and opens a browser. It needs a browser on the same machine, so it does not sign in over SSH without port forwarding.
What is different in Gemini CLI
- Gemini CLI runs on your user's own computer, so it reaches any address that computer can, including a development server while you test.
- Your server's built-in tools are read-only until you allow changes. includeTools and excludeTools choose the tools (excludeTools wins). trust: true skips every confirmation, so leave it off for a server that can change things.
If it does not work in Gemini CLI
- Gemini CLI cannot register or sign in
- Turn on Let agents register themselves, with a base client, in the console under Authentication, then Agent readiness. Gemini CLI registers its own client the first time it connects.
- Gemini CLI does not connect
- /mcp and gemini mcp list show each server's state; --debug opens the debug console. In settings.json, httpUrl is Streamable HTTP and url is the older SSE transport.
- Gemini CLI needs to sign in again
- Run /mcp auth <name>.
- Check your server the way Gemini CLI will
- Run npx buildbase agent doctor --url <your MCP address>. It walks the first contact a client makes (the sign-in challenge, the metadata, redirects, a stable tool list) and exits 1 when a check fails.
Frequently Asked Questions
Which Gemini CLI plan do your users need?
Gemini CLI's MCP page does not name a plan. Its documentation says Antigravity CLI replaced it on 18 June 2026 for unpaid and Google One users.
Does my MCP server need to be public for Gemini CLI?
No. Gemini CLI runs on your user's computer, so it reaches what that computer reaches. Your users still need an address they can open, and production should be public HTTPS.
Can Gemini CLI change data in my app?
Only through tools you allow, and only as the user who connected it. The built-in tools are read-only by default, and a tool that needs extra scopes is hidden until the user grants them.
Where next
- Agent-ready apps: every AI tool
- The Gemini CLI steps in the BuildBase docs
- Let your users connect Claude Code to your app
- Let your users connect Codex to your app
- Gemini CLI's own MCP documentation(opens in a new tab)
We read it on . When Gemini CLI changes a menu or a plan, its documentation wins.