> mcp & extensions

The Model Context Protocol (MCP) lets Gemini CLI call external tools — from a local process over stdio or a hosted server over HTTP/SSE. Extensions package MCP servers together with custom commands and context into one installable unit. Both expand what the agent can do, and both are trust decisions because they can run arbitrary code.

// mcp & extensions

5 commands

// faq

How do I add an MCP server to Gemini CLI?

Run gemini mcp add <name> <command> [args...] for a local stdio server, or gemini mcp add --transport http <name> <url> for a remote one. Add -e KEY=value for env vars and -H for HTTP headers. This writes to settings.json under mcpServers; confirm the connection with /mcp.

Why don't my MCP server's tools show up?

Being configured is not the same as connected. Run /mcp to check the server's status and /tools to see what registered. A failed command or wrong transport (http vs sse) yields a server that connects but exposes nothing; fix the config or remove it with gemini mcp remove <name>.

What does the trust option on an MCP server do?

Setting trust: true in a server's mcpServers config auto-approves all of its tool calls with no confirmation prompt. It removes the safety net for destructive actions, so reserve it for servers you control. To limit surface instead, use includeTools to whitelist specific tools.

How do I install a Gemini CLI extension?

Run gemini extensions install with a GitHub URL or a local path; it installs under ~/.gemini/extensions/<name>/. Update with gemini extensions update --all and toggle with enable/disable and --scope=workspace. Since an extension can register MCP servers that run code, review its gemini-extension.json before installing.