Skip to main content
Glama
Get MCP Ads Engine

Get MCP Ads Engine

by get-mcp-ads
README.md
<p align="center">
  <a href="https://www.getmcpads.com/?utm_source=github&utm_medium=readme&utm_campaign=engine">
    <picture>
      <source media="(prefers-color-scheme: dark)" srcset=".github/assets/banner-dark.png">
      <img alt="Get MCP Ads Engine: your ad accounts, in your AI assistant" src=".github/assets/banner-light.png" width="100%">
    </picture>
  </a>
</p>

<p align="center">
  <a href="LICENSE"><img alt="License: AGPL-3.0" src="https://img.shields.io/badge/license-AGPL--3.0-blue.svg"></a>
  <img alt="Model Context Protocol" src="https://img.shields.io/badge/MCP-server-black.svg">
  <img alt="17 platforms" src="https://img.shields.io/badge/platforms-17-black.svg">
  <img alt="945 tools" src="https://img.shields.io/badge/tools-945-black.svg">
</p>

<p align="center">
  <strong>One MCP server for your ad platforms.</strong><br>
  Connect your ad accounts once, then report, analyze, launch and change campaigns from Claude, ChatGPT, Cursor or any MCP client.<br>
  Use <a href="https://www.getmcpads.com/?utm_source=github&utm_medium=readme&utm_campaign=engine">Get MCP Ads Cloud</a> for a managed experience, or run this engine on your own infrastructure.
</p>

<p align="center">
  <a href="https://www.getmcpads.com/?utm_source=github&utm_medium=readme&utm_campaign=engine"><strong>Get MCP Ads Cloud</strong></a>
  ·
  <a href="https://www.getmcpads.com/docs"><strong>Docs</strong></a>
  ·
  <a href="#quick-start"><strong>Self-host</strong></a>
  ·
  <a href="https://www.getmcpads.com/tools"><strong>Tool catalog</strong></a>
  ·
  <a href="https://www.getmcpads.com/changelog"><strong>Changelog</strong></a>
</p>

<br>

<p align="center"><strong>Connect your ad accounts</strong></p>
<p align="center">
  <a href="https://www.getmcpads.com/tools/meta-ads" title="Meta Ads"><img alt="Meta Ads" src="https://www.getmcpads.com/home/assets/meta.svg" width="32"></a>&nbsp;
  <a href="https://www.getmcpads.com/tools/google-ads" title="Google Ads"><img alt="Google Ads" src="https://www.getmcpads.com/home/assets/google-ads.svg" width="32"></a>&nbsp;
  <a href="https://www.getmcpads.com/tools/ga4" title="Google Analytics 4"><img alt="Google Analytics 4" src="https://www.getmcpads.com/home/assets/ga4.svg" width="32"></a>&nbsp;
  <a href="https://www.getmcpads.com/tools/search-console" title="Search Console"><img alt="Search Console" src="https://www.getmcpads.com/home/assets/search-console.svg" width="32"></a>&nbsp;
  <a href="https://www.getmcpads.com/tools/tiktok-ads" title="TikTok Ads"><img alt="TikTok Ads" src="https://www.getmcpads.com/home/assets/tiktok.svg" width="32"></a>&nbsp;
  <a href="https://www.getmcpads.com/tools/pinterest-ads" title="Pinterest Ads"><img alt="Pinterest Ads" src="https://www.getmcpads.com/home/assets/pinterest.svg" width="32"></a>&nbsp;
  <a href="https://www.getmcpads.com/tools/linkedin-ads" title="LinkedIn Ads"><img alt="LinkedIn Ads" src="https://www.getmcpads.com/home/assets/linkedin.svg" width="32"></a>&nbsp;
  <a href="https://www.getmcpads.com/tools/bing-ads" title="Microsoft Advertising"><img alt="Microsoft Advertising" src="https://www.getmcpads.com/home/assets/microsoft.svg" width="32"></a>&nbsp;
  <a href="https://www.getmcpads.com/tools/reddit-ads" title="Reddit Ads"><img alt="Reddit Ads" src="https://www.getmcpads.com/home/assets/reddit.svg" width="32"></a>&nbsp;
  <a href="https://www.getmcpads.com/tools/snapchat-ads" title="Snapchat Ads"><img alt="Snapchat Ads" src="https://www.getmcpads.com/home/assets/snapchat.svg" width="32"></a>&nbsp;
  <a href="https://www.getmcpads.com/tools/amazon-ads" title="Amazon Ads"><picture><source media="(prefers-color-scheme: dark)" srcset="https://www.getmcpads.com/home/assets/amazon-ads-dark.svg"><img alt="Amazon Ads" src="https://www.getmcpads.com/home/assets/amazon-ads.svg" width="32"></picture></a>&nbsp;
  <a href="https://www.getmcpads.com/tools/apple-ads" title="Apple Ads"><picture><source media="(prefers-color-scheme: dark)" srcset="https://www.getmcpads.com/home/assets/apple-ads-dark.svg"><img alt="Apple Ads" src="https://www.getmcpads.com/home/assets/apple-ads.svg" width="32"></picture></a>&nbsp;
  <a href="https://www.getmcpads.com/tools/chatgpt-ads" title="ChatGPT Ads"><picture><source media="(prefers-color-scheme: dark)" srcset="https://www.getmcpads.com/home/assets/chatgpt-dark.svg"><img alt="ChatGPT Ads" src="https://www.getmcpads.com/home/assets/chatgpt.svg" width="32"></picture></a>&nbsp;
  <a href="https://www.getmcpads.com/tools/rtb-house" title="RTB House"><img alt="RTB House" src="https://www.getmcpads.com/home/assets/rtb-house.svg" width="32"></a>&nbsp;
  <a href="https://www.getmcpads.com/tools/adjust" title="Adjust"><img alt="Adjust" src="https://www.getmcpads.com/home/assets/adjust.svg" width="32"></a>
</p>
<p align="center">
  <sub>Also <a href="https://www.getmcpads.com/tools/x-ads">X Ads</a> and Shopify.</sub>
</p>

<p align="center"><strong>Use them from your AI assistant</strong></p>
<p align="center">
  <a href="https://www.getmcpads.com/assistants/claude" title="Claude"><img alt="Claude" src="https://www.getmcpads.com/home/assets/claude.svg" width="32"></a>&nbsp;
  <a href="https://www.getmcpads.com/assistants/chatgpt" title="ChatGPT"><picture><source media="(prefers-color-scheme: dark)" srcset="https://www.getmcpads.com/home/assets/chatgpt-dark.svg"><img alt="ChatGPT" src="https://www.getmcpads.com/home/assets/chatgpt.svg" width="32"></picture></a>&nbsp;
  <a href="https://www.getmcpads.com/assistants/claude-code" title="Claude Code"><img alt="Claude Code" src="https://www.getmcpads.com/home/assets/claude-code.svg" width="32"></a>&nbsp;
  <a href="https://www.getmcpads.com/assistants/codex" title="Codex"><picture><source media="(prefers-color-scheme: dark)" srcset=".github/assets/logos/codex-dark.svg"><img alt="Codex" src="https://www.getmcpads.com/home/assets/codex.svg" width="32"></picture></a>&nbsp;
  <a href="https://www.getmcpads.com/assistants/cursor" title="Cursor"><picture><source media="(prefers-color-scheme: dark)" srcset=".github/assets/logos/cursor-dark.svg"><img alt="Cursor" src="https://www.getmcpads.com/home/assets/cursor.svg" width="32"></picture></a>&nbsp;
  <a href="https://www.getmcpads.com/assistants/gemini" title="Gemini"><img alt="Gemini" src="https://www.getmcpads.com/home/assets/gemini.svg" width="32"></a>&nbsp;
  <a href="https://www.getmcpads.com/assistants/muse" title="Muse"><img alt="Muse" src="https://www.getmcpads.com/home/assets/muse.svg" width="32"></a>&nbsp;
  <a href="https://www.getmcpads.com/assistants/hermes" title="Hermes Agent"><picture><source media="(prefers-color-scheme: dark)" srcset=".github/assets/logos/hermes-dark.svg"><img alt="Hermes Agent" src="https://www.getmcpads.com/home/assets/hermes.svg" width="32"></picture></a>&nbsp;
  <a href="https://www.getmcpads.com/assistants/openclaw" title="OpenClaw"><img alt="OpenClaw" src="https://www.getmcpads.com/home/assets/openclaw.svg" width="32"></a>
</p>

<br>

## What you can do

<a href="https://www.getmcpads.com/use-cases/ad-reporting"><img alt="Every account in one conversation" src=".github/assets/feature-reporting.png" width="100%"></a>

**Reporting across every account.** Ask for spend, results and trends on any connected account, with each platform's native metrics and breakdowns. [Ad reporting](https://www.getmcpads.com/use-cases/ad-reporting) · [Bulk edits](https://www.getmcpads.com/use-cases/bulk-edits)

<a href="https://www.getmcpads.com/use-cases/bulk-ads"><img alt="Launch campaigns on every platform" src=".github/assets/feature-launcher.png" width="100%"></a>

**Campaign launcher.** Build campaigns on several platforms at once from a brief and your media. Everything is created paused, and every change is previewed before it runs. [Bulk ads](https://www.getmcpads.com/use-cases/bulk-ads) · [Media plans](https://www.getmcpads.com/use-cases/media-plans)

<a href="https://www.getmcpads.com/use-cases/creative-analytics"><img alt="See which creatives win" src=".github/assets/feature-creatives.png" width="100%"></a>

**Creatives.** Galleries, performance, trends, shareable creative reviews and ad rotation. [Creative analytics](https://www.getmcpads.com/use-cases/creative-analytics)

<a href="https://www.getmcpads.com/use-cases/ads-to-google-sheets"><img alt="Live Google Sheets" src=".github/assets/feature-sheets.png" width="100%"></a>

**Google Sheets and data API.** Export any report to Google Sheets with scheduled refresh, or read it from the data API and the Looker Studio connector. [Ads to Google Sheets](https://www.getmcpads.com/use-cases/ads-to-google-sheets)

**And also**

| | |
|---|---|
| [Alerts](https://www.getmcpads.com/use-cases/ad-alerts) | Spend and performance alerts, emailed through your own SMTP server |
| [Client memory](https://www.getmcpads.com/use-cases/client-memory) | Goals, rules and events per client, shared by every assistant and teammate |
| [Naming conventions](https://www.getmcpads.com/use-cases/naming-conventions) | Check campaign names against your convention and fix them in bulk |
| [Landing page analysis](https://www.getmcpads.com/use-cases/landing-page-analysis) | Review the pages your ads send traffic to |
| Teams and workspaces | Roles, invite links and one workspace per client |
| MCP Apps | Interactive cards inside ChatGPT and Claude: cockpit, launcher, media plan, galleries |

The engine ships **824 platform tools** (reads and writes across the 17 platforms) and **121 workflow tools**. Browse them in the [tool catalog](https://www.getmcpads.com/tools) and the [docs](https://www.getmcpads.com/docs/sources).

## Cloud or self-hosted

<img alt="Get MCP Ads Cloud and the self-hosted engine" src=".github/assets/self-hosted-vs-cloud.png" width="100%">

Both run the same engine. We do not gate features in the open-source edition.

| | Get MCP Ads Cloud | Self-hosted engine |
|---|---|---|
| Cost | 7-day trial for $0, then paid plans | Free (AGPL-3.0), you pay for your infrastructure |
| Setup | Sign up and connect accounts in minutes | Deploy the dashboard, two Cloudflare Workers and Postgres |
| Platform apps | Approved apps for every platform, ready to use | You create your own developer app on each platform and go through its review |
| Limits | Per plan | None: unlimited accounts, workspaces and team members |
| AI assistants | Listed connector in ChatGPT, Claude and other directories | Custom connector pointing at your instance, or the listed connector through "Use self-hosted" (coming soon) |
| Updates, uptime, backups | Managed | Your responsibility |
| Support | By email | Community, through GitHub issues |

Platform approvals are the slow part of self-hosting. Google Ads needs a developer token with Basic or Standard access, Meta needs App Review for `ads_management`, LinkedIn needs the Advertising API, and Pinterest needs Standard access for production accounts. Adjust, RTB House and ChatGPT Ads work with credentials you paste in the dashboard.

## Architecture

| Part | Path | Runs on |
|---|---|---|
| Dashboard: sign-in, source connections, account selection, MCP consent, team | `apps/web` | Any Node.js host (`next build`, `next start`) |
| MCP server: OAuth for MCP clients, tools, launcher, MCP Apps | `apps/mcp` | Cloudflare Workers, with R2 and Queues |
| Data worker: exports, data API, alerts, scheduled jobs | `apps/data` | Cloudflare Workers, with R2, Queues and Workflows |
| Database schema, tokens, shared logic | `packages/db`, `packages/data` | Library |
| Looker Studio connector | `connectors/looker-studio` | Google Apps Script |

The three apps share one Postgres database and one `TOKEN_ENCRYPTION_KEY`. Platform tokens are encrypted with AES-256-GCM before they are stored.

## Quick start

Requirements: Node.js 22 or newer, pnpm 10, a Postgres database, a Cloudflare account.

1. Install dependencies.

   ```bash
   pnpm install
   ```

2. Generate the secrets and keep them somewhere safe. Losing `TOKEN_ENCRYPTION_KEY` means reconnecting every account.

   ```bash
   pnpm secrets
   ```

3. Create the database schema.

   ```bash
   DATABASE_URL=postgresql://user:password@host:5432/getmcpads pnpm db:migrate
   ```

4. Configure and deploy the Workers. Set the public URLs in `apps/mcp/wrangler.toml` and `apps/data/wrangler.toml`, create the R2 buckets and queues they reference, then add the secrets:

   ```bash
   cd apps/mcp
   npx wrangler secret put DATABASE_URL
   npx wrangler secret put TOKEN_ENCRYPTION_KEY
   npx wrangler secret put DATA_INTERNAL_SECRET
   npx wrangler secret put OIDC_SIGNING_JWK
   ```

   Do the same in `apps/data` for `DATABASE_URL`, `TOKEN_ENCRYPTION_KEY` and `DATA_INTERNAL_SECRET`, add the platform credentials you use, then run `pnpm deploy:workers`. The two Workers call each other through service bindings.

   The Workers open a direct Postgres connection, so the database must be reachable from Cloudflare (a public host with TLS, or a Cloudflare Hyperdrive connection string). A Neon database is also supported over its HTTP driver; set `DB_DRIVER=neon` or `DB_DRIVER=pg` to force a driver.

5. Run the dashboard. Copy `apps/web/.env.example` to `apps/web/.env.local`, fill it in, then:

   ```bash
   pnpm build
   pnpm start
   ```

   The first account you create becomes the owner. Further sign-ups need an invite link, or `ALLOW_REGISTRATION=true`.

6. Connect your ad accounts in the dashboard, then add the MCP URL (`MCP_PUBLIC_URL`) to your assistant as a custom connector. The setup guides for [Claude](https://www.getmcpads.com/guides/setup/claude), [ChatGPT](https://www.getmcpads.com/guides/setup/chatgpt), [Claude Code](https://www.getmcpads.com/guides/setup/claude-code), [Codex](https://www.getmcpads.com/guides/setup/codex) and [Cursor](https://www.getmcpads.com/guides/setup/cursor) apply, with your own URL.

## Platform credentials

Each platform reads its own variables, for example `ADS_META_CLIENT_ID` and `ADS_META_CLIENT_SECRET`, or `ADS_GOOGLE_CLIENT_ID`, `ADS_GOOGLE_CLIENT_SECRET` and `ADS_GOOGLE_DEVELOPER_TOKEN`. The full list is in `apps/web/.env.example`. Set the same values on the dashboard and on the Workers. Every OAuth app must allow the redirect URL `<APP_BASE_URL>/oauth/<platform>/callback`, for example `https://app.example.com/oauth/meta_ads/callback`.

| Platform | Tool reference |
|---|---|
| Meta Ads | [docs/sources/meta-ads](https://www.getmcpads.com/docs/sources/meta-ads) |
| Google Ads | [docs/sources/google-ads](https://www.getmcpads.com/docs/sources/google-ads) |
| Google Analytics 4 | [docs/sources/ga4](https://www.getmcpads.com/docs/sources/ga4) |
| Search Console | [docs/sources/search-console](https://www.getmcpads.com/docs/sources/search-console) |
| TikTok Ads | [docs/sources/tiktok-ads](https://www.getmcpads.com/docs/sources/tiktok-ads) |
| Pinterest Ads | [docs/sources/pinterest-ads](https://www.getmcpads.com/docs/sources/pinterest-ads) |
| LinkedIn Ads | [docs/sources/linkedin-ads](https://www.getmcpads.com/docs/sources/linkedin-ads) |
| Microsoft Advertising | [docs/sources/bing-ads](https://www.getmcpads.com/docs/sources/bing-ads) |
| Reddit Ads | [docs/sources/reddit-ads](https://www.getmcpads.com/docs/sources/reddit-ads) |
| Snapchat Ads | [docs/sources/snapchat-ads](https://www.getmcpads.com/docs/sources/snapchat-ads) |
| X Ads | [docs/sources/x-ads](https://www.getmcpads.com/docs/sources/x-ads) |
| Amazon Ads | [docs/sources/amazon-ads](https://www.getmcpads.com/docs/sources/amazon-ads) |
| Apple Ads | [docs/sources/apple-ads](https://www.getmcpads.com/docs/sources/apple-ads) |
| ChatGPT Ads | [docs/sources/chatgpt-ads](https://www.getmcpads.com/docs/sources/chatgpt-ads) |
| RTB House | [docs/sources/rtb-house](https://www.getmcpads.com/docs/sources/rtb-house) |
| Adjust | [docs/sources/adjust](https://www.getmcpads.com/docs/sources/adjust) |

## Email (optional)

Email is only used for alert emails. Everything else works without it, and alerts simply cannot be activated until it is set up. Bring your own SMTP server: on the dashboard, set `SMTP_URL` (for example `smtps://user:password@smtp.example.com:465`), or `SMTP_HOST`, `SMTP_PORT`, `SMTP_USER` and `SMTP_PASSWORD`, plus `EMAIL_FROM`. Then set `EMAIL_DELIVERY_ENABLED = "true"` in `apps/data/wrangler.toml` and redeploy the data worker. The worker hands each alert to the dashboard, which sends it through your SMTP server.

## Development

```bash
pnpm typecheck
pnpm test
```

### Database tests

Suites that need PostgreSQL are skipped by `pnpm test`. To run them, create a disposable local database whose name ends with `_test`, then point `DATABASE_URL_TEST` at it:

```bash
createdb getmcpads_engine_test
DATABASE_URL_TEST=postgresql://localhost:5432/getmcpads_engine_test pnpm test:db
```

`pnpm test:db` applies the migrations, then runs every package's tests with the database. It also sets `LAUNCHER_DATABASE_URL_TEST`, `RATE_DATABASE_URL_TEST` and `ORG_PROVISIONING_DATABASE_URL_TEST`, which a few suites read, to the same URL unless you set them yourself. The suites write to this database, so never use a shared or production one. Drop it with `dropdb getmcpads_engine_test` when you are done.

## Contributing

Issues and pull requests are welcome. Read [CONTRIBUTING.md](CONTRIBUTING.md) first: every contributor signs the [Contributor License Agreement](ICLA.md) once. Report security issues privately as described in [SECURITY.md](SECURITY.md).

## License

The code is licensed under the [GNU Affero General Public License v3.0](LICENSE). If you run a modified version as a network service, you must publish your changes under the same license.

"Get MCP Ads" and its logo are trademarks of GetMCPAds and are not covered by the license. See [NOTICE](NOTICE). Ad platform and AI assistant names and logos belong to their owners and only identify the services this software connects to.