---
title: VS Code MCP Setup Guide | Flyweel Docs
description: Connect Flyweel MCP to VS Code using native MCP support and OAuth, with no token to paste. Includes an API key fallback and troubleshooting steps.
url: "https://www.flyweel.co/docs/mcp/vscode"
type: static
generatedAt: "2026-10-08T05:30:40.217Z"
---

![Documentation hero background](https://astro-flyweel-docs.vercel.app/vision-hero.webp)
# VS Code

VS Code has native MCP support built in. The easiest way to connect Flyweel is with OAuth — no token to copy or paste. An API-key fallback is available if you prefer.

---

## Quick Setup (OAuth)[Link to this section](#quick-setup-oauth)

### Step 1: Install the server[Link to this section](#step-1-install-the-server)

 1. Go to [app.flyweel.co](https://app.flyweel.co)
 1. Click **Settings** → **API & MCP**
 1. Click the one-click **Install in VS Code** button

VS Code opens and prompts you to add the `flyweel-mcp-server` server.

Prefer to add it by hand? Open the Command Palette (`Cmd+Shift+P` / `Ctrl+Shift+P`), run **MCP: Add Server**, choose an HTTP server, and paste the server URL:

**

```
https://api.flyweel.co/functions/v1/mcp-server/mcp
```

---

### Step 2: Approve access[Link to this section](#step-2-approve-access)

VS Code opens a browser window to sign in to Flyweel and approve access. Once you approve, the connection is authorized automatically — there’s no token to manage.

---

### Step 3: Test It[Link to this section](#step-3-test-it)

Open the Chat view 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[Link to this section](#fallback-connect-with-an-api-key)

If OAuth isn’t an option, you can authenticate with an API key instead.
    Show API-key setup
**Step 1: Get your token**

 1. Go to [app.flyweel.co](https://app.flyweel.co)
 1. Click **Settings** → **API & MCP**
 1. Click **Advanced: use an API key instead**
 1. Click **Generate API key** (or **Create Token**) and copy it immediately

Your token looks like: `fwl_a1b2c3d4...`

You can only copy the key once. Toggle it off to deactivate it, or use the trash icon to delete it.

**Step 2: Configure `.vscode/mcp.json`**

Create `.vscode/mcp.json` in your workspace and add the Flyweel server. Note the top-level key is `servers` (not `mcpServers`):

**

```
{  "servers": {    "flyweel-mcp-server": {      "type": "http",      "url": "https://api.flyweel.co/functions/v1/mcp-server/mcp",      "headers": {        "Authorization": "Bearer fwl_YOUR_TOKEN_HERE"      }    }  }}
```

Replace `fwl_YOUR_TOKEN_HERE` with your actual token.

Prefer the `X-API-Key: fwl_…` header instead of `Authorization: Bearer fwl_…`? That works too, but the Bearer header is recommended.

**Step 3: Reload VS Code**

Press `Cmd+Shift+P` (Mac) or `Ctrl+Shift+P` (Windows/Linux), then type “Reload Window” and press Enter.

---

## Troubleshooting[Link to this section](#troubleshooting)

### ”Authentication Error”[Link to this section](#authentication-error)

Your OAuth session expired or your token is invalid or deleted.

**Fix:** Re-run the **Install in VS Code** flow to re-authorize, or generate a new API key at [app.flyweel.co](https://app.flyweel.co) → Settings → API & MCP.

### ”No accounts found”[Link to this section](#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.

### VS Code doesn’t see Flyweel[Link to this section](#vs-code-doesnt-see-flyweel)

The server isn’t loading correctly.

**Fix:**

 1. Verify `.vscode/mcp.json` is in your workspace and uses the top-level `servers` key (not `mcpServers`)
 1. Check JSON syntax at [jsonlint.com](https://jsonlint.com)
 1. Confirm the URL is exactly: `https://api.flyweel.co/functions/v1/mcp-server/mcp`
 1. Reload the VS Code window

---

## Next Steps[Link to this section](#next-steps)

 - [What can you ask?](/docs/mcp/setup#what-can-you-ask)
 - [Technical reference](/docs/mcp/setup#technical-reference)
 - [Request a feature](/docs/mcp/setup#request-a-feature)

### Ready to get started?

Start optimizing your ad spend today with Flyweel.
  [Start Free](https://signup.flyweel.co/?variant=control)