MCPCloud.sh — Product and API reference
All clients

Connect Gemini CLI

The Gemini CLI reads MCP servers from `~/.gemini/settings.json`. Use the `httpUrl` field to point it at your streamable HTTP endpoint.

TransportStreamable HTTPConfig~/.gemini/settings.json

How do I connect an MCP server to Gemini CLI?

Add an `mcpServers` entry whose `httpUrl` field points at your server to `~/.gemini/settings.json`, then restart the CLI and confirm with the `/mcp` command. The `httpUrl` key (not `url`) is what selects the streamable HTTP transport.

Setup

  1. Open `~/.gemini/settings.json` (create it if it does not exist).
  2. Add the `mcpServers` block below with your deployment URL.
  3. Restart the Gemini CLI.
~/.gemini/settings.jsonjson
{
  "mcpServers": {
    "my-server": {
      "httpUrl": "https://my-server.mcp.cloud/mcp"
    }
  }
}

Verify the connection

Run `/mcp` inside the Gemini CLI and confirm your server is listed.

Troubleshooting

Server not detected.

Use `httpUrl` (not `url`) for streamable HTTP servers in the Gemini CLI.

Gemini CLI MCP documentation

Connect another client