ads-mcp-for-snapchat 0.9.3 → 0.9.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +9 -0
- package/PRIVACY.md +2 -0
- package/README.md +11 -2
- package/SECURITY.md +1 -1
- package/package.json +1 -1
- package/src/index.js +1 -1
- package/src/setup.js +14 -3
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
## Unreleased
|
|
4
4
|
|
|
5
|
+
## 0.9.4 (2026-11-16)
|
|
6
|
+
|
|
7
|
+
- Claude Desktop extension: an icon, a link to the privacy page, and the corrected description (the shared login needs no OAuth app).
|
|
8
|
+
|
|
9
|
+
- `setup` asks less: a single ad account is chosen automatically, and one question ("use the safe defaults?", Enter = yes) replaces the budget, country and read-only questions. Answer n to get them back.
|
|
10
|
+
- README: a "Get started in 2 minutes" section at the top; the first section no longer says an OAuth app is required.
|
|
11
|
+
|
|
12
|
+
- Docs: PRIVACY.md and SECURITY.md name the default login service address and how to turn it off; the Claude Desktop extension description no longer says an OAuth app is required.
|
|
13
|
+
|
|
5
14
|
## 0.9.3 (2026-11-16)
|
|
6
15
|
|
|
7
16
|
- **Shared login is live.** The login service is deployed and the package uses it by default (`npx -y ads-mcp-for-snapchat setup`, choose 1). Verified on a real Snapchat login: login, account list, saving the access, renewing it through the service, and `verify` (20 of 24 checks ran; the rest need optional settings). Snap has not yet been asked to confirm a shared app for other advertisers; own-app setup still works.
|
package/PRIVACY.md
CHANGED
|
@@ -8,6 +8,8 @@ Ads MCP for Snapchat is open-source software that runs **on your own computer**.
|
|
|
8
8
|
- Your AI app (for example Claude) sees the data the tool returns, under that app's own terms.
|
|
9
9
|
|
|
10
10
|
## The shared login service (optional)
|
|
11
|
+
The default service is at `https://ads-mcp-for-snapchat-login.ads-mcp.workers.dev`. It is run by the maintainer of this project on Cloudflare Workers; the code it runs is `broker/worker.js` in this repository. Set `SNAP_BROKER_URL=off` to turn it off, or point `SNAP_BROKER_URL` at your own copy.
|
|
12
|
+
|
|
11
13
|
The service lets you log in with Snapchat without creating your own Snapchat app. It is a small, stateless program (`broker/worker.js`, running on Cloudflare Workers).
|
|
12
14
|
|
|
13
15
|
**What it does**
|
package/README.md
CHANGED
|
@@ -4,8 +4,17 @@ A local [MCP](https://modelcontextprotocol.io) server that lets an AI assistant
|
|
|
4
4
|
|
|
5
5
|
> **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.
|
|
6
6
|
|
|
7
|
+
## Get started in 2 minutes
|
|
8
|
+
**Claude Desktop (no terminal):** download `ads-mcp-for-snapchat-<version>.mcpb` from the [latest release](https://github.com/Usame794/snapchat-ads-mcp/releases/latest), 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.
|
|
9
|
+
|
|
10
|
+
**Claude Code, Cursor, VS Code or a terminal:**
|
|
11
|
+
```bash
|
|
12
|
+
npx -y ads-mcp-for-snapchat setup
|
|
13
|
+
```
|
|
14
|
+
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`.
|
|
15
|
+
|
|
7
16
|
## What it is, and what it is not
|
|
8
|
-
- **It runs on your machine, with your own Snapchat
|
|
17
|
+
- **It 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. The tool itself is not hosted, and no ad account data leaves your computer except to Snap's API.
|
|
9
18
|
- **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".
|
|
10
19
|
- **It is not a hosted service.** Services that only accept remote MCP servers (for example ChatGPT connectors) cannot use it as it is. Do not expose it on the internet.
|
|
11
20
|
- **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`.
|
|
@@ -272,7 +281,7 @@ Verified on the maintainer's own ad account. Anything not listed here is covered
|
|
|
272
281
|
|
|
273
282
|
**Before the safety layer (earlier tests, on throwaway paused objects):** pause/enable (single and bulk), budget, bid, targeting, schedule, bulk edits, campaign / ad squad copy, ad and creative clone, create campaign and ad squad, lookalike and pixel audiences, customer-list audience (with fake data), influencer flow and batch, media upload (simple and chunked), async reports, health check, review issues, pixel health, and the guarded delete (on a throwaway campaign).
|
|
274
283
|
|
|
275
|
-
**Read-only run of `verify` on the maintainer's real ad account (November 2026, 23 of 24 tools worked):** `snap_ping`; the campaign, ad squad, media and audience lists; spend pacing; anomaly check; funnel; hourly report; billing check; audience health; unused media; budget advice; landing page check; health check; review issues; dynamic template list; catalog feed status; pixel health; audience size; audience insights; and the public Ads Gallery lookup. That run found real bugs that mocked tests could not (Snap's account-level stats accept only the `spend` field; the landing page check read too much; a shop's bot protection answered 403), all fixed in 0.9.1 and after.
|
|
284
|
+
**Read-only run of `verify` on the maintainer's real ad account (November 2026, 23 of 24 tools worked; and 20 of 24 with none failed on a second account connected through the shared login, the rest skipped for optional settings):** `snap_ping`; the campaign, ad squad, media and audience lists; spend pacing; anomaly check; funnel; hourly report; billing check; audience health; unused media; budget advice; landing page check; health check; review issues; dynamic template list; catalog feed status; pixel health; audience size; audience insights; and the public Ads Gallery lookup. That run found real bugs that mocked tests could not (Snap's account-level stats accept only the `spend` field; the landing page check read too much; a shop's bot protection answered 403), all fixed in 0.9.1 and after.
|
|
276
285
|
|
|
277
286
|
**Not verified live:**
|
|
278
287
|
- Everything that **writes** and was added in 0.7.0 or later: catalog ad creation (product sets, templates, campaign, ad squad, creative, ad), frequency cap, ad schedule, placement, bid-strategy switching, and the new ad squad goals. Built from Snap's documentation and mocked tests.
|
package/SECURITY.md
CHANGED
|
@@ -22,7 +22,7 @@ Everything runs on your computer. These are the only outside addresses it contac
|
|
|
22
22
|
| `tr.snapchat.com` | Conversions API **test** events and their status (`snap_capi_*`) | Your access token and one test event; an email is hashed first. Real conversion events are never sent. |
|
|
23
23
|
| `adsapi.snapchat.com/v1/ads_library/...` | Competitor ads (`snap_competitor_ads`) | The advertiser name you search for. **No token**, nothing about your account. |
|
|
24
24
|
| The links of your own active ads | `snap_check_landing_pages` opens each link once | A plain request. Only `https`, never private, loopback or link-local addresses, and every redirect is checked again. No credentials. |
|
|
25
|
-
| The shared login service (`SNAP_BROKER_URL`), only if you chose the shared login | Logging in, and renewing the 30-minute access token | Your refresh token (it must, to renew). It stores nothing; see `PRIVACY.md`. Only use a service you trust. |
|
|
25
|
+
| The shared login service (`SNAP_BROKER_URL`, default `ads-mcp-for-snapchat-login.ads-mcp.workers.dev`; `off` disables it), only if you chose the shared login | Logging in, and renewing the 30-minute access token | Your refresh token (it must, to renew). It stores nothing; see `PRIVACY.md`. Only use a service you trust. |
|
|
26
26
|
|
|
27
27
|
Text that comes back from outside (competitors' ads, page contents, ad review reasons) is untrusted data: it is cut, marked as such in the answer, and must not be followed as instructions. `SNAP_PORTFOLIO_FILES` can only be set by you in your own settings; the AI app cannot choose which files are read. The audit log removes credentials, emails and phone numbers from logged arguments.
|
|
28
28
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ads-mcp-for-snapchat",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.4",
|
|
4
4
|
"description": "Unofficial local MCP server for the Snapchat Marketing API: reports, audits and safe, previewed changes to campaigns, ad squads and ads.",
|
|
5
5
|
"mcpName": "io.github.Usame794/ads-mcp-for-snapchat",
|
|
6
6
|
"adsMcpBroker": "https://ads-mcp-for-snapchat-login.ads-mcp.workers.dev",
|
package/src/index.js
CHANGED
|
@@ -20,7 +20,7 @@ try {
|
|
|
20
20
|
}
|
|
21
21
|
// Snapshot of the non-secret settings taken at startup. Later edits to .env do not change limits or the target account.
|
|
22
22
|
const settings = { ...process.env };
|
|
23
|
-
const server = new McpServer({ name: "ads-mcp-for-snapchat", version: "0.9.
|
|
23
|
+
const server = new McpServer({ name: "ads-mcp-for-snapchat", version: "0.9.4" });
|
|
24
24
|
// Only the OAuth credentials are re-read from .env when a token is needed, so replacing them does not require a restart.
|
|
25
25
|
const client = new SnapClient({ beforeToken: () => loadEnv(undefined, { override: true }), timeoutMs: policy.httpTimeoutMs });
|
|
26
26
|
registerTools(server, client, settings);
|
package/src/setup.js
CHANGED
|
@@ -195,7 +195,7 @@ export async function runSetup({ io, file = envFile(), fetchImpl = fetch, open =
|
|
|
195
195
|
const accounts = await listAdAccounts(client);
|
|
196
196
|
if (!accounts.length) throw new Error("This login cannot see any ad account. Ask the account's admin to add you, then run setup again.");
|
|
197
197
|
accounts.forEach((a, i) => say(` ${String(i + 1).padStart(2)}. ${a.name} (${a.organization}, ${a.status}, ${a.currency})`));
|
|
198
|
-
const pick = await askUntil(io, `Number of the ad account (1-${accounts.length}): `, (a) => (Number.isInteger(Number(a)) && Number(a) >= 1 && Number(a) <= accounts.length ? null : `Type a number from 1 to ${accounts.length}.`));
|
|
198
|
+
const pick = accounts.length === 1 ? "1" : await askUntil(io, `Number of the ad account (1-${accounts.length}): `, (a) => (Number.isInteger(Number(a)) && Number(a) >= 1 && Number(a) <= accounts.length ? null : `Type a number from 1 to ${accounts.length}.`));
|
|
199
199
|
const chosen = accounts[Number(pick) - 1];
|
|
200
200
|
if (chosen.id !== cur.SNAP_AD_ACCOUNT_ID) {
|
|
201
201
|
setEnvValue("SNAP_AD_ACCOUNT_ID", chosen.id, file);
|
|
@@ -209,15 +209,26 @@ export async function runSetup({ io, file = envFile(), fetchImpl = fetch, open =
|
|
|
209
209
|
|
|
210
210
|
// 4. Safety
|
|
211
211
|
cur = readSettings(file);
|
|
212
|
-
say("STEP 4 of 5: safety settings
|
|
212
|
+
say("STEP 4 of 5: safety settings");
|
|
213
|
+
const defaultBudget = cur.SNAP_MAX_DAILY_BUDGET || 1000;
|
|
214
|
+
let ro = "y";
|
|
215
|
+
const quick = await io.ask(` Use the safe defaults (start read-only; the AI may never set a daily budget above ${defaultBudget} ${chosen.currency ?? ""})? [Y/n]: `);
|
|
216
|
+
if (!/^n/i.test(quick)) {
|
|
217
|
+
setEnvValue("SNAP_MAX_DAILY_BUDGET", String(defaultBudget), file);
|
|
218
|
+
setEnvValue("SNAP_READ_ONLY", "1", file);
|
|
219
|
+
say(" Saved. You can change these later in the settings file.");
|
|
220
|
+
say("");
|
|
221
|
+
} else {
|
|
222
|
+
say(" (Enter keeps the value in brackets)");
|
|
213
223
|
const budget = await askUntil(io, ` Highest daily budget the AI may set, in ${chosen.currency ?? "account currency"} [${cur.SNAP_MAX_DAILY_BUDGET || 1000}]: `, (a) => (!a || (/^\d+(\.\d+)?$/.test(a) && Number(a) > 0) ? null : "A plain number, such as 300."));
|
|
214
224
|
if (budget) setEnvValue("SNAP_MAX_DAILY_BUDGET", budget, file);
|
|
215
225
|
const country = await askUntil(io, ` Main country, 2 letters such as us, sa, ae (Enter to skip) [${cur.SNAP_DEFAULT_COUNTRY || ""}]: `, (a) => (!a || /^[a-z]{2}$/i.test(a) ? null : "Two letters, such as us."));
|
|
216
226
|
if (country) setEnvValue("SNAP_DEFAULT_COUNTRY", country.toLowerCase(), file);
|
|
217
|
-
|
|
227
|
+
ro = await io.ask(" Start in read-only mode, so nothing can be changed until you are ready? [Y/n]: ");
|
|
218
228
|
setEnvValue("SNAP_READ_ONLY", /^n/i.test(ro) ? "0" : "1", file);
|
|
219
229
|
say(" Saved.");
|
|
220
230
|
say("");
|
|
231
|
+
}
|
|
221
232
|
|
|
222
233
|
// 5. Register
|
|
223
234
|
say("STEP 5 of 5: add it to your AI app");
|