Gemini CLI is Google's open-source AI agent for the terminal, powered by the Gemini model family. It reads MCP server configuration from ~/.gemini/settings.json using the standard mcpServers root key and the same field names as Claude Desktop, making it one of the most straightforward apps to configure. Servers declared in the config are available to Gemini CLI as tools it can invoke during multi-step agentic tasks — reading files, querying APIs, running searches, and more. Because the format is a near-passthrough of the canonical schema, configs can be copied directly from Claude Desktop with minimal or no changes. The getmcp CLI detects Gemini CLI automatically by checking for the ~/.gemini directory and merges server entries without touching your existing settings.
Quick Install with getmcp
The fastest way to install MCP servers in Gemini CLI is with the getmcp CLI:
npx @getmcp/cli add <server-id>
Configuration Format
Format
JSON
Root Key
mcpServers
Global Config (macOS / Linux)
~/.gemini/settings.json
Global Config (Windows)
%UserProfile%\.gemini\settings.json
Prerequisites
•Gemini CLI installed (see github.com/google-gemini/gemini-cli for installation instructions)
•A Google account with Gemini API access or an API key
•Node.js 18 or higher for running npx-based servers
•Python 3.10+ if installing Python-based servers
Popular Servers for Gemini CLI
Troubleshooting
▸Config file not found: Gemini CLI creates ~/.gemini/settings.json on first run. Launch gemini at least once before adding MCP servers.
▸Server not available after editing the config: Gemini CLI reads settings.json at startup. Restart the CLI session after any config change.
▸API key errors when running a server: The env block in the server config sets environment variables for the server process. Ensure the required API key is spelled correctly and is a non-empty string.
▸Tool calls returning errors: Run Gemini CLI with the --debug flag to see detailed logs of MCP server communication and identify where the failure occurs.