Add a remote HTTP or SSE MCP server
mcp & extensions
// what it does
For a hosted MCP server, pass --transport http (or sse) and the endpoint URL instead of a command. Add authentication with -H to set an HTTP header. In settings.json these become the httpUrl or url fields under mcpServers, with an optional headers object.
// shell
$ gemini mcp add --transport http docs https://api.example.com/mcp$ gemini mcp add --transport http -H "Authorization: Bearer token" api https://api.example.com/mcp// gotcha
http and sse are different transports — using the wrong one for the endpoint yields a connection that silently never delivers tools. A remote server can run arbitrary tools against your session, so only add endpoints you trust, and prefer includeTools to whitelist rather than trusting everything.