How to add an MCP server to Gemini CLI
This guide adds MCP servers to Gemini CLI, using Playwright MCP, Figma MCP Server and Firecrawl MCP Server from the catalog. Playwright MCP runs locally, Figma MCP Server is hosted and connects by URL, and Firecrawl MCP Server runs locally and can take an API key. The steps that add a server show a gemini mcp add command and a matching entry for ~/.gemini/settings.json. A final check uses gemini mcp list. Commands come from each listing's install data, and paths come from the Gemini CLI documentation.
Updated Oct 26, 2026 · Built from catalog data; how we rank and grade
Checked against Gemini CLI's documentation on Oct 26, 2026. Commands and config blocks are generated from the same install data as each listing page.
Before you start
- Gemini CLI installed and able to start.
- Node.js with npx for local servers that run through npx (check with node --version), or the runtime the server's listing names.
- An API key or account only for servers that need one; hosted servers that sign in with OAuth need an account with that service.
1. Choose a server and see what it needs
Gemini CLI keeps a server in the project by default, or for your user with
-s user. Decide which fits before you add anything.- Playwright MCP: runs locally, no key needed.
- Figma MCP Server: hosted, connect by URL, no key needed.
- Firecrawl MCP Server: runs locally, can take FIRECRAWL_API_KEY.
- Where Gemini CLI can keep a server: project (.gemini/settings.json, the default) and user (~/.gemini/settings.json with -s user).
2. Add a local server (Playwright MCP)
Playwright MCP runs locally. The command gives the server name, then
npxand its arguments after a double dash, and the settings entry holds the same command and args as separate keys.Add it for you in every project gemini mcp add --scope user playwright-mcp npx -- -y @playwright/mcp@0.0.82Or put this in ~/.gemini/settings.json (or .gemini/settings.json in a project) ~/.gemini/settings.json{ "mcpServers": { "playwright-mcp": { "command": "npx", "args": [ "-y", "@playwright/mcp@0.0.82" ] } } }3. Add a remote server (Figma MCP Server)
Figma MCP Server is hosted. The command passes
--transport httpwith the URL, while the settings entry uses the keyhttpUrl.Add it for you in every project gemini mcp add --scope user --transport http figma https://mcp.figma.com/mcpOr put this in ~/.gemini/settings.json (or .gemini/settings.json in a project) ~/.gemini/settings.json{ "mcpServers": { "figma": { "httpUrl": "https://mcp.figma.com/mcp" } } }- If the server uses OAuth, run /mcp auth inside Gemini CLI.
4. Keep API keys out of the file (Firecrawl MCP Server)
Firecrawl MCP Server can take FIRECRAWL_API_KEY. The command passes it with
-e, and the settings entry refers to$FIRECRAWL_API_KEY, which Gemini CLI resolves when it loads settings.Add it for you in every project gemini mcp add --scope user -e FIRECRAWL_API_KEY=YOUR_FIRECRAWL_API_KEY firecrawl-mcp-server npx -- -y firecrawl-mcp@3.34.1Or put this in ~/.gemini/settings.json (or .gemini/settings.json in a project) ~/.gemini/settings.json{ "mcpServers": { "firecrawl-mcp-server": { "command": "npx", "args": [ "-y", "firecrawl-mcp@3.34.1" ], "env": { "FIRECRAWL_API_KEY": "$FIRECRAWL_API_KEY" } } } }Set the variable in the shell you start the host from export FIRECRAWL_API_KEY="paste-your-value-here"- Values in settings.json resolve $VAR and ${VAR} from your shell or a .env file at load time, and an unset variable becomes an empty string. Variables whose names look like keys or tokens are removed from a server's inherited environment unless you list them in its env block.
- The command stores the value in settings.json. The file version refers to an environment variable, which Gemini CLI resolves when it loads settings; a variable that is not set becomes an empty string.
- FIRECRAWL_API_KEY (optional): Your API key for Firecrawl.
5. Restart or reload if the server does not appear
Use this step if the server does not appear. The notes cover starting a new session, trusting a folder with
gemini trust, and a notice in the Gemini CLI docs about Antigravity CLI.- The docs do not say whether a restart is needed after gemini mcp add. Discovery runs at startup, so start a new session to be safe.
- A stdio server shows DISCONNECTED in a folder you have not trusted; run gemini trust for that folder.
- Every page of the Gemini CLI docs carries a notice that, for unpaid-tier and Google One users, Gemini CLI was replaced by Antigravity CLI on June 18th, 2026.
Check that it works
Run gemini mcp list from the shell, or /mcp list inside a session. Each server shows as CONNECTED, CONNECTING or DISCONNECTED.
gemini mcp list- Run gemini mcp list from the shell, or /mcp list inside a session. Each server shows as CONNECTED, CONNECTING or DISCONNECTED.
Troubleshooting
- Server shows DISCONNECTED
- Check command, args and cwd, run the server command by hand, and confirm its dependencies are installed. Source
- A stdio server is DISCONNECTED in a folder you opened for the first time
- Trust the folder with gemini trust. Source
- Connection errors are not shown
- They are silent apart from a hint. Run /mcp list or gemini mcp list, or start with --debug. Source
- Connected but no tools
- Confirm the server registers tools and check its stderr output. Source
Security notes
- A local server runs with your user account's permissions and can do whatever you can on that machine; read what it does before you add it (MCP's security guidance says the same).
- A remote server receives what the agent sends it. Check who runs it and what the service does with your data.
- Values in settings.json resolve $VAR and ${VAR} from your shell or a .env file at load time, and an unset variable becomes an empty string. Variables whose names look like keys or tokens are removed from a server's inherited environment unless you list them in its env block.
- Agent Market does not grade security yet, so a listing page shows no security grade today; read the server's source and permissions yourself (see How we grade security).
Servers and skills in this guide
Next, browse the listings that name Gemini CLI as a supported host, or follow a guide for a specific tool.
- 1Playwright MCP
microsoftOfficial
Playwright Tools.
★ 38.6KLast active Oct 22, 2026Local (stdio)Claude Code, Codex, VS Code, Cursor +2
AFreshness: A–Security: not graded yet - 2Figma MCP Server
mcp.figma.comOfficial
The Figma MCP server brings Figma design context directly into your AI workflow.
★ 2.1KLast active Oct 20, 2026Remote (HTTP)Claude Code, VS Code, Cursor, Windsurf
AFreshness: A–Security: not graded yet - 3Firecrawl MCP Server
firecrawlOfficial
Firecrawl, the context API for AI agents: search, scrape, interact with the web, plus paper search.
★ 7.7KLast active Oct 23, 2026Local (stdio), Remote (HTTP)Claude Code, VS Code, Codex, Cursor +2
AFreshness: A–Security: not graded yet
Related
Sources
- MCP servers with Gemini CLI | Gemini CLI · fetched Oct 26, 2026
- Gemini CLI configuration | Gemini CLI · fetched Oct 26, 2026
Cite this page
How to add an MCP server to Gemini CLI. Agent Mart. https://agentmart.dev/guides/add-mcp-server-gemini-cli (last updated 2026-10-26)