Skip to content
Documentation hero background

Claude Code CLI Setup & Usage

Claude Code is Anthropic’s command-line AI tool. It has native MCP support with OAuth built-in.


Quick Setup (OAuth)

The fastest way to connect. No API key needed — you sign in to Flyweel in your browser and approve access.

Step 1: Add the Server

Run:

Terminal window
claude mcp add --transport http flyweel-mcp-server https://api.flyweel.co/functions/v1/mcp-server/mcp

This opens your browser to sign in to Flyweel and approve access. Once approved, you’re connected.

Step 2: Test It

Run Claude Code and ask:

What Google Ads accounts do I have connected to Flyweel?

If you see your accounts, you’re connected.


Fallback: Connect with an API Key

Only needed if OAuth isn’t available for you. Instead of signing in through the browser, you pass an API key as a header.

Show API-key setup

Step 1: Get your token

  1. Go to app.flyweel.co
  2. Click SettingsAPI & MCP
  3. Under Advanced: use an API key instead, click Generate API key (or Create Token to name your own)
  4. Copy it immediately — it won’t be shown again

Your token looks like: fwl_a1b2c3d4...

Managing tokens

Toggle a key off to deactivate it, or use the trash icon to delete it.

Step 2: Add the server with a header

Run the same command with an Authorization header:

Terminal window
claude mcp add --transport http flyweel-mcp-server https://api.flyweel.co/functions/v1/mcp-server/mcp --header "Authorization: Bearer fwl_YOUR_TOKEN_HERE"

Replace fwl_YOUR_TOKEN_HERE with your actual token. This writes the server to your Claude Code config at ~/.claude.json.

Header alternative

Authorization: Bearer fwl_… is preferred. If your client only accepts a custom header, use X-API-Key: fwl_… instead.


Troubleshooting

”Authentication Error”

Your token is invalid or deleted.

Fix: Generate a new token at app.flyweel.co → Settings → API & MCP, and re-add the server. Or reconnect via OAuth by re-running the claude mcp add command without the header.

”No accounts found”

You haven’t connected ad accounts to Flyweel.

Fix: Go to Settings → Connections in Flyweel and connect your Google Ads or Meta Ads.

Claude Code doesn’t see Flyweel

The server wasn’t added correctly.

Fix:

  1. Run claude mcp list to confirm flyweel-mcp-server is listed
  2. If it’s missing, re-run the claude mcp add command above
  3. Verify the config at ~/.claude.json if you edited it by hand
  4. Restart Claude Code completely

Next Steps

Ready to get started?

Start optimizing your ad spend today with Flyweel.