Gemini CLI
Gemini CLI reads MCP servers from settings.json and can add them with gemini mcp add. It handles OAuth automatically when a server asks for it.
Setup
-
Run the command below (
-s usermakes it global), or edit~/.gemini/settings.json. -
Start
geminiand run/mcp auth linearto sign in. -
Run
/mcpinside Gemini CLI to list the server's tools.
gemini mcp add -s user -t http linear https://mcp.linear.app/mcp
{ "mcpServers": { "linear": { "httpUrl": "https://mcp.linear.app/mcp" } }}
Prefer read-only? Use https://mcp.linear.app/mcp/readonly.
-
Run the command below (
-s usermakes it global), or edit~/.gemini/settings.json. -
Run
/mcpinside Gemini CLI to confirm it's connected.
gemini mcp add -s user filesystem npx -y @modelcontextprotocol/server-filesystem /path/to/allowed/folder
{ "mcpServers": { "filesystem": { "command": "npx", "args": [ "-y", "@modelcontextprotocol/server-filesystem", "/path/to/allowed/folder" ] } }}
Replace the path. You can pass several folders, and the server can't access anything outside them.
Good to know
- Use
httpUrlfor Streamable HTTP servers.urlis for legacy SSE servers only. gemini mcp addwrites to the project by default. Add-s userto make a server available everywhere.- Run
/mcpto list servers and tools, and/mcp auth <name>to sign in. - Filter tools per server with
includeTools/excludeTools. Settrust: trueonly for servers you fully trust.
Config file:
~/.gemini/settings.json.gemini/settings.jsonWorks with 74 servers
- GitHub
- Context7
- Sentry
- Git
- SAP UI5
- SAP CAP
- Shopify Dev MCP
- Playwright
- Chrome DevTools
- Exa
- Brave Search
- Tavily
- Firecrawl
- Perplexity
- Fetch
- DeepWiki
- Microsoft Learn
- AWS Knowledge
- Hugging Face
- Supabase
- Neon
- MongoDB
- Vercel
- Cloudflare
- Kubernetes
- Terraform
- Grafana
- Docker MCP Gateway
- IONOS Cloud
- Notion
- Linear
- Atlassian Rovo
- Asana
- DeepL
- monday.com
- Airtable
- n8n
- Zapier
- Make
- Contentful
- Webflow
- WordPress.com
- WordPress MCP Adapter
- Sanity
- Wix
- Figma
- Canva
- HeyGen
- ElevenLabs
- Mux
- Cloudinary
- Runway
- Descript
- Kapwing
- VEED Fabric
- Shotstack
- Kinocut
- DaVinci Resolve
- Ahrefs
- Semrush
- Similarweb
- Klaviyo
- Google Analytics
- HubSpot
- Intercom
- Zendesk
- Stripe
- Shopware
- E-Rechnung
- PayPal
- Filesystem
- Memory
- Sequential Thinking
- Time