More articles 11 min read

VS Code MCP server: connect Apogee to GitHub Copilot for ads

VS Code MCP setup: add Apogee to GitHub Copilot agent mode with MCP: Add Server, then launch and run your Meta, TikTok and Snapchat ads from the editor.

Mathieu Malige Founder, Apogee Published
Contents
  1. Before you start
  2. VS Code MCP server setup: add Apogee
  3. Check the connection
  4. What to ask Copilot next: the media buyer’s job
  5. Limits and safety
  6. Common problems
  7. Going further

VS Code MCP runs through GitHub Copilot: in agent mode, Copilot picks up Apogee’s tools and becomes a media buyer inside your editor. It reads your Meta, TikTok and Snapchat accounts, launches the creatives of a folder on your computer, sends your Meta winners to TikTok and Snapchat and prepares the morning recap. It prepares, you approve. Two requirements: an Apogee plan that includes the MCP server, from Pro up, and, on Copilot Business or Enterprise, the MCP policy turned on by an admin.

Copilot in agent mode in VS Code uses Apogee to launch a local folder of creatives on Meta: files uploaded, recap and yes
A folder on your computer, one recap, one yes: Apogee creates the ads paused.

Before you start

SideWhat you need
VS CodeGitHub Copilot, used in Agent mode
Copilot Free, Pro, Pro+, MaxNothing to turn on
Copilot Business, EnterpriseAn admin turns on the MCP servers in Copilot policy, off by default
ApogeeA plan that includes the MCP server: Pro, Growth or Scale, 7-day trial for €1; Starter does not have it
Sign-inApogee’s consent page (OAuth); an API key as an option
Ad accountsYour Meta, TikTok or Snapchat accounts, already connected to Apogee

The MCP servers in Copilot policy is described in GitHub’s docs on MCP in Copilot. Apogee’s server speaks HTTP (the MCP protocol’s “Streamable HTTP” transport): that is why you pick HTTP when you add it. To compare Apogee with the other MCP servers that run Meta Ads, see our guide to Meta Ads MCP servers.

VS Code MCP server setup: add Apogee

  1. Open VS Code’s Command Palette and run MCP: Add Server.
  2. Choose HTTP (labeled “HTTP (HTTP or Server-Sent Events)” in recent versions).
  3. Paste https://app.apogee.ad/mcp.
  4. Name the server apogee.
  5. If VS Code asks where to save it, the global destination keeps it for all your projects.
  6. Trust the server when VS Code asks.
  7. On the first connection a browser window opens: log in to Apogee, check the access and click Authorize.
  8. Open Copilot Chat, switch to Agent mode and ask.
Apogee's MCP settings with VS Code selected among the coding tools: the server URL to copy and the three steps
The same steps show in Apogee, with a Copy button for the server URL.

Writing the configuration by hand

Apogee’s guide also gives this configuration for .vscode/mcp.json:

{
  "servers": {
    "apogee": {
      "type": "http",
      "url": "https://app.apogee.ad/mcp"
    }
  }
}

The file holds no secret: the sign-in always goes through Apogee’s page. If it ends up in a shared Git repository, each person signs in with their own Apogee account. According to VS Code’s documentation, read on November 3, 2026, the guided flow now offers a global Copilot configuration and keeps .vscode/mcp.json for compatibility.

With an Apogee API key

OAuth is enough in most cases. For a key, create it under Settings → API, ticking only the scopes you need (Read, Launch, Actions), then declare it like this:

{
  "inputs": [
    {
      "type": "promptString",
      "id": "apogee-key",
      "description": "Apogee API key",
      "password": true
    }
  ],
  "servers": {
    "apogee": {
      "type": "http",
      "url": "https://app.apogee.ad/mcp",
      "headers": {
        "Authorization": "Bearer ${input:apogee-key}"
      }
    }
  }
}

VS Code asks for the apk_… key once, masks it as you type and stores it: it is never written in the file. Apogee shows the key only once, when you create it, and every key has an expiry.

When VS Code opens the browser, the page reads “VS Code wants to access your Apogee account”, with the name the app declares, “Visual Studio Code”, and the Apogee account in use (Switch to change it).

AccessWhat it allowsFor which task
ReadRead your accounts, campaigns, ads and statsThe morning recap, the weekly review
LaunchImport creatives, prepare and launch adsLaunches, the Bridge
ManagePauses, budgets, targeting, duplicatesCutting an ad, adjusting a budget

Untick whatever Copilot doesn’t need, keeping at least one. The page reminds you that nothing is launched or changed without your yes in the conversation, then offers Cancel or Authorize, with the return to vscode.dev.

Apogee consent page where VS Code asks for access, with the Read, Launch and Manage toggles and the Authorize button
Untick an access to refuse it to VS Code; one is enough to connect.

Check the connection

In Agent mode, a first request with no risk:

Prompt to copy
Using Apogee, tell me which Apogee account you are connected to and with what access, then list my Meta, TikTok and Snapchat ad accounts with their currency. Don’t change anything.

Copilot calls whoami, then list_ad_accounts: two reads. Expand the tool call in the conversation to check it came from the apogee server. Approve only the tool requests you understand.

In Apogee, Settings → MCP then lists VS Code under Connected assistants, with its access (Manage becomes Actions there), its connection date and its last use.

Apogee's Connected assistants list with VS Code connected, its Read, Launch and Actions access and a Disconnect button
Each connected assistant has its own row: you see when it was last used.

What to ask Copilot next: the media buyer’s job

In agent mode, Copilot runs commands on your computer: it reads the folder your video editor drops the exports into and uploads it to Apogee itself, which chat apps on the web cannot do.

Launch a folder from your computer on Meta Ads

Prompt to copy
Take every creative in [folder] on my computer and launch them in a NEW ad set in my [testing campaign] campaign of [ad account]. Reuse the settings of the latest ad set and the latest ad launched in that campaign. Create everything paused, and show me the full recap before you create anything.
  1. The account: list_ad_accounts, and the account question if you have several.
  2. The starting point: get_latest_in_campaign picks up the latest ad set (audience, event, bid, budget) and the latest ad (Page, Instagram, URL, call to action, texts).
  3. The upload: get_upload_urls gives one signed URL per file, Copilot uploads each file with an HTTP PUT, then confirm_uploads checks it arrived and is not empty. Nothing has gone to Meta.
  4. The ads: get_launch_questions reads your file names with your naming convention; the 9:16, 4:5 and 1:1 versions of a creative make one ad. Copilot asks the questions one topic at a time.
  5. The recap, then the launch: prepare_launch creates nothing. After your yes, launch, then launch_status until it is done.

Uploads go in batches of 50 files, 500 MB per file at most, each URL valid for one hour. Per day, an Apogee account takes up to 2,000 files and 100 GB on Pro, twice that on Growth and Scale.

The same folder on TikTok Ads and Snapchat Ads

Copilot follows the same flow on the platform you name: an ad group on TikTok, where an image runs as a carousel, or an ad squad on Snapchat. With a template saved in the app (Quick Bulk Edit, then Save as template):

Prompt to copy
Launch the videos in [folder] on Snapchat ([Snapchat ad account]) in a NEW ad squad of my [campaign] campaign, with my saved template [template]. Create everything paused, and show me the full recap before you create anything.

Without a template, Copilot asks each platform’s questions: the identity and Smart+ on TikTok; the public profile, the pixel and the countries on Snapchat. Each platform has its own recap, budget and currency, and waits for its own yes.

Send Meta winners to TikTok and Snapchat

Apogee’s Bridge creates paused copies of your best Meta ads, without touching the originals:

Prompt to copy
Send my 10 best Meta ads of the last 7 days from [Meta ad account] to TikTok ([TikTok ad account]) and Snapchat ([Snapchat ad account]), in a new ad group and a new ad squad of my testing campaigns. Skip the ones already sent. Create everything paused, and show me the full recap before you create anything.
Copilot in VS Code sends the top 10 Meta ads to TikTok and Snapchat with Apogee's Bridge, after the recap and the yes
The Meta top 10 heads to TikTok and Snapchat, paused; the original ads stay intact.

Expand the tool calls to follow the transfer: get_top_performers picks the ads, list_bridge_transfers removes those already sent, prepare_bridge_transfer returns the recap, and bridge_transfer waits for your yes. On the first transfer, Copilot asks for the TikTok identity and the call to action, which Meta lacks. An image ad stays on Meta: only videos go through.

The morning recap

Prompt to copy
Give me yesterday’s recap on Meta ([Meta ad account]), TikTok ([TikTok ad account]) and Snapchat ([Snapchat ad account]), each platform on its own: spend, CPA, ROAS, and the 3 best and 3 worst ads. Flag any platform whose CPA is more than [threshold]% above its 7-day average. Never add the platforms together and don’t change anything.
The morning recap asked of Copilot in VS Code with Apogee: Meta, TikTok and Snapchat, each with its own spend, ROAS and winners
Each platform keeps its currency and attribution: Apogee never adds up Meta, TikTok and Snapchat.

Copilot reads Meta with get_account_overview and get_top_performers, TikTok and Snapchat with get_platform_overview and get_platform_top_performers; these reads stay free within your plan’s daily limit (5,000 a day on Pro). The numbers come from Apogee’s cross-platform stats.

Cut the ads that are fatiguing

Prompt to copy
Find the ads in [ad account] that spent more than [multiple] times my target CPA without a purchase over the last [days] days, on Meta and TikTok, and the ones that are fatiguing (frequency going up, CTR going down). Prepare their pause, send me the list (name, platform, spend, why) and wait for my yes before you do it.

Copilot reads get_creative_fatigue_metrics and the results, then prepares the pauses: pause_ad on Meta, set_platform_status on TikTok. Your yes triggers execute_action. This needs the Manage access; each change that runs uses 2 credits, and each ad created 15, only when it succeeds.

Limits and safety

On Copilot’s side. On Business and Enterprise, nothing works while the MCP servers in Copilot policy is off. VS Code puts the server’s startup, the sign-in and tool calls in front of you: never approve launch, execute_action or bridge_transfer on autopilot.

On Apogee’s side, whatever VS Code’s settings:

GuardrailValue
Before any launch or changeA full recap and your yes
Status of created adsPaused by default
Prepared planValid 24 hours, runs only once
Daily budgetRefused above the cap, 500 in the account’s currency by default
Launches and Bridge transfers25 per ad account over 24 hours

Through Apogee, two things stay out of Copilot’s reach: creating a catalog or an audience, and adding up Meta, TikTok and Snapchat. To cut access: Settings → MCP, Disconnect next to VS Code; with a key, Revoke under Settings → API, API keys list. Then remove the apogee entry from your VS Code configuration. Ads already launched stay in place.

Common problems

  • The server does not show up in Copilot Business or Enterprise: the MCP servers in Copilot policy is off by default. Ask your admin to turn it on.
  • Apogee’s tools don’t answer: check that you trusted the server and that Copilot Chat is in Agent mode.
  • 401: the sign-in did not complete, or the key is unknown, revoked or expired; Apogee answers the same 401 in every case. Restart the sign-in from VS Code, or regenerate the key.
  • 403 upgrade_required: your Apogee plan does not include the MCP server (Starter). Move to Pro, Growth or Scale.
  • 403 insufficient_scope, or a tool is missing: the access was unticked on the consent page. Disconnect VS Code in Apogee, then restart the sign-in from VS Code and tick the access you need.
  • Expired connection: the OAuth connection relies on a one-hour token, renewed by a token valid 60 days. If Apogee still refuses, restart the sign-in from VS Code.
  • 402 credits_exhausted: this month’s credits are used. Reads keep working; the rest resumes on the 1st of the month or with a credit pack.

Going further

The feature Cross-platform stats One creative's performance on each platform, summed then expanded. See the feature

Frequently asked questions

How do I add an MCP server in VS Code?

Run MCP: Add Server from the Command Palette, choose HTTP, paste the server URL and give it a name. For Apogee: https://app.apogee.ad/mcp and the name apogee. VS Code asks you to trust the server, then opens Apogee's sign-in page.

Does GitHub Copilot support MCP servers on Business plans?

Yes, once an admin turns on the MCP servers in Copilot policy, which is off by default on Copilot Business and Enterprise. On Copilot Free, Pro, Pro+ and Max, that policy does not apply: there is nothing to turn on.

Do I need an API key to connect Apogee to VS Code?

No. VS Code signs in through Apogee's sign-in page, with OAuth. An API key still works: created under Settings → API, it goes into .vscode/mcp.json, and VS Code asks for it once before storing it.

Can GitHub Copilot launch Facebook ads without my approval?

No. Copilot goes through Apogee, which prepares the launch, shows a full recap and only runs it after your yes in the conversation. Ads are created paused by default, and a prepared plan runs only once, within 24 hours.

Why doesn't Copilot see Apogee's tools?

Three common causes: Copilot Chat is not in agent mode, the server was not trusted, or the MCP servers in Copilot policy is off on your Business or Enterprise plan. Check all three, then ask again.

How do I disconnect VS Code from Apogee?

In Apogee, open Settings → MCP, then click Disconnect next to VS Code in the Connected assistants list: access stops at once. If you used an API key, revoke it under Settings → API, API keys list.

Book a demo

Pick the time that suits you.

Open in a new tab

Loading the calendar…

Talk to Founder