To connect Flyweel MCP to Gemini CLI (Google’s terminal AI agent), add an entry to ~/.gemini/settings.json under mcpServers with httpUrl set to https://api.flyweel.co/mcp-server/mcp and an X-API-Key header. Gemini CLI supports remote HTTP MCP servers natively, so no shim is required.
Option A: One command (recommended)
gemini mcp add --transport http \ --header "X-API-Key: fwl_YOUR_TOKEN_HERE" \ flyweel \ https://api.flyweel.co/mcp-server/mcpGemini writes this to ~/.gemini/settings.json automatically. Replace fwl_YOUR_TOKEN_HERE with your token from app.flyweel.co (Settings, then API Tokens).
Scope flag
-s user(default) writes to~/.gemini/settings.json(all projects)-s projectwrites to.gemini/settings.jsonin the current repo
Option B: Edit settings.json directly
Path: ~/.gemini/settings.json
Path: %USERPROFILE%\.gemini\settings.json
{ "mcpServers": { "flyweel": { "httpUrl": "https://api.flyweel.co/mcp-server/mcp", "headers": { "X-API-Key": "fwl_YOUR_TOKEN_HERE" }, "timeout": 30000, "description": "Flyweel MCP: Google, Meta, TikTok Ads plus Pipedrive CRM" } }}Test it
/mcpThis lists configured servers. flyweel should appear with 8 tools.
Then ask:
What Google Ads accounts do I have connected to Flyweel?Troubleshooting
”Server not found”
Settings file is missing or malformed.
Fix: Run cat ~/.gemini/settings.json | jq .. It should parse cleanly.
401 unauthorized
API key is wrong or the header is missing.
Fix: Run gemini mcp list, then gemini mcp remove flyweel, then rerun Option A.