> ## Documentation Index
> Fetch the complete documentation index at: https://www.adspirer.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Connect Codex Desktop to Ad Platforms | Adspirer

> Install Adspirer in Codex inside the ChatGPT desktop app — three chat messages, no terminal. Manage Google, Meta, Amazon, ChatGPT, LinkedIn, and TikTok Ads with 400+ tools.

The ChatGPT desktop app has Codex built in. Switch to Codex, send three messages, and Adspirer is installed and signed in — no terminal, no config files. You get the same plugin as [Codex in the terminal](/docs/ai-clients/codex): 400+ ad platform tools and five advertising skills, running in a chat window.

<Note>
  **Codex Desktop vs. Codex Terminal.** Same plugin, same skills, same Adspirer account. Use the desktop app if you'd rather work in a chat window. Use the [terminal setup](/docs/ai-clients/codex) if you want scheduled, autonomous runs or you already live in a CLI.
</Note>

## Prerequisites

<Note>
  * The **ChatGPT desktop app** for macOS, Windows, or Linux — [download it here](https://learn.chatgpt.com/docs/app#getting-started)
  * A ChatGPT plan that includes Codex (Plus, Pro, Business, or Enterprise)
  * An Adspirer account ([free to start](https://adspirer.ai/sign-up?utm_source=docs\&utm_medium=page\&utm_content=signup)) — you can also create one during the sign-in step
  * At least one ad platform account: Google Ads, Meta Ads, Amazon Ads, ChatGPT Ads, LinkedIn Ads, or TikTok Ads
</Note>

## Setup (3 Messages)

<Steps>
  <Step title="Install the ChatGPT desktop app">
    Download the app from [OpenAI's desktop app page](https://learn.chatgpt.com/docs/app#getting-started) — it covers macOS, Windows, and Linux. Open it and sign in with your ChatGPT account.

    Already have it? Make sure it's up to date. Codex only appears in recent versions.
  </Step>

  <Step title="Switch to Codex">
    Click the dropdown at the top left of the sidebar (it says **ChatGPT**) and choose **Codex**. The sidebar switches to Codex's — **New chat**, **Projects**, **Plugins**, and so on.

    Click **New chat**. Codex works inside a folder on your computer. When it asks where to work, pick or create one for your ads work — if you keep brand guidelines or media plans there, the agent reads them.

    <Frame caption="Codex selected in the top-left dropdown, ready for a new chat">
      <img src="https://mintcdn.com/adspirer/My0vMqzyp3JsH-jn/images/codex-desktop/codex-home.png?fit=max&auto=format&n=My0vMqzyp3JsH-jn&q=85&s=526c9a678d6cb3b02ecd6bfd0d0ee561" alt="ChatGPT desktop app with Codex selected in the top-left dropdown, showing the Codex sidebar and a new chat asking what to work on" width="2718" height="1804" data-path="images/codex-desktop/codex-home.png" />
    </Frame>
  </Step>

  <Step title="Message 1 — add the Adspirer marketplace">
    Send this as a chat message. Codex runs it for you — if it asks permission to run a command, approve it.

    ```
    codex plugin marketplace add amekala/ads-mcp
    ```

    Codex confirms **Marketplace is registered successfully**, naming it `adspirer-marketplace` with the source `github.com/amekala/ads-mcp`.
  </Step>

  <Step title="Message 2 — install the plugin">
    ```
    install plugin
    ```

    Codex confirms **Installed and verified** — `adspirer-ads-agent@adspirer-marketplace`.

    <Frame caption="Messages 1 and 2 — marketplace registered, plugin installed">
      <img src="https://mintcdn.com/adspirer/My0vMqzyp3JsH-jn/images/codex-desktop/marketplace-install.png?fit=max&auto=format&n=My0vMqzyp3JsH-jn&q=85&s=a47e1d90b26f17f8d23c792006879502" alt="Codex chat showing the marketplace add command confirmed as registered, then 'install plugin' confirmed as installed and verified for adspirer-ads-agent" width="2722" height="1810" data-path="images/codex-desktop/marketplace-install.png" />
    </Frame>
  </Step>

  <Step title="Message 3 — sign in to Adspirer">
    ```
    help me oauth it
    ```

    Your browser opens Adspirer's login page. Sign in (or create an account), click **Authorize**, and link the ad platforms you want to manage. Back in Codex you'll see **Adspirer OAuth is complete and verified**, with the endpoint `https://mcp.adspirer.com/mcp` and status `enabled`.

    <Frame caption="Message 3 — OAuth complete, Adspirer enabled">
      <img src="https://mintcdn.com/adspirer/My0vMqzyp3JsH-jn/images/codex-desktop/oauth-complete.png?fit=max&auto=format&n=My0vMqzyp3JsH-jn&q=85&s=327d4d24fe7ab8461e2b9d5689ef6185" alt="Codex chat confirming Adspirer OAuth is complete and verified, with status enabled, authentication OAuth, and the mcp.adspirer.com endpoint" width="2714" height="942" data-path="images/codex-desktop/oauth-complete.png" />
    </Frame>
  </Step>

  <Step title="Start a new chat and check your connections">
    The plugin loads in your next task, so click **New chat** and ask:

    ```
    Check my connected ad platforms
    ```

    You should see a table of your connected accounts with account IDs, names, and connection status.
  </Step>

  <Step title="Try It Now">
    <Card title="Sign up for Adspirer — free to start" icon="rocket" href="https://adspirer.ai/sign-up?utm_source=docs&utm_medium=setup-cta&utm_content=codex-desktop" horizontal>
      15 free tool calls/month. No credit card required. Connect your ad accounts in 2 minutes.
    </Card>
  </Step>
</Steps>

<Check>
  You're connected. Codex in the desktop app now has Adspirer's 400+ advertising tools and five skills — the same plugin as the terminal setup.
</Check>

## Optional Add-Ons

Two things that make Codex noticeably more useful for ads work. Neither is required — the setup above is complete without them.

### Let Codex use your computer

With **Computer use** on, Codex can work inside your other apps, not just call Adspirer's tools: open Ads Manager or Merchant Center in Chrome to check something the API doesn't expose, read a budget sheet in Excel, or drop a report into one. Codex asks before it touches an app, and you can set **Always allow** per app once you trust it.

<Steps>
  <Step title="Turn on Computer use">
    In the ChatGPT desktop app, open **Settings → Computer use** and switch on the apps you want Codex to reach: **Any App**, **Google Chrome** (it installs a browser extension — **Manage** shows whether it's in), and **Microsoft Excel**. Leave **Locked use** off unless you want tasks to keep running while your Mac is locked.

    <Frame caption="Settings → Computer use — Any App, Google Chrome, and Microsoft Excel switched on">
      <img src="https://mintcdn.com/adspirer/OSHz24xmGFzOssI4/images/codex-desktop/computer-use.png?fit=max&auto=format&n=OSHz24xmGFzOssI4&q=85&s=863ebe7f997f055237b20388deecbb36" alt="ChatGPT desktop app Computer use settings with Any App, Google Chrome (browser extension installed), and Microsoft Excel toggled on, and Locked use off" width="2082" height="1128" data-path="images/codex-desktop/computer-use.png" />
    </Frame>

    On macOS the app asks for **Screen Recording** and **Accessibility** permissions the first time — grant both, or Computer use can't see or click anything. Available on macOS and Windows.
  </Step>

  <Step title="Turn on Computer history (macOS)">
    Open **Settings → Integrations → Computer history** and click **Turn on**. Codex turns your recent activity into memories it can use, so "pick up where I left off on the Q4 budget" means something. Use **Permissions → Choose** to keep apps and sites you'd rather not share — your bank, your inbox — out of it.

    <Frame caption="Settings → Computer history, with Permissions for including or excluding apps and websites">
      <img src="https://mintcdn.com/adspirer/OSHz24xmGFzOssI4/images/codex-desktop/computer-history.png?fit=max&auto=format&n=OSHz24xmGFzOssI4&q=85&s=9dbda167fa356a51e0b0c607f4beff3b" alt="ChatGPT desktop app Computer history settings, toggled on, with a Pause button and a Permissions row with a Choose button" width="2018" height="632" data-path="images/codex-desktop/computer-history.png" />
    </Frame>

    It needs Memories turned on, it's off by default, and on Business and Enterprise plans an admin has to allow it before you'll see the switch.
  </Step>
</Steps>

<Warning>
  Adspirer's safety rails — campaigns created paused, budget changes confirmed first — apply to its tools, not to clicks Codex makes in a browser. When a task touches an ad platform's web UI, leave Chrome on ask-each-time rather than **Always allow**, and let the Adspirer plugin do the writes.
</Warning>

### Install your Expert Kit

The [Prompt Engineering Playbook](/docs/agent-skills/prompt-engineering-playbook) generates an **Expert Kit** from one of your ad accounts: an agent with account-specific instructions, a skill, a prompt book graded Beginner → Expert, and reference files on the account and on working with Adspirer. It's a paid add-on (included on annual plans) — pricing and what's inside are on that page. On Codex Desktop you don't copy files anywhere: you hand the folder to Codex.

<Steps>
  <Step title="Download the kit">
    Go to [adspirer.ai/expert-space](https://adspirer.ai/expert-space), open the kit for the account, and click **Download kit (.zip)**. Unzip it — you get one folder, named like `google-ads-expert-<brand>/`, containing:

    ```
    AGENTS.md
    PROMPTBOOK.md
    README.md
    SKILL.md
    agents/google-ads-expert-<brand>.md
    agents/google-ads-expert-<brand>.toml
    references/account-profile.md
    references/working-with-adspirer.md
    ```
  </Step>

  <Step title="Hand it to Codex">
    In a Codex chat inside your ads project folder, attach the unzipped folder (click **+** in the composer, or drag the folder in) and send:

    ```
    Install this kit's contents and instructions for this project
    ```

    Codex installs the kit into the project: the skill goes where Codex loads skills from, the agent definition registers your account's expert, and every file is checked against the download. It keeps `AGENTS.md` inside the skill rather than at the project root, so it doesn't override instructions you already have. Your Adspirer sign-in is untouched.
  </Step>

  <Step title="Start a new task with the expert">
    Codex ends with a link to the new agent — click it, or start a **New chat** and ask for the expert by name. From here the agent knows your account's structure, spend history, and operating doctrine. Open `PROMPTBOOK.md` for prompts written against your real campaigns.
  </Step>
</Steps>

## Desktop or Terminal?

|                | **Codex Desktop**                              | **Codex Terminal**                             |
| -------------- | ---------------------------------------------- | ---------------------------------------------- |
| Setup          | Three chat messages                            | One command, then `/plugins`                   |
| Where you work | A chat window in the ChatGPT desktop app       | Your terminal                                  |
| Best for       | Day-to-day analysis, ad copy, campaign builds  | Scheduled and autonomous runs, agent configs   |
| Plugin         | `adspirer-ads-agent` — same tools, same skills | `adspirer-ads-agent` — same tools, same skills |

Both connect to the same Adspirer account, so you can install in both and switch freely. The [Codex Terminal guide](/docs/ai-clients/codex) covers scheduled runs, agent configuration, and the manual install.

## What You Can Do

400+ tools across 6 ad platforms:

| Platform         | Tools | Key Capabilities                                                                                                      |
| ---------------- | ----- | --------------------------------------------------------------------------------------------------------------------- |
| **Google Ads**   | 147   | Keyword research, Search & PMax campaigns, wasted spend detection, budget reallocation, search term analysis          |
| **Amazon Ads**   | 61    | Sponsored Products, Brands & Display, ASIN/keyword targeting, ACOS & ROAS analytics, budget recommendations           |
| **LinkedIn Ads** | 55    | B2B targeting (job titles, industries, company size), sponsored content, lead gen forms, performance analysis         |
| **Meta Ads**     | 59    | Image/video/carousel campaigns, creative fatigue detection, audience targeting, placement optimization                |
| **TikTok Ads**   | 37    | In-feed campaigns, asset validation, performance tracking                                                             |
| **ChatGPT Ads**  | 36    | Pay-per-click chat-card ads inside ChatGPT responses, launch orchestrator, conversions (pixel + CAPI); created paused |

The plugin also brings five skills — campaign management, brand workspace setup, performance review, ad copy, and wasted spend. You don't need to name them; describe what you want and Codex picks the right one. The [skill reference](/docs/ai-clients/codex#available-skills) is on the terminal page.

## Example Prompts

### First Look at Your Accounts

<Prompt description="Connection check plus a performance summary — sets up the brand workspace if this is a fresh folder." actions={["copy"]}>
  Check connected ad platforms and summarize recent campaign performance for this brand.
  If this is a new workspace, set it up first.
</Prompt>

### Find Wasted Spend

<Prompt description="Cross-platform wasted spend audit with a prioritized fix list." actions={["copy"]}>
  Find wasted ad spend across all my active campaigns and give me a prioritized list of fixes.
</Prompt>

### Write Ad Copy in Your Brand Voice

<Prompt description="Headlines and descriptions from real campaign data and your brand docs." actions={["copy"]}>
  Write 3 Google Ads headlines and 2 descriptions for my top campaign using my brand voice.
</Prompt>

### Create a Campaign

<Prompt description="Google Search campaign with keyword research and intent grouping. Created paused." actions={["copy"]}>
  Create a Google Ads search campaign for my SaaS product:

  * Product: project management tool for remote teams
  * Budget: \$60/day
  * Research keywords first, then group by intent
</Prompt>

## Troubleshooting

| Problem                                            | Solution                                                                                                                         |
| -------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- |
| ChatGPT explains the command instead of running it | You're in ChatGPT, not Codex. Switch with the top-left dropdown and send it again in a Codex chat.                               |
| Codex asks for permission to run a command         | Approve it. The marketplace and install steps run `codex` commands on your machine.                                              |
| No browser window opened for sign-in               | Send `help me oauth it` again, or ask Codex to run `codex mcp login adspirer`.                                                   |
| Plugin installed but Adspirer tools don't respond  | Click **New chat**. The plugin loads in the next task, not the one where you installed it.                                       |
| "No ad platforms connected"                        | Connect them at [adspirer.ai/connections](https://adspirer.ai/connections), then ask again.                                      |
| Marketplace add fails with a git error             | The plugin is fetched from GitHub. On macOS, accept the prompt to install command line developer tools, then resend the message. |

## FAQ

<AccordionGroup>
  <Accordion title="Do I need to install the Codex CLI separately?">
    No. Codex is built into the ChatGPT desktop app. The three messages above are all the setup there is — Codex runs the underlying commands for you.
  </Accordion>

  <Accordion title="Is this the same plugin as the terminal install?">
    Yes. Both install `adspirer-ads-agent` from the Adspirer marketplace: the same 400+ tools, the same five skills, the same brand-workspace behavior. If you later want scheduled, autonomous runs, follow the [Codex Terminal guide](/docs/ai-clients/codex) — your Adspirer sign-in carries over.
  </Accordion>

  <Accordion title="Can I also use the Adspirer app in ChatGPT itself?">
    Yes. The [ChatGPT app](/docs/ai-clients/chatgpt) and Codex Desktop use the same Adspirer account and the same tool-call quota. Use ChatGPT for quick questions and interactive dashboards; use Codex when you want the agent to work through a multi-step task in your folder.
  </Accordion>

  <Accordion title="What does Codex do with the folder I pick?">
    It treats the folder as your brand workspace. On first use the plugin scans it for brand docs — guidelines, media plans, briefs — pulls live campaign data, and writes an `AGENTS.md` with what it learned, so later chats start with context. An empty folder works too; the agent builds the workspace from your ad accounts.
  </Accordion>

  <Accordion title="Can the agent spend money on its own?">
    No. Every campaign is created **paused**, and budget changes need your confirmation. The agent analyzes, recommends, and drafts — you approve spend.
  </Accordion>

  <Accordion title="How much does this cost?">
    Adspirer pricing is based on tool calls, not ad spend. Free tier: 15 calls/month. Plus: $49/mo for 150 calls. Pro: $99/mo for 600 calls. Max: \$199/mo for 3,000 calls. See [full pricing](https://www.adspirer.com/pricing).
  </Accordion>
</AccordionGroup>

## Related Documentation

* [Codex Terminal Setup](/docs/ai-clients/codex) — CLI install, scheduled runs, and agent configuration
* [Codex Agent](/docs/agent-skills/codex-agent) — How the Adspirer marketing agent works inside Codex
* [ChatGPT Setup](/docs/ai-clients/chatgpt) — The Adspirer app in ChatGPT
* [Google Ads Integration](/docs/ad-platforms/google-ads) — Full Google Ads tool reference
* [Pricing & Plans](https://www.adspirer.com/pricing)
* [Prompt Engineering Playbook](/docs/agent-skills/prompt-engineering-playbook) — A custom skill and prompt book generated from your own ad account (\$39 one-time)
