Ads MCP for Snapchat
An MCP server that runs on your own computer, and lets an AI assistant (Claude Code, Claude Desktop and other MCP clients) work with your own Snapchat ad account: read performance, audit campaigns, and make careful, reviewable changes. It also turns creators' ad codes into paused ads. There is also a hosted private test that needs no install (see Hosted version).
Unofficial. Not affiliated with or endorsed by Snap Inc. This tool can change real ad campaigns that spend real money. You use it at your own risk (see LICENSE). Check Snap's developer terms for your own use. Review every preview before approving.
Get started in 2 minutes
Claude Desktop (no terminal): download ads-mcp-for-snapchat-<version>.mcpb from the latest release, open it, leave Client ID and secret empty, then ask Claude: "Connect my Snapchat ad account." Log in with Snapchat and pick the ad account. In the Desktop extension, changes are allowed from the start (Read-only is off by default): each one is previewed and needs your approval, everything created starts paused, and the daily budget limit starts at 500 (change it in the extension's settings). Switch Read-only on there if you only want to look. It also starts with the core tool set (55 everyday tools); type all in its Tool set field to see all 81.
Claude Code, Cursor, VS Code or a terminal:
npx -y ads-mcp-for-snapchat setup
Choose 1. Shared login, log in with Snapchat, pick the ad account, and press Enter at the safety question (it starts read-only; nothing can be changed until you allow it). Then check everything with npx -y ads-mcp-for-snapchat verify.
How this relates to Snap's own Ads MCP server
Snap runs its own hosted Ads MCP server (see Snap's developer documentation). According to Snap's documentation it is read-only: an agent can read Snapchat Ads data but cannot create, update or delete anything, and it works with several AI apps without installing anything.
- Only need to look at your numbers? Snap's own server is the simplest way, and you don't have to install anything.
- Want to launch and change campaigns? That is what this project is for: you can create campaigns, ad squads, creatives and ads and change budgets, bids, schedules and placements, with a preview and your approval for every change, spend limits, undo and a change log, and everything created starts paused. Turn on changes with
SNAP_READ_ONLY=0 (the safe default starts read-only; it is a switch, not a limit).
- You can use both side by side.
This project is unofficial and is not made, endorsed or supported by Snap. It runs on your own computer; it is not the hosted service Snap provides.
What it is, and what it is not
- The local version runs on your machine, with your own ad account. You connect with a normal Snapchat login (the shared login service) or with your own Snapchat OAuth app. No ad account data leaves your computer except to Snap's API.
- It is a safety-first tool, not an autopilot. Writes are previewed first, created things start paused, and there are hard limits on money. See "Safety rules" below, and read "What the approval token is not".
- The local version is not a public service. Do not expose it on the internet. For apps that only accept remote MCP servers there is the separate, invitation-only hosted test; ChatGPT is not tested yet.
- Money limits are in your account's currency. Defaults (
SNAP_MAX_DAILY_BUDGET=1000, SNAP_MAX_BID=50) are deliberately conservative; set your own in .env.
Snap's terms and data
- This project is not Snap's official Ads MCP server and is not endorsed by Snap Inc. "Snapchat" is a trademark of Snap Inc.; it is used here only to say which API this tool works with.
- Using the Snapchat Marketing API means accepting Snap's Developer Terms and Business Tools Terms. Read them yourself; they include duties on how long Snap data may be kept and how it must be protected.
- This server keeps data only on your machine: the change log (
changes.log.jsonl or <settings file>.log.jsonl) and anything you export to exports/. You are responsible for keeping and deleting those files in line with Snap's terms.
- Data that comes back from the API (names, review reasons) is shown to your AI assistant. Treat it as untrusted input, and keep your client's approval prompt on for write tools.
Ad formats
- Goals for link ads:
snap_create_adsquad takes goal: purchase, add to cart, page view or sign-up (need a pixel), or traffic (SWIPES), awareness (IMPRESSIONS) and video views (no pixel needed). App installs and lead generation are not built.
- Single Snap with a link (WEB_VIEW):
snap_create_creative, then snap_create_ad.
- Single Snap, no link (image or video):
snap_create_creative with creative_type: "SNAP_AD".
- Story Ad: create the Snaps first (any of the two above), then
snap_create_story_creative with their ids in order. Add preview (a 3:5 PNG tile, at least 360x600 px, and a headline of up to 55 characters) to also show it in the Stories tab.
- Catalog ad (Dynamic Product Ads):
snap_create_campaign with catalog_id (SALES objective), then snap_create_product_set (and snap_create_dynamic_template if you have none), then snap_create_adsquad with product_set_id and dpa_mode (retargeting: viewed or added to cart but did not buy; prospecting: has not interacted), then snap_create_creative with creative_type: "DYNAMIC_PRODUCT", then snap_create_ad. The ad squad and the creative must use the same product set, which the tools check. The catalog and its product feed are set up in Ads Manager or Business Manager.
- Collection Ad: upload a main image or video and one square image per product (1:1, at least 120x120 px; checked in the preview), then
snap_create_collection_creative with 4-20 products, each with its own https page.
In every case snap_create_ad picks the matching ad type (REMOTE_WEBPAGE, SNAP_AD, STORY or COLLECTION) and the ad starts PAUSED. Creatives never deliver on their own. Find media already in the account with snap_list_media, or upload with snap_upload_media and wait until snap_get_media says READY.
Check that everything works on your account
npx -y ads-mcp-for-snapchat verify (or node src/cli.js verify in a git checkout; add --details to also list the specific problems it found: broken links, pixel issues, feed errors, audience problems, rejected ads) runs every read-only tool on your real account, one by one, and prints a short list: what worked, what failed and why, what was skipped (and which setting it needs). It changes nothing: it only calls tools that declare themselves read-only and forces read-only mode. The output contains no tokens and only shortened ids, so it is safe to paste into an issue.
Easiest: log in with Snapchat (no OAuth app)
Run npx -y ads-mcp-for-snapchat setup and choose 1. Shared login, or install the Claude Desktop file, leave Client ID and secret empty, and ask Claude: "Connect my Snapchat ad account." You log in with Snapchat in your browser and pick your ad account. No OAuth app to create.
How it works: a small login service (broker/, code in this repository) passes your login along and stores nothing, and your access is sealed so only your own computer can read it. Read PRIVACY.md first. The tool itself still runs only on your computer.
Status: new. It works end to end on the maintainer's real login and ad accounts, but Snap has not yet been asked to confirm that one shared app may serve other advertisers. If the login is refused for you, or you prefer not to rely on a shared service, use your own Snapchat app (next section: about 5 minutes, and setup walks you through it) or run your own copy of the service (broker/README.md).
Easy setup (about 5 minutes)
First, once: in Snap Business Manager open Business Details > OAuth Apps > + OAuth App, use the Redirect URI https://127.0.0.1/callback, and copy the Client ID and Client Secret (the secret is shown only once).
Claude Desktop (no terminal):
- Download
ads-mcp-for-snapchat-<version>.mcpb from the latest release and double-click it. Claude Desktop shows an install screen.
- Enter the Client ID and Client Secret, your highest daily budget and (optional) your main country. Read-only is off by default, so changes are allowed: each one is previewed and needs your approval, and everything created starts paused. Switch it on if you only want to look.
- In a chat, ask: "Connect my Snapchat ad account." Claude gives you a link; approve in the browser, paste back the address it lands on, and pick your ad account from the list.
- Quit and reopen Claude Desktop. Ask: "call snap_ping".
Claude Code, Cursor, VS Code (one command, needs Node 18+):
npx -y ads-mcp-for-snapchat setup
It asks for the Client ID and secret (hidden), opens the approval page, lists your ad accounts to choose from, asks for your first safety settings, and adds the server to Claude Code. For Cursor, VS Code or Claude Desktop it prints the exact settings to paste. Another ad account: npx -y ads-mcp-for-snapchat setup --file ~/.ads-mcp-for-snapchat/.env.account2.
Settings, the change log and exports live in ~/.ads-mcp-for-snapchat/, outside the package, so updates never touch them. npx -y ads-mcp-for-snapchat help lists the other commands (check, where, weekly-report, and the step-by-step init, save-secret, auth). It is also listed in the official MCP Registry as io.github.Usame794/ads-mcp-for-snapchat.
Quick start (from source)
git clone this repository, then npm ci, then npm test (all tests are mocked and need no account).
- Create a Snapchat OAuth app and connect it to your account: follow Setup (one time) below (about 10 minutes).
- Copy the safety and market settings from
.env.example into .env and set your limits, SNAP_DEFAULT_COUNTRY, SNAP_ACCOUNT_CURRENCY and SNAP_REPORT_UTC_OFFSET.
- Start with
SNAP_READ_ONLY=1: connect your MCP client, try snap_ping, a report, and a few previews, and compare the numbers with Ads Manager. Remove the setting when you are comfortable.
- Keep your client's permission prompt on for write tools.
Hosted version
A second way to use the same tools with nothing to install: a connector you add in an AI app by address, running on Cloudflare, at https://ads-mcp-remote.ads-mcp.workers.dev/mcp. Be aware of its status: it is run by one independent maintainer on a free plan, it is unofficial, it has not had an independent security review, and Snap has not confirmed that one shared app may serve other advertisers (if Snap objects, it can stop working for everyone; the local version with your own Snapchat app always works). Read the service's /terms and /privacy pages before signing in. The operator can restrict who signs in, can block a person, and can switch changes off for everyone at once.
What it does:
- You add the connector, sign in with Snapchat, and choose which ad account to use (
snap_connect).
- Read-only unless you tick "allow changes" on the consent page. With changes allowed you get the same safety rules as the local version: everything created is paused, every change is previewed first with an approval code that works once for exactly that request, spending limits apply, and the change log lives in your own private database.
- Each person gets a separate private database.
snap_disconnect deletes everything stored about you; also revoke the app in Snapchat Business Manager.
- Interactive cards (below) are shown in Claude with this version.
- Works with apps that support remote MCP servers with sign-in (OAuth with dynamic registration, which is what this server offers). It has been tested with Claude only. ChatGPT's custom connectors use the same standard, but it has not been tested there, and what ChatGPT allows depends on your plan.
What is stored, honestly: your Snapchat refresh token (encrypted) so the service can act for you, a change log, and your settings. The operator of the service holds the keys and could decrypt the token, so sign in only if you trust the operator. The page /privacy of the service says the same.
Limits that exist: sign-in endpoints are rate-limited per IP address, a person's tool calls are limited to 120 a minute, and each person's logs keep 90 days (at most 20,000 lines per log). Known gaps: not independently reviewed, the free Cloudflare plan's own limits cap how many people it can serve, and a few local-only tools (folder uploads, clipboard, customer-list files) do not work there. Code and design: remote/README.md and remote/DESIGN.md. It is not part of the npm package.
Safety rules (built in)
- Every write tool works in two steps.
confirm=false (the default) returns a preview and a single-use approval_token. To apply, the same arguments are sent again with confirm=true and that token. The token is bound to the tool, the ad account, the arguments and the state of the items at preview time: if anything changed, or the token is reused, expired or from another request, nothing is sent.
- Everything that creates something (copies, clones, new ads, new creatives) is created PAUSED. Enabling is a separate step, and its preview shows the daily budget that would really start delivering (for a campaign: the budgets of its ACTIVE ad squads).
- Absolute limits, in account currency, apply to every path that can raise money (set, bulk, create, copy, undo, enable): see the table below. On top of them, a budget may rise at most +100% and a bid +50% per step and per 24 hours (counted from this server's change log), so repeating a step does not compound.
- Writes only touch items of the configured
SNAP_AD_ACCOUNT_ID. Ids are validated before they are used.
- The only delete tool is
snap_delete, behind many guards. Status can only be ACTIVE or PAUSED.
- Every write is recorded in
changes.log.jsonl: an intent record before anything is sent (if it cannot be written, the operation does not run) and a result record after, with tool, account, target ids, redacted arguments, and before/after values for edits. Credentials are never logged; ad codes are masked.
- Multi-step creates (copy, influencer flow) stop at the first failure and report exactly what was already created. A write that fails in transit is never re-sent; it is reported as "outcome unknown".
- Safety settings are validated when the server starts. An invalid value (for example
100%) stops the server instead of switching the limit off. Limits and the target account are fixed until restart; only the OAuth credentials are re-read from .env.
What the approval token is not
The token proves that this exact change was previewed and that nothing moved since. It does not prove that a person looked at it: the AI client receives the token and can send it back by itself. Human authorization is the permission prompt of your MCP client, so do not auto-approve the write tools. Tools are annotated (readOnlyHint, destructiveHint) so a client can auto-allow reads only. SNAP_READ_ONLY=1 turns every write off.
Asking you directly (SNAP_HUMAN_APPROVAL=elicit)
With this setting the server asks you, through the MCP client's own dialog (MCP elicitation), before every write, and refuses when it cannot ask. The question and your answer do not pass through the model. For anything that adds spend, for deletes and for undo, you must also type a 4-digit code that only the dialog shows. Limits you should know: