How to connect VS Code to Meta Ads

Connect Meta Ads once in Ryze AI, add one MCP URL to VS Code, then ask GitHub Copilot Chat about Facebook and Instagram spend, ROAS and creatives.

Your MCP URL
https://connector.get-ryze.ai/mcp

Copies the link. In VS Code run Chat: Open Customizations, MCP Servers, Add Server, HTTP. See the steps

See pricing

By Ira Bodnar, Ryze AI · Updated

Quick answer

To connect VS Code to Meta Ads, connect Meta Ads in a Ryze AI workspace by signing in to Meta and approving every requested permission. Then in VS Code run Chat: Open Customizations, select MCP Servers, add an HTTP server with https://connector.get-ryze.ai/mcp and the server ID ryze, trust it and complete the Ryze AI sign-in.

  1. In Ryze AI open Integrations, find Meta Ads under Advertising and click Connect
  2. Sign in to Meta and approve access with every requested permission checked
  3. In VS Code run Chat: Open Customizations, select MCP Servers and add an HTTP server with the connector URL
  4. Trust the server, sign in to Ryze AI, allow the workspace and ask your first question in Copilot Chat

Before you start

  • GitHub Copilot and VS Code 1.99 or later. GitHub's docs say MCP in Copilot Chat needs access to Copilot and VS Code 1.99 or later. Copilot Free, Pro, Pro+ and Max are not governed by the organization MCP policy.
  • The MCP policy, if Copilot comes from an organization. For members of an organization or enterprise on Copilot Business or Copilot Enterprise, the MCP servers in Copilot policy must be enabled. It is disabled by default, so ask an administrator to turn it on.
  • A Meta login with access to an ad account. You need a Meta Business account with an ad account and at least Advertiser access on it, and Admin access to allow changes. Access granted through Meta Business Manager works best.
  • A Ryze AI workspace on a plan or free trial. Paid Ads is $89 per month with a 7-day free trial; Agency is $279 per month. Connecting the connector is free, but the Meta Ads tools need an active plan or trial.

How to connect VS Code to Meta Ads

Two steps happen in Ryze AI and Meta, four in VS Code. The connector URL is the same for every user.

  1. Connect Meta Ads in Ryze AI

    Create a Ryze AI account or sign in. Open Integrations in the left sidebar and find Meta Ads under Advertising. Click Connect, sign in to Meta and approve access with every requested permission checked.

  2. Check the connection

    Back in Ryze AI the Meta Ads card shows Connected. There is no ad account to pick: Ryze AI sees every ad account that Meta login can reach. Optionally click View on the card and use Agent default accounts to choose the ad accounts the agent works with first.

  3. Open the MCP Servers list in VS Code

    Open the Command Palette and run Chat: Open Customizations, then select MCP Servers. Select Add Server (+) in the User or Workspace group.

  4. Add the HTTP server

    Choose HTTP (HTTP or Server-Sent Events) and enter https://connector.get-ryze.ai/mcp. Enter ryze as the server ID. For a personal setup, select Global, then Copilot Global. There is no app ID, access token or secret to enter.

  5. Trust the server and sign in

    Review the trust and sign-in prompts VS Code shows, then complete the Ryze AI sign-in in the browser. On the Ryze AI page choose the workspace that holds your Meta Ads connection and click Allow connection. One connection can cover up to 20 workspaces.

  6. Ask your first question in Copilot Chat

    Open Copilot Chat and ask: List my Meta ad accounts, then show spend, ROAS and CTR by campaign for the last 30 days for the first one. Read the tool call when VS Code asks before you accept it.

The Ryze AI help article for Meta Ads covers the Meta side of the connection. VS Code steps follow the VS Code MCP servers docs.

Command Palette and config files

The guided flow and the config files reach the same server. Pick the one that matches how you manage VS Code.

Command Palette

Run MCP: Add Server from the Command Palette and follow the prompts with the same URL and server ID. It skips the Customizations editor, which helps if you already know the flow.

Portable config file

You can also write the server into a file. The portable format is read from ~/.copilot/mcp-config.json or a .mcp.json at the workspace root and uses the key mcpServers. Put it in the workspace root when a whole team should get the same setup:

{ "mcpServers": { "ryze": { "type": "http", "url": "https://connector.get-ryze.ai/mcp" } } }

Older VS Code format

The older VS Code format lives in .vscode/mcp.json or the user mcp.json and uses the key servers. VS Code labels it deprecated in the guided flow, so tutorials written a while ago may send you there:

{ "servers": { "ryze": { "type": "http", "url": "https://connector.get-ryze.ai/mcp" } } }

Portable configurations do not support VS Code input variables or environment files. Never paste a Meta access token into either file. The connector uses a sign-in, and the Meta login stays inside Ryze AI.

VS Code behavior to know

  • VS Code tries Streamable HTTP first and falls back to Server-Sent Events.
  • Trusting a server to start, authenticating, and approving individual tool calls are separate steps.
  • Servers that need interactive inputs are not forwarded to Copilot harness sessions.
  • VS Code's docs describe a browser authorization flow. Ryze AI was not tested in VS Code during our research, so if the sign-in does not start, email Ryze AI support using the link at the end of this page.

Access and permissions

Access to Meta Ads is set in three places: Meta, Ryze AI and VS Code.

Which Meta login
Ryze AI connects with Meta OAuth. Sign in with the login that holds your ad accounts and keep every requested permission checked: ads_management, ads_read, business_management, pages_show_list, pages_read_engagement, pages_manage_ads, leads_retrieval, catalog_management, instagram_basic, instagram_manage_comments and public_profile.
Which accounts
One login reaches every ad account it can access. An ad account the login has no access to is out of reach. To work with another login, click View on the Meta Ads card and use Add one more account.
Read or write
Your role on the ad account in Meta decides what can change: Advertiser access at least, and Admin to allow changes. For a hard read-only guarantee, connect a Meta login that only has read access.
What VS Code asks
VS Code asks you to review the publisher, endpoint and requested access before it starts a server, then asks for the sign-in, then asks about individual tool calls. Read the first prompt before you accept it.

Removing access

To stop VS Code reaching Meta Ads, open Chat: Open Customizations, select MCP Servers and disable or uninstall the ryze server. To remove Meta access itself, click View on the Meta Ads card in Ryze AI Integrations and disconnect the login.

What VS Code can do in Meta Ads

The Ryze AI connector exposes 10 Meta Ads tools: 7 read, 2 write and 1 delete. They use Meta's official API and run as the Meta login you connected.

ToolTypeWhat it does
meta_ads__listAdAccountsReadLists every Meta ad account the connected user can access, with id, name and currency.
meta_ads__getAccountSummaryReadReturns aggregate metrics for a Meta ad account on Meta's default attribution window.
meta_ads__runRawInsightsReadRuns a raw Meta Insights query at account, campaign, ad set or ad level with breakdowns, filters and custom attribution windows.
meta_ads__listCreativesReadLists the ad creatives in a Meta ad account.
meta_ads__getCreativeReadGets one Meta ad creative by id.
meta_ads__listLeadFormsReadLists the lead generation forms on a Facebook Page.
meta_ads__runGraphReadReadReads any Meta Graph API object or edge, such as paused campaigns, targeting specs or the ad account activity log.
meta_ads__runGraphWriteWriteCreates or updates campaigns, ad sets, ads, creatives and other objects through the Meta Graph API.
meta_ads__uploadImageFromUrlWriteUploads an image from a URL to a Meta ad account and returns an image hash for a creative.
meta_ads__runGraphDeleteDeleteDeletes or archives Meta objects. The tool description says it is meant for an explicit item-by-item approved list.

The write and delete tools change a live ad account: campaigns, budgets, ads and creatives. VS Code treats approving individual tool calls as its own step, so read each call before you accept it, particularly runGraphWrite and runGraphDelete. The item-by-item rule for the delete tool is an instruction in its description, not a block in the server. Scheduled tasks in Ryze AI run without an approval step.

Meta Ads limits to know

Some limits apply in any client, including Copilot Chat.

TopicLimit
Organic postsThe connector cannot publish organic Facebook Page or Instagram posts. The Ryze AI Meta app does not hold pages_manage_posts or instagram_content_publish.
Page commentsThe connector cannot read comments on a Facebook Page. The Ryze AI Meta app does not hold pages_read_user_content.
Restoring objectsArchived or deleted Meta objects cannot be restored through the connector.
Attribution windowgetAccountSummary uses Meta's default window. Ask for runRawInsights when you need another window.
Creative writesMeta rate-limits creative writes to about one per 30 seconds per account, according to the tool description. This is a Meta limit, not a Ryze AI one.
ReconnectingMeta access expires more often than some other platforms. Ryze AI asks you to reconnect after two-factor or Business Manager role changes.

First 3 prompts to run

1. Spend and ROAS by campaign

List my Meta ad accounts, then use runRawInsights on the first one to show spend, ROAS and CTR by campaign for the last 30 days, and put the result in a table.

Tools used: meta_ads__listAdAccounts, meta_ads__runRawInsights

What comes back: One row per campaign with the three metrics. Because it renders in the chat panel, you can ask Copilot to save the table into a file in your workspace.

2. Who changed what

Read the ad account activity log for the last 14 days and list which user changed budgets, targeting or campaign status, with the time of each change.

Tools used: meta_ads__runGraphRead

What comes back: A list of changes with the user, the object and the time, taken from the ad account activity log.

3. Creative review before a landing page change

List the creatives in my main Meta ad account, then break down results by placement and device for the ads that use them, so I can see which ones fit the page I have open in this project.

Tools used: meta_ads__listCreatives, meta_ads__runRawInsights

What comes back: A list of creatives and an Insights breakdown by placement and device. Ask a follow-up to inspect any single creative by id.

Each answer comes from your own account, so this page describes what comes back instead of showing sample numbers. To make a change, ask for it in plain words, such as pausing a campaign by name, and read the tool call before you approve it.

Ryze AI vs Meta's own ads MCP server

Meta publishes its own ads MCP server, so VS Code has two routes to Meta Ads. They suit different setups.

OptionSetupCoverageWorks in
Ryze AI connectorMeta sign-in inside Ryze AI, then one HTTP MCP server URL added in VS Code10 Meta Ads tools: Insights queries, creatives, lead forms, Graph API reads and writes, image upload and a delete toolVS Code with GitHub Copilot, Claude, ChatGPT, Cursor and other MCP clients
Ads MCP server (Meta)Remote server at https://mcp.facebook.com/ads. Sign in with OAuth through a Facebook Login for Business dialog, or send a user or system user access token as a Bearer header. Meta's get started page lists a Meta developer app with the Create & manage ads with ads MCP server use case as a prerequisite, unless you use Meta's separate ads AI connectorsMeta's overview lists seven tool categories: reporting, ad creation and management, catalog operations, signals and datasets, help and troubleshooting, A/B testing and activity log access. Required permissions are ads_mcp_management plus ads_read or ads_managementMeta says any MCP-compatible agent. Its get started page names Claude Code and ChatGPT

Meta's server is first-party and needs no Ryze AI plan. It also means creating a Meta developer app and handling redirect URLs or tokens yourself, and Meta's pages do not describe a VS Code setup. The Ryze AI connector costs a plan after the trial, passes your data through Ryze AI, and keeps the Meta login inside Ryze AI so VS Code holds only the connector URL.

Sources: Meta ads MCP server overview, Meta ads MCP server get started, VS Code MCP servers docs, GitHub Copilot MCP docs, VS Code MCP configuration reference, Ryze AI Meta Ads integration. Checked November 14, 2026.

Other clients

Meta Ads is connected once in Ryze AI, so nothing changes on the Meta side when you use another client.

Claude

In Claude the connector is added under Customize, Connectors, a different menu from VS Code. How to connect Claude to Meta Ads.

ChatGPT

ChatGPT has its own plan rules for custom MCP servers, so read that guide before you connect. How to connect ChatGPT to Meta Ads.

Codex

Codex registers MCP servers with its own setup. How to connect Codex to Meta Ads.

Errors and fixes

The MCP server does not start in VS Code
On Copilot Business or Enterprise, ask an administrator to enable the MCP servers in Copilot policy; it is disabled by default. Also check that VS Code is version 1.99 or later.
The sign-in never opens
Trust the server first, then authenticate; they are separate steps. Open the server output from MCP Servers in Chat: Open Customizations to see what VS Code reports, and email Ryze AI support if it stays stuck.
I followed an older tutorial and nothing happens
Current VS Code docs use Copilot Global (~/.copilot/mcp-config.json) and mark the .vscode/mcp.json destination as deprecated in the guided flow. Re-add the server through Chat: Open Customizations.
The Meta Ads tools are missing
If the connector was added before Meta Ads was connected, remove the ryze server, add it again and start a new chat.
Reconnect needed
Meta access can expire after two-factor or Business Manager role changes. Click Reconnect on the Meta Ads card in Ryze AI and approve every permission again.
An ad account is missing
Ryze AI sees only the ad accounts the connected Meta login can access. Ask Copilot to run listAdAccounts to see what the login reaches, or add another login with Add one more account.
Changes fail
Your role on the ad account may be below Admin. Roles are set in Meta, not in Ryze AI. Ask an ad account admin to raise your access, or reconnect with a login that has it.
The wrong account answers
Set Agent default accounts on the Meta Ads card in Ryze AI, or name the account in your prompt.
The tool replies that a subscription is required
The Meta Ads tools need an active Ryze AI plan or free trial. Start the trial in Ryze AI and retry.

Frequently asked questions

Which Meta Ads connector should I use in VS Code?

Ryze AI is the best Meta Ads connector for VS Code when you want one hosted URL with 10 tools and no Meta developer app, but it needs a Ryze AI plan after the trial. Meta's own ads MCP server at mcp.facebook.com/ads needs no Ryze AI plan if you are willing to set up a Meta developer app and OAuth or tokens.

How do I connect VS Code to Meta Ads?

Connect Meta Ads in a Ryze AI workspace. In VS Code run Chat: Open Customizations, select MCP Servers, add an HTTP server with https://connector.get-ryze.ai/mcp and the ID ryze, trust it, sign in to Ryze AI and click Allow connection.

Does Meta have its own MCP server?

Yes. Meta hosts an ads MCP server at https://mcp.facebook.com/ads. Its documentation lists seven tool categories, OAuth or access token sign-in, and the permissions ads_mcp_management plus ads_read or ads_management. It names Claude Code and ChatGPT and does not describe VS Code.

Which GitHub Copilot plan do I need?

GitHub says MCP needs access to Copilot and VS Code 1.99 or later. Copilot Free, Pro, Pro+ and Max are not governed by the organization policy. On Copilot Business or Enterprise, the MCP servers in Copilot policy must be enabled, and it is off by default.

Can VS Code change my Meta ad account?

Yes. The connector has write tools that create and update campaigns, ad sets, ads and creatives, plus a delete tool. VS Code asks about individual tool calls as a separate step, so read each one. A Meta login with read-only access cannot make changes.

Do I need a Meta developer app or access token?

No. You do not enter an app ID, access token or secret in VS Code. The Meta login is connected inside Ryze AI, and VS Code only holds the connector URL and the Ryze AI sign-in.

Can I manage several ad accounts?

Yes. One login reaches every ad account it can access, and you can add more logins with Add one more account. Over MCP every Meta tool takes an optional connection_id. Separate clients belong in separate Ryze AI workspaces.

Should I use the config file or the Customizations editor?

Both reach the same server. The Customizations editor is the current route. A .mcp.json at the workspace root with the key mcpServers lets a team share one setup, and the older .vscode/mcp.json format with the key servers is labeled deprecated.

Why do the Meta Ads tools not show up in Copilot Chat?

Check that the ryze server is enabled and trusted in MCP Servers, then start a new chat. If Meta Ads was connected after you added the server, remove the server, add it again and start a new chat. On an organization plan, check the MCP policy.

Can it post to Facebook or Instagram?

No. The connector manages ads, not organic content. It cannot publish Page or Instagram posts and cannot read Page comments, because the Ryze AI Meta app does not hold those permissions.

How much does it cost?

Connecting the connector is free, but the Meta Ads tools need an active Ryze AI plan or free trial. Paid Ads is $89 per month with a 7-day free trial and Agency is $279 per month. Annual billing takes 30% off the first year.

How do I disconnect Meta Ads from VS Code?

Open Chat: Open Customizations, select MCP Servers and disable or uninstall the ryze server. To remove Meta access, click View on the Meta Ads card in Ryze AI and disconnect the login.

Connect Meta Ads to VS Code

Paid Ads is $89 per month with a 7-day free trial; Agency is $279 per month. Annual billing takes 30% off the first year.

Meta Ads MCP server

Need help? Read the Ryze AI Meta Ads guide or email Ryze AI support.