How to add MCP servers to Google Gemini CLI — the mcpServers block in ~/.gemini/settings.json, project-level config, and how to list connected servers.
Edit ~/.gemini/settings.json for all projects, or .gemini/settings.json in a repository for that project only. Create the file if it does not exist.
Add a named entry with "command", "args", and optional "env". Gemini CLI uses the same mcpServers shape as Claude Desktop and Cursor, so those configs paste in directly. You can also run "gemini mcp add".
Start a new Gemini CLI session and run the /mcp command to see each server, its connection status, and the tools it exposes.
settings.json~/.gemini/settings.json{
"mcpServers": {
"filesystem": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-filesystem", "/path/to/allowed/dir"],
"env": {}
}
}
}domain_check_v1 in a loop.