# Connect ChatGPT, Codex, Cursor or Gemini to your ad accounts

> Step by step: add an ad platform MCP server to ChatGPT, Codex, Cursor, Gemini or Gemini CLI, sign in with OAuth, check it works and keep changes safe.

To connect ChatGPT, Codex, Cursor or Gemini to your ad accounts, you add a remote ad platform MCP server to the assistant, then sign in and approve access in your browser. In ChatGPT and the Gemini app you add it through settings; in Codex, Cursor and Gemini CLI you add a few lines to a configuration file or run one command. This guide has the steps for each, plus how to check the connection and keep changes under your control.

Each assistant's steps come from its own docs, checked on the date above and linked in each section. These products change often, so if a menu name differs, look for "MCP", "apps" or "connectors" in the settings. The examples use Roasby's address, `https://roasby.com/mcp`; any remote MCP server works the same way with its own address. For Claude and Claude Code, see [How to connect Claude to Google Ads](/guides/how-to-connect-claude-to-google-ads).

## In short

- Every assistant here supports remote MCP servers with OAuth sign-in, so you never paste an ad platform key.
- ChatGPT: add a custom MCP server on ChatGPT on the web, sign in and start asking.
- Codex: one `[mcp_servers.<name>]` entry in `config.toml`, shared by the CLI, IDE extension and desktop app, then `codex mcp login`.
- Cursor: a `url` entry in `mcp.json`, per project or global. Gemini CLI: an `httpUrl` entry, then `/mcp auth`.
- Gemini app: add a custom app at gemini.google.com, for now on personal US accounts only.

## Which setup does each assistant use?

| Assistant | Where you add the server | Sign-in | Worth knowing |
| --- | --- | --- | --- |
| ChatGPT | Plugins on ChatGPT web | OAuth in the browser | Nothing to install |
| Codex | `~/.codex/config.toml` or `codex mcp add` | `codex mcp login` | CLI, IDE and desktop share it |
| Cursor | `.cursor/mcp.json` or `~/.cursor/mcp.json` | OAuth when first used | Asks before running tools by default |
| Gemini app | Settings, Connected Apps, Custom apps | OAuth in the browser | Personal US accounts, English, History on |
| Gemini CLI | `~/.gemini/settings.json` or `gemini mcp add` | `/mcp auth <name>` | Leave `trust` off |

## How do I connect ChatGPT to my ad accounts?

OpenAI's help article on [connecting custom MCP servers in ChatGPT](https://help.openai.com/en/articles/12584461-developer-mode-apps-and-full-mcp-connectors-in-chatgpt-beta) describes these steps on ChatGPT web:

1. Open **Plugins** and select the **+** button, then **Add custom MCP server**.
2. Enter a name, such as "Roasby", and optionally a description.
3. Under **Connection**, enter the public HTTPS address, for example `https://roasby.com/mcp`.
4. Choose OAuth as the sign-in method and complete the authorization prompt. You sign in to the server and approve access in your browser.
5. Tick the box to acknowledge the risk warning.
6. Select **Create as a plugin**, then review the tools the server offers.

If your ChatGPT shows **Settings**, then **Apps & Connectors** instead, add the connector there with the same address.

## How do I connect Codex to my ad accounts?

Codex reads MCP servers from `~/.codex/config.toml`, and [OpenAI's Codex MCP docs](https://learn.chatgpt.com/docs/extend/mcp?surface=cli) say the CLI, the IDE extension and the desktop app share that file. Add the server once and it works in all three.

### With the configuration file

Add this to `~/.codex/config.toml`:

```toml
[mcp_servers.roasby]
url = "https://roasby.com/mcp"
```

A trusted project can also have its own `.codex/config.toml`.

### With a command

```bash
codex mcp add roasby --url https://roasby.com/mcp
```

### Sign in

```bash
codex mcp login roasby
```

Your browser opens to approve access. On a machine without a browser, add `--no-browser`, open the printed link elsewhere, and paste the full redirect address back into the terminal.

### Codex plugins

Codex plugins can bundle MCP servers with skills, so one install adds both. Roasby's plugin installs with:

```bash
codex plugin marketplace add Roasby/roasby
codex plugin add roasby@roasby
```

It adds the Roasby connection and five workflow skills: working with Roasby safely, a wasted spend audit, a weekly review, launching a search campaign, and a budget and bid check. You can still switch a plugin's bundled server on or off in Codex's settings.

## How do I connect Cursor to my ad accounts?

[Cursor's MCP docs](https://cursor.com/docs/context/mcp) use a `mcp.json` file in one of two places:

- `.cursor/mcp.json` in a project, for that project only.
- `~/.cursor/mcp.json` in your home folder, for every project you open.

For a remote server, add a `url`:

```json
{
    "mcpServers": {
        "roasby": { "url": "https://roasby.com/mcp" }
    }
}
```

Cursor supports OAuth for remote servers, so the first time you use one it asks you to sign in. Roasby also has a one-click [Add to Cursor link](https://cursor.com/install-mcp?name=roasby&config=eyJ1cmwiOiJodHRwczovL3JvYXNieS5jb20vbWNwIn0=) that writes the same entry for you, and a plugin in the Cursor marketplace.

By default, Cursor asks for approval before it runs an MCP tool. Cursor's run modes can let allowlisted tools run without asking. For ad accounts, keep approval on for any tool that changes something.

## How do I connect Gemini to my ad accounts?

### In the Gemini app

Google's help page on [custom apps for Gemini](https://support.google.com/gemini/answer/17209137?hl=en&co=GENIE.Platform%3DDesktop) sets these requirements at the time of writing: you are 18 or over and in the US, you sign in with a personal Google Account (work and school accounts aren't supported yet), you use Gemini in English, and Gemini History is on.

1. Go to gemini.google.com on a computer.
2. Open **Settings**, then **Connected Apps**. If you don't see it, look under **Personal Intelligence**.
3. Under **Custom apps**, select **Add a custom app**.
4. Enter the server address, for example `https://roasby.com/mcp`, and select **Next**. Roasby needs no client ID or secret. Google's page says a server without dynamic client registration needs credentials entered under **Advanced features**.
5. Follow the prompts to sign in and approve access.

Once added on the web, the app also works in the Gemini mobile app. Google says Gemini currently asks you to confirm any write action, and warns that it doesn't control or secure third-party MCP servers, so connect only ones you trust.

### In Gemini CLI

[Gemini CLI's MCP docs](https://geminicli.com/docs/tools/mcp-server/) use `httpUrl` for Streamable HTTP servers (the `url` key is for older SSE servers). Add this to `~/.gemini/settings.json`:

```json
{
    "mcpServers": {
        "roasby": { "httpUrl": "https://roasby.com/mcp" }
    }
}
```

Or run `gemini mcp add --transport http roasby https://roasby.com/mcp`. Then run `/mcp auth roasby` inside Gemini CLI to sign in, and the same command again if the sign-in expires.

Gemini CLI has a `trust` setting per server that skips every tool confirmation. It is off by default. Leave it off for any server that can change your ads.

## What about VS Code?

VS Code reads MCP servers from `.vscode/mcp.json` in your project. A remote server needs a type and an address:

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

[VS Code's MCP docs](https://code.visualstudio.com/docs/copilot/chat/mcp-servers) cover starting the server and signing in.

## Which assistant suits which kind of ad work?

Any of them can do the job, because the tools come from the server, but they fit different habits:

- **ChatGPT and the Gemini app** suit quick questions and reviews from a browser or phone.
- **Codex and Cursor** suit bulk work next to files: a CSV of keywords, a spreadsheet of client budgets, or a script that formats a report.
- **Gemini CLI** suits people who already live in a terminal and want ad checks next to other command line work.

Many people connect two: a chat app for the daily check, a coding tool for the bigger jobs.

## Can I add skills to other assistants?

Yes, in assistants that read Agent Skills. Skills are written workflows that guide the assistant through a task. After you add the MCP server, Roasby's skills install with:

```bash
npx skills add Roasby/roasby
```

The skills need the server connection to work, so add the server first.

## How do I check the connection works?

Ask a question only the server can answer, such as "Which Roasby workspace am I in?" or "Which ad accounts can you see?" The assistant should call a tool and reply with real names. If it says it has no access:

1. Check that the server is turned on for this chat or project.
2. Sign in again (`codex mcp login`, `/mcp auth`, or reconnect in settings).
3. Make sure the ad accounts are connected to the server itself, not just the assistant.

Then try a real read, such as "How did my ads do in the last 7 days, by platform?", and compare a figure or two with the ad platform.

## What can I ask once it is connected?

The same prompts work in every assistant, because the tools come from the server:

- "Find searches that cost money without converting, and suggest negative keywords." See the [wasted spend audit](/use-cases/wasted-spend-audit).
- "Write a weekly report across Google Ads, Microsoft Ads and Meta Ads." See [weekly reports](/use-cases/weekly-ad-reports).
- "Which campaigns are limited by budget, and what would a safe increase be?" See [bids and budgets](/use-cases/bids-and-budgets).
- "Check my conversion tracking on every account."
- "Which Meta ad sets are learning limited?" [What is a Meta Ads MCP server?](/guides/meta-ads-mcp-server) covers what an assistant can do on Meta.

Coding assistants such as Codex and Cursor are handy for bulk work, such as reading a CSV of keywords from your project and adding them, while chat apps suit quick questions on the go. Whatever the assistant, read each change preview before you approve it, for the reasons in [Is it safe to give AI access to Google Ads?](/guides/is-it-safe-to-give-ai-access-to-google-ads)

## How do I disconnect an assistant?

Remove the server in the assistant (delete the config entry or the custom app), and also revoke it at the source. In Roasby, open **AI connections** on the web and click **Disconnect**. Removing a server inside an AI app doesn't notify the server, so revoking at the source is what actually ends access.

## Doing this with Roasby

Roasby works with [ChatGPT](/integrations/chatgpt), [Codex](/integrations/codex), [Cursor](/integrations/cursor) and [Gemini](/integrations/gemini), as well as Claude and VS Code, all through `https://roasby.com/mcp`. One connection covers Google Ads, Microsoft Ads, ChatGPT Ads and Meta Ads, and every workspace you belong to. You connect ad accounts on the Roasby web app first, then the assistant reads freely and previews every change, waiting for your confirmation in chat. Everything it creates starts paused, there are no delete tools, and guardrails stay with people on the web. [Connect your AI](/docs/connect-your-ai) has every app's steps, and [Workspaces](/docs/workspaces#switching-workspaces-in-chat) explains how to work in another workspace from chat.

## Questions, answered

### Can ChatGPT connect to Google Ads?

Yes. ChatGPT users can add a remote MCP server such as Roasby as a custom app or plugin on ChatGPT on the web, sign in, and then ask about and manage their ad accounts in a conversation.

### Do Codex CLI and the Codex IDE extension share MCP servers?

Yes. OpenAI's Codex docs say the desktop app, CLI and IDE extension share one MCP configuration, by default in ~/.codex/config.toml, so you add a server once.

### Where does Cursor keep its MCP settings?

In a mcp.json file: .cursor/mcp.json inside a project for that project only, or ~/.cursor/mcp.json in your home folder for every project. A remote server needs only a url entry, and Cursor handles OAuth sign-in.

### Can I use a custom MCP server in the Gemini app on my phone?

You add it in the Gemini web app, and Google's help page says it then works in the Gemini mobile app too. Google currently limits custom apps to personal accounts of people 18 or over in the US, in English, with Gemini History on.
