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/functions/v1/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)Link to this section
gemini mcp add --transport http \ --header "X-API-Key: fwl_YOUR_TOKEN_HERE" \ flyweel-mcp-server \ https://api.flyweel.co/functions/v1/mcp-server/mcpGemini writes this to ~/.gemini/settings.json automatically. Replace fwl_YOUR_TOKEN_HERE with your token from app.flyweel.co (Settings → API & MCP).
Scope flagLink to this section
-s user(default) writes to~/.gemini/settings.json(all projects)-s projectwrites to.gemini/settings.jsonin the current repo
Option B: Edit settings.json directlyLink to this section
Path: ~/.gemini/settings.json
Path: %USERPROFILE%\.gemini\settings.json
{ "mcpServers": { "flyweel-mcp-server": { "httpUrl": "https://api.flyweel.co/functions/v1/mcp-server/mcp", "headers": { "X-API-Key": "fwl_YOUR_TOKEN_HERE" }, "timeout": 30000, "description": "Flyweel MCP: Google, Meta, TikTok Ads plus Pipedrive CRM" } }}Test itLink to this section
/mcpThis lists configured servers. flyweel-mcp-server should appear with 8 tools.
Then ask:
What Google Ads accounts do I have connected to Flyweel?TroubleshootingLink to this section
”Server not found”Link to this section
Settings file is missing or malformed.
Fix: Run cat ~/.gemini/settings.json | jq .. It should parse cleanly.
401 unauthorizedLink to this section
API key is wrong or the header is missing.
Fix: Run gemini mcp list, then gemini mcp remove flyweel-mcp-server, then rerun Option A.