# Using Roasby as a VS Code MCP server for your ads

> How the Roasby MCP server works in VS Code for Google Ads and other ad accounts: the mcp.json format, sign-in, trust, approvals and ad work.

Roasby is a hosted MCP server that you add to VS Code, so the assistant in VS Code chat can read and manage your Google Ads, Microsoft Ads, ChatGPT Ads and Meta Ads accounts next to your code. You add one entry to `mcp.json` with the Roasby address, and VS Code opens your browser to sign in the first time it connects. This page explains the VS Code MCP configuration, how sign-in, trust and approvals fit together, and which ad tasks suit an editor.

## How the VS Code MCP configuration works

VS Code keeps MCP servers in a file called `mcp.json`. The [MCP configuration reference](https://code.visualstudio.com/docs/agents/reference/mcp-configuration) describes two places for it:

- **`.vscode/mcp.json` in a workspace**, for servers that belong to one project.
- **A user-profile `mcp.json`**, for servers you want everywhere. The **MCP: Open User Configuration** command opens it.

Both use the same format: a top-level `servers` object that maps each server name to its settings. A remote server like Roasby needs a `type` of `"http"` and a `url`. VS Code tries the Streamable HTTP transport first and falls back to SSE if a server does not support it; Roasby uses Streamable HTTP.

You can also run **MCP: Add Server** from the command palette and follow the guided setup, choosing an HTTP server and entering `https://roasby.com/mcp`. It writes the same entry for you.

### Why a Cursor file does not work here

Cursor and VS Code look alike, but their MCP files are not interchangeable:

| | VS Code | Cursor |
| --- | --- | --- |
| Project file | `.vscode/mcp.json` | `.cursor/mcp.json` |
| Top-level key | `servers` | `mcpServers` |
| Remote entry | `"type": "http"` and `url` | `url` only |
| Sign-in | Browser OAuth on first connection | Browser OAuth on first connection |

If you copy a Cursor entry into VS Code, it will not be read. The address and your Roasby sign-in are the same in both, so moving between editors only means writing the right file. [Roasby for Cursor](/integrations/cursor) covers Cursor's side.

## Sign-in, trust and approvals

VS Code's reference makes a useful distinction: authentication, trusting a server to start, and approving individual tool calls are three separate things. Each one is a check you control.

### Signing in

When VS Code first connects to Roasby, it handles the OAuth flow and opens a browser window. You sign in to Roasby and approve access on a screen that shows your Roasby account and what the assistant will be able to read, change and create. The `mcp.json` file never holds a token or a key, so a workspace file is safe to commit. Each person who opens the project signs in with their own Roasby account and gets their own workspace role.

### Trust and start-up

Adding an entry to `mcp.json` does not by itself mean a session can use the server. VS Code asks you to trust a server before it starts, and the `chat.mcp.autostart` setting controls which servers start automatically when you send a chat message. Review the address before you trust it: it should be `https://roasby.com/mcp`.

### Approving tool calls and changes

VS Code asks you to approve tool calls in chat, and configuration options do not bypass those approvals. On top of that, Roasby has its own rule for every write:

1. The assistant calls a read-only preview tool. Roasby checks your budget and bid guardrails and the platform's rules, and returns the before and after values with a one-time confirmation token.
2. The assistant is told to show you the preview and wait. After your yes, it sends the token, which works once, for 10 minutes, for that exact change.

A reasonable habit is to approve Roasby's read tools freely and look closely at any tool call that applies a change. Roasby cannot see your chat, so the token proves the preview ran, not that you typed the reply.

## What the assistant can do with Roasby in VS Code

The tools come from Roasby, so VS Code can do the same as any other connected assistant:

- **Read:** spend, conversions, conversion value and ROAS across platforms; campaign, ad group, keyword and ad performance; search terms on Google Ads and Microsoft Ads; conversion tracking, alerts, recommendations and the change log.
- **Change:** pause and enable items, adjust budgets, bids and bidding, add negative keywords, edit ads and keywords, add assets and update campaign settings.
- **Create:** campaigns, ad groups, ads and keywords, always paused.

Platforms differ. ChatGPT Ads and Meta Ads have no keyword research, and ChatGPT Ads has no search terms report. The [Google Ads](/google-ads) and [Microsoft Ads](/microsoft-ads) pages list what Roasby does on the search platforms.

## Ad work that fits an editor

### Landing pages and the searches that reach them

Open the page a campaign points to, then ask which search terms brought visitors there and what they cost. Mismatches show up fast: a page about one product reached by searches for another. Excluding a search term is a preview and a yes. The [wasted spend audit](/use-cases/wasted-spend-audit) walks through the full routine.

### New pages, new campaigns

When you ship a page, describe a search campaign for it in chat. Roasby creates it paused, with ad groups, keywords and ads inside, so you can review it in Google Ads or Microsoft Ads before anything spends. See [Create campaigns](/docs/creating-campaigns).

### Lists kept in the repository

Keyword lists, negative keyword lists or a CSV of budgets in your project can feed Roasby directly. Within one ad account, a batch is one preview and one confirmation for all valid items, with refused items listed and their reasons given. [Keyword research](/use-cases/keyword-research) shows how to build those lists from real search volumes.

## Safety rules that hold in every editor

- Everything Roasby creates starts paused, and there are no delete tools.
- Budget and bid guardrails are set per ad account by owners and admins on the web. The assistant can read them, never loosen them.
- Changes that cannot be reverted are off by default. A workspace owner or admin has to allow them, and each one then needs a second, separate confirmation in chat.
- Every change goes into the change log with the before and after values and your quoted reply. Most can be reverted in one click.
- The assistant never has more rights than your role in the workspace.

The [safety model](/docs/safety-model) explains each rule.

## Limits in VS Code

- **Web-only steps stay on the web.** Connecting ad accounts, guardrails, billing and AI connections happen in Roasby's web app.
- **One connection, every workspace.** The assistant works in your current Roasby workspace unless you name another one.
- **Removing the entry does not revoke access.** Delete it from `mcp.json`, then open **AI connections** in Roasby and select **Disconnect**, as [Connect your AI](/docs/connect-your-ai#disconnect-an-assistant) describes.
- **VS Code's settings move fast.** Menu and setting names change between releases, so check VS Code's reference if a name differs.

For the steps in other assistants side by side, read [Connect ChatGPT, Codex, Cursor or Gemini to your ad accounts](/guides/connect-chatgpt-codex-cursor-gemini-to-ad-accounts).

## Set up VS Code

1. Connect an ad account on the Ad accounts page in Roasby.
2. Open .vscode/mcp.json in your project.
3. Add the Roasby server below.
4. Sign in to Roasby when VS Code asks, and approve access.
5. Ask: Which Roasby workspace am I in?

```text
{
    "servers": {
        "roasby": {
            "type": "http",
            "url": "https://roasby.com/mcp"
        }
    }
}
```

## Try asking

- Which campaigns lost conversions this week, and why?
- Check the final URLs of my ads against the pages in this project.
- Add the search terms that never converted as negative keywords.

## Questions, answered

### How do I add Roasby to VS Code?

Add a roasby entry under servers in .vscode/mcp.json with "type": "http" and the url https://roasby.com/mcp, then sign in to Roasby when VS Code asks.

### Why does VS Code need a different file from Cursor?

VS Code reads .vscode/mcp.json, with servers as the top-level key and a type on each entry. Cursor reads .cursor/mcp.json with mcpServers. Copying one into the other does not work.

### Can I commit .vscode/mcp.json?

Yes. It holds only the Roasby address. Each person who opens the project signs in to Roasby with their own account and gets their own rights.

### Where do I use Roasby in VS Code?

In the chat view, where the assistant can call the tools of the MCP servers you added. Ask in plain words and it picks the Roasby tools it needs.

### Does VS Code get my ad platform logins?

No. VS Code signs in to Roasby only, and Roasby keeps the connections to your ad platforms.

### Can it create campaigns from VS Code?

Yes. A new campaign is built paused, with its ad groups, keywords and ads, so nothing spends until you enable it.
