affset MCP server
This server lets a media buyer run an affset tenant from a chat client — pull stats, manage campaigns/zones/team/payouts/targeting, and generate tracking links.
Inspect the tenant:
whoamishows namespace, API base, dashboard URL, company/timezone.Stats:
get_statsreturns clicks, conversions, CR, payout, media cost, ROI grouped by date, campaign, zone, country, advertiser/publisher, or sub1–sub5, with filters (campaigns, zones, subs, conversion type, emails, paid_only).Campaigns: list, fetch full records, create (geo/payout/offer URL), update (budgets, dates, URLs), and run/pause.
Zones: list, create (with postback/site/traffic-back URLs), update, and link to traffic sources.
Team: list members (API keys redacted) and invite new members, returning the new API key once.
Traffic sources: list, create from presets (ExoClick, RichAds, etc.), update tracking/postback templates.
Links: generate
/servezone URLs and direct/track/clicktracking links with sub/cost macros and source templates.Optimization:
cut_zonesblacklists underperforming zones by CR/spend/ROI thresholds.Payouts: list/set/delete global or per-zone payout rules; set payout goal types.
Targeting: list rule types, list/set/remove targeting rules (geo, device, OS, browser, unique users).
Sub labels: list and set display names for sub1–sub5.
Conversions: audit conversion records with filters (paid_only server-side; click_id, source_click_id, type, zero_payout, payload client-side).
Docs: exposes the affset API reference as MCP resources.
Safety: mutations are dry-run by default (
confirm: trueto apply); read-only mode removes all mutating tools.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@affset MCP server show me stats for campaign 'Summer Sale' grouped by zone"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
affset MCP server
An MCP server that lets a media buyer run affset from a chat client — pull stats, manage campaigns/zones/team, payouts, targeting, sub labels, and cut underperforming zones in plain language, no dashboard.
The tools wrap the existing affset tenant API. Connect through the hosted
endpoint (OAuth, no API key) or run this package locally (Bearer token +
X-Namespace). One connection serves one tenant.
Fastest way to connect — the hosted endpoint. Add
https://mcp.affset.com/mcp as a remote MCP server in Claude (web or desktop),
Cursor, Claude Code, or any client that supports streamable HTTP with OAuth:
paste the URL, sign in with your affset email, keep Read-only (the consent
default) or grant full access. Every connection shows up on the dashboard
Integrations page and can be revoked individually. Setup guide:
affset.com/integrations.
The npm package below is the self-host path: same tool roster, runs on your
machine with an API key you manage yourself. Stdio defaults to full access
unless you set AFFSET_READ_ONLY=true.
Tools
Tool | What it does |
| Show the tenant this server is bound to: namespace, API base, derived dashboard URL, and (when readable) company / timezone / custom API domain. Read-only. |
| Traffic stats grouped by a dimension (date, campaign, zone, country, sub1–5, advertiser, publisher, …), optionally narrowed with |
| List campaigns (status / name filter, pagination). |
| One campaign's full record — every field (untruncated offer URL, exact schedule, budgets/pacing, silent flag, payout goal type) plus its targeting rules and payout rules, in one call. |
| List traffic-source zones (status / name filter, pagination, linked source). |
| List team members (email, role, manager). Never returns API tokens. |
| Invite a team member (owner, manager, publisher, advertiser, publisher_manager, advertiser_manager). A scoped manager key can only create its own managed role, self-assigned. Returns the new API key once — |
| Create a campaign from an advertiser email, offer URL, geo, payout and name. Defaults: CPA / rate 0, paused, global payout rule, and a ready tracking link (linked source template when configured; otherwise |
| Run or pause a campaign ( |
| Partial update (name, offer URL, status, rate, budgets, dates, …). Dry-run by default; |
| Create a traffic-source zone (name + optional postback/site/traffic-back URLs, optional |
| Partial update (name, status, URLs, |
| List traffic sources — the networks bought from, each with the tracking/postback templates its linked zones use. API token shown only as set/none. |
| Create a traffic source, optionally from a network preset ( |
| Partial update (name, templates, api_token, status). Linked zones pick the new tracking template up immediately. Dry-run by default; |
| The network campaigns of one traffic source with their current bids, read live from the network account (ExoClick, TrafficStars, RichAds — needs the source's API token): status, pricing model, bid in USD, last change that entered Affset's mutation stage. Read-only. |
| Set one network campaign's bid in USD using its existing pricing model (for RichAds: CPM for pops, CPC for push/display). The dry run returns |
| The |
| The |
| Blacklist underperforming zones on a campaign by threshold (CR / spend / ROI). Dry-run by default; |
| List a campaign's global + per-zone payout rules and its |
| Upsert a global or zone-specific payout. Dry-run by default; |
| Delete a global or zone-specific payout rule. Dry-run by default; |
| Set or clear |
| Catalog of targeting rule types, flagging the seeded ones |
| List a campaign's targeting rules, flagging any that have no effect. |
| Upsert one targeting rule (safe merge), normalised to what |
| Remove one targeting rule by id or type+method. Dry-run by default; |
| List tenant display names for sub1–sub5. |
| Set or clear sub labels (partial; |
| List conversion audit records (payout, spend, pixel type, payload, postback). |
Which URL do I give the network?
|
| |
Picks the campaign | affset, from the zone's rotation | you, one fixed campaign |
Needs an active campaign | yes — otherwise traffic back / unsold | yes — otherwise 404 |
Needs an active zone | yes | yes |
Geo & targeting rules | enforced | not enforced |
| the impression row | the click row |
Use one or the other for a given traffic stream — never both with cost=, or the
media cost is counted twice.
Both use the tenant's custom API domain when one is set, since the URL gets pasted
into the network verbatim. Macros ({clickid}, [CLICK_ID], ${SUBID}) are inserted
without percent-encoding — the source expands them before the request reaches affset.
cut_zones only ever adds zones to a campaign's blacklist, and does a
read-merge-write so existing targeting rules are never touched.
create_campaign needs a traffic-source zone for the tracking link: pass
zone_id, or let it auto-pick when the namespace has exactly one active zone.
Campaigns are created paused; activate them before sending traffic through either
URL. Both URL types also require an active zone. Geo whitelist is enforced in /serve
only — the direct tracking link is not geo-gated, but it still requires an active,
currently serviceable campaign.
Related MCP server: Meta Ads MCP Server
Documentation resources
Beyond the tools, the server exposes the affset API reference as MCP
resources, so an
assistant can answer "how does conversion tracking work?" or "what does /serve
accept?" from the docs themselves — not just from the tool schemas.
Resource URI | Type | Content |
|
| The full API reference — endpoints, auth, roles, examples. |
|
| The same reference as structured data, for programmatic use. |
They're the exact content published at affset.com/docs,
generated from one source, and fetched at read time from AFFSET_DOCS_URL
({origin}/api-reference.md and {origin}/api-reference.json) — so they always
reflect the currently published docs, not a copy pinned to this package. The
fetch sends no credentials (the docs are public and live on a different
origin than the tenant API). HTML SPA fallbacks, redirects, invalid JSON, and
oversized bodies are rejected. Both resources are always available, including
under AFFSET_READ_ONLY.
Configuration
Self-host (stdio) only — hosted connections do not use these variables. All config comes from the environment (never hard-coded):
Variable | Description |
| Origin of the affset API, e.g. |
| Tenant API key. Its namespace must match |
| Tenant namespace (lowercase letters, numbers, hyphens; 3–63 chars — same rules as signup). |
| Optional, default |
| Optional, default |
| Optional, default |
See .env.example.
Install
Hosted (fastest — no install)
Add the remote server in your MCP client and approve access in the browser.
OAuth is discovered from the endpoint — do not paste an API key, and do not add
an Authorization header.
Claude (web or desktop) — Customize → Connectors → + → Add custom connector →
https://mcp.affset.com/mcp.Cursor — Settings → MCP → Add server, transport "streamable HTTP", same URL.
Claude Code —
claude mcp add --transport http affset https://mcp.affset.com/mcpthen authenticate with/mcp.
You sign in with your affset email (magic link). Read-only is selected on the consent screen unless you switch to Full access. The connection gets its own scoped credential — your API key is never involved — and appears on the dashboard's Integrations page, where it can be revoked at any time. Full guide: affset.com/integrations.
The self-host paths below run the same tool roster over stdio and require Node.js 22.13 or newer.
From npm (recommended for self-hosting)
No clone, no build — your MCP client runs it with npx. For Claude Desktop
(claude_desktop_config.json):
{
"mcpServers": {
"affset": {
"command": "npx",
"args": ["-y", "@affset/mcp"],
"env": {
"AFFSET_BASE_URL": "https://api.affset.com",
"AFFSET_API_KEY": "sk_live_...",
"AFFSET_NAMESPACE": "your-namespace"
}
}
}
}For Claude Code:
claude mcp add affset \
-e AFFSET_BASE_URL=https://api.affset.com \
-e AFFSET_API_KEY=sk_live_... \
-e AFFSET_NAMESPACE=your-namespace \
-- npx -y @affset/mcpSame env flags with -- npx -y github:affset/mcp if you install from GitHub
instead of the npm registry (see below).
Add -e AFFSET_READ_ONLY=true for a stats/reporting-only instance (see
Security).
From GitHub directly (no npm publish required)
npx can install straight from the git repo instead of the npm registry —
useful if you'd rather not publish, or just want to track main without a
release step:
{
"mcpServers": {
"affset": {
"command": "npx",
"args": ["-y", "github:affset/mcp"],
"env": {
"AFFSET_BASE_URL": "https://api.affset.com",
"AFFSET_API_KEY": "sk_live_...",
"AFFSET_NAMESPACE": "your-namespace"
}
}
}
}A push to main makes that commit available to this unpinned install path — no
npm publish is required. On resolution, npm fetches the repository and runs the
prepare script to build dist/ before starting the binary. npm may reuse its
cache on later starts; an already running MCP process is not updated until it is
restarted and npx resolves the dependency again.
For reproducible deployments, pin a reviewed ref instead of floating on main:
github:affset/mcp#<commit-sha> or github:affset/mcp#<tag>. Restart the MCP
process deliberately when you want it to resolve and run a newer revision.
From source
git clone https://github.com/affset/mcp.git affset-mcp
cd affset-mcp
npm install # builds via the prepare scriptThen point your MCP client at the built entry file — swap the npx command above
for "command": "node", "args": ["/absolute/path/to/affset-mcp/dist/index.js"].
Usage examples
list paused campaigns →
list_campaigns(status: "paused")show me everything about campaign 42 →
get_campaign(campaign_id: 42)show zones →
list_zones()who's on the team? →
list_team()add sarah@offer.com as a publisher →
create_team_member(email: "sarah@offer.com", role: "publisher")(dry-run) → confirmstats for today by sub1 →
get_stats(group_by: "sub1")stats by advertiser →
get_stats(group_by: "advertiser_email")stats for one publisher, grouped by zone →
get_stats(group_by: "zone_id", publisher_email: "publisher@example.com")stats including informative conversions →
get_stats(paid_only: false)set up RichAds end to end →
create_traffic_source(name: "RichAds", preset: "richads")(dry-run) → confirm →create_zone(name: "RichAds push", traffic_source_id: "…")(dry-run) → confirm →get_zone_url()create a campaign for offer X, advertiser buyer@example.com, geo BR, payout $2 →
create_campaign(user_email: "buyer@example.com", offer_url: "https://offer.example/lp?s={click_id}", geo: ["BR"], payout: 2)(dry-run) → confirmwhat URL do I paste into RichAds? →
get_zone_url()— a zone linked to a traffic source gets the source's template filled ingive me the link for campaign 42 again →
get_tracking_link(campaign_id: 42)run campaign 42 →
set_campaign_status(campaign_id: 42, action: "run")(dry-run) → confirmpause campaign 42 →
set_campaign_status(campaign_id: 42, action: "pause")(dry-run) → confirmset zone postback →
update_zone(zone_id, postback_url: "…")(dry-run) → confirmcut zones with CR < 0.2% and spend > $5 →
cut_zones(campaign_id, cr_max: 0.002, spend_min: 5)(dry-run) → confirmshow payouts for campaign 42 →
list_payout_rules(campaign_id: 42)set zone payout to $3 →
set_payout_rule(campaign_id: 42, payout: 3, zone_id: "…")(dry-run) → confirmonly pay on deposit conversions →
set_payout_goal(campaign_id: 42, goal_type: "deposit")(dry-run) → confirmwhat targeting types exist? →
list_targeting_types()whitelist BR+MX on campaign 42 →
set_targeting_rule(campaign_id: 42, type: "geo", method: "whitelist", rule: "BR,MX")(dry-run) → confirmname sub1 Zone, sub2 Creative →
set_sub_labels(sub1: "Zone", sub2: "Creative")(dry-run) → confirmshow recent conversions →
list_conversions()hide informative conversions (goal-type misses) →
list_conversions(paid_only: true)find $0 payouts (no rule / still on this page) →
list_conversions(zero_payout: true)lookup by source click id →
list_conversions(source_click_id: "abc123")
Notes & limits
get_statsgroups by one dimension per call. Drill-down is a sequence of calls, each narrowing withcampaign_ids/zone_ids/sub1..sub5/conversion_type/advertiser_email/publisher_email/paid_onlyfilters. The two email filters select one user's campaigns or zones without changinggroup_by; access is limited to owner/manager or the corresponding scoped manager role. Filtering byconversion_typereturns conversion rows only (impressions, clicks and media cost are zero).paid_onlydefaults to true (the API default is false; this matches the dashboard) so the conversions count and CR drop informative rows recorded withpostback_skipped=non_goal_type— pixel type missed the campaign'spayout_goal_type. Silent conversions still count; this is not a payout>0 filter. Setfalsefor the raw count. Only recent (unfolded) events are filtered; conversions already in daily archives stay included.spendmeansmedia_cost(your traffic cost). ROI / spend thresholds need cost data imported for the slice.List endpoints have no server-side name search —
name_containsfilters the current page client-side.Date-range presets,
YYYY-MM-DDbounds and rendered timestamps all resolve in the tenant timezone (read once from/api/tenant), so a window lines up with the date bucketsgroup_by=datereturns instead of straddling two of them. Explicit timestamps must includeZor a UTC offset.All mutations (creates, updates, cuts, deletes) stay on dry-run →
confirm: true. Creates are additive once confirmed and echo what was written.Activating a campaign or creating a zone can return 402 plan limit — the error surfaces dimension / current / limit.
Payout resolution at conversion: zone-specific → global → $0. Goal type gates spend/payout by pixel
type=match; non-matching events still record at $0. Payouts go down to$0.00001, so payout amounts print at up to five decimals.Changing a payout is delete + create — the API has no update and the (campaign, zone) pair is unique.
set_payout_rulerestores the previous payout if the create fails, and says so loudly in the one case where it cannot.Targeting is enforced on
/serveonly — not on direct tracking links.set_targeting_rule/remove_targeting_rulemerge safely; other rules are kept.Targeting values are matched exactly and case-sensitively at serve time (geo from
CF-IPCountry, os/browser from the user agent, device type from a fixed set).set_targeting_rulenormalises what it can (br,mx→BR,MX,android→Android) and rejects what could never match — an unmatched whitelist silently stops delivery.capping,weekdaysandhoursare seeded but never evaluated by/serve.set_targeting_rulerefuses to write them (they would read as working targeting while the campaign kept buying);list_targeting_typesflags them. Useunique_users(visits/hours) for frequency capping.list_conversionsis the conversion audit trail (not aggregated stats). The API has no campaign/zone/date filters;paid_onlyis the one server-side filter (truedrops rows recorded withpostback_skipped=non_goal_type— pixel type missed the campaign'spayout_goal_type; silent conversions and other skip reasons still come back — this is not a payout>0 filter). The other optional filters apply to the current page only. Rows do not include campaign_id/zone_id. Publisher-side roles do not seespendand advertiser-side roles do not seepayout, sozero_payoutneeds a role that can;paid_onlydoes not (it keys onpostback_skipped, notpayout).create_team_membercreates the API key directly (like the dashboard's "Add Team Member") — it does not send an invite email. Hand the returned key to the person yourself. Revoking/removing a team member is not yet a tool; use the dashboard's Team page.Out of scope: deleting campaigns/zones/conversions, billing, creative management.
Tenant signup is deliberately not a tool.
POST /api/public/create-instanceis Origin-gated and fails closed, which is what keeps signup browser-only; a server-side caller would have to spoof an allowlisted Origin to get past it. The endpoint also withholds the API key when email delivery is configured (it sends a magic link instead), and this server binds one namespace from the environment at startup — so it could not use a tenant it just created. Sign up in the dashboard, then point a server instance at the new namespace.
Using as a library
Since 0.2.0 the package doubles as a runtime-agnostic library: everything the
stdio server registers (tools, docs resources, read-only stripping) is exposed
as one helper that runs on any fetch-capable runtime — Node ≥22.13 or Cloudflare
Workers. The hosted affset MCP gateway (mcp.affset.com) consumes
exactly this surface, so the remote roster can never drift from stdio.
import { registerAffsetTools, type Config } from "@affset/mcp/core";
const config: Config = {
baseUrl: "https://api.affset.com",
docsBaseUrl: "https://affset.com",
apiKey: perRequestKey, // e.g. an OAuth grant's backing credential
namespace: tenantNamespace,
requestTimeoutMs: 30_000,
readOnly: scope === "read", // never registers tools without readOnlyHint: true
};
registerAffsetTools(server, config); // server: your own McpServer instanceregisterAffsetTools accepts your McpServer structurally, so your own
@modelcontextprotocol/sdk install works — no need to match this package's
copy. Env-var loading (AFFSET_*) is deliberately not part of the library
surface; it belongs to the stdio entrypoint only. A third, optional
{ onToolCall } argument reports only tool name, duration, and success/error
status for transport-owned audit logging; arguments and output are never
included.
The library validates and normalizes config before registering anything.
Remote API origins must use HTTPS (plain HTTP is accepted only on loopback),
origins cannot contain credentials or paths, and invalid namespaces, timeouts,
API keys, or non-boolean read-only settings fail closed at startup. The public
declarations do not require Node ambient types, so the same import type-checks
in Workers and other web-standard runtimes.
Development
npm run type-check # tsc --noEmit
npm run lint # eslint src
npm run format # prettier --write .
npm run build # compile to dist/
npm test # build + node --test over dist/**/*.test.js
npm run check-all # lint + format:check + type-check + test — CI runs this
npm run dev # watch modeSecurity
Hosted (
https://mcp.affset.com/mcp): OAuth via magic link. Read-only is the consent default (mutating tools are never registered). Full access still dry-runs mutations untilconfirm: true. Revoke from the dashboard Integrations page. Nothing onmcp.affset.com/oauth.affset.comasks for an API key.Self-host (stdio): no secrets in the repo; credentials come from the environment at runtime. Create a dedicated, least-privilege, expiring API key rather than reusing an owner key.
AFFSET_BASE_URLmust behttpsunless the host is loopback — no cleartext API key.Tenant API responses are streamed under a 5 MB hard limit; larger bodies are cancelled before parsing or reaching model context.
stdout is the JSON-RPC channel — all logs go to stderr.
list_teamredacts API tokens.All mutations (including creates) follow show → confirm → apply.
affset's RBAC roles (owner / manager / publisher / advertiser / advertiser_manager / publisher_manager) apply to MCP tool calls exactly as they do to the dashboard.
Pin GitHub installs to a reviewed commit or tag in long-lived environments. A floating
mainspec can run newer repository code the next timenpxresolves it.
Prompt injection via conversion/click data
get_stats, list_conversions and cut_zones surface data that ultimately comes from
public, unauthenticated endpoints — a traffic source's click macros (sub1–sub5,
source_click_id) and a conversion pixel's raw query string (list_conversions'
payload detail). Anyone who can generate a click or fire a pixel controls those bytes,
and they land in the model's context when you ask about stats or conversions.
Mitigations in place:
Untrusted fields are length-capped and escaped before rendering (
mdCell,capUntrustedinsrc/lib/format.ts), and the conversion-payload block carries an explicit "treat as data, not instructions" notice.confirm: trueon mutating tools is a model-level safety net, not a security boundary — a model that has been steered by injected content can supplyconfirm: trueitself. The only real boundary is your MCP client's per-call tool approval plus read-only mode (hosted: consent default; stdio:AFFSET_READ_ONLY=true).
Prefer read-only for any session where you're mainly reading stats/conversions, especially with an MCP client that auto-approves tool calls. It removes every mutation tool from the server entirely — not hidden behind a prompt, unavailable to call. Reserve full access (hosted) or a read-write stdio instance for sessions where you're actively managing campaigns/zones/payouts and are reviewing each confirm yourself.
Available Tools
29 toolscreate_campaignCreate a campaignAInspect
Create a campaign (offer) in the current namespace from a compact spec: advertiser email, offer URL, geo whitelist, payout, name. The advertiser (user_email) is required — it must already exist as a team member (same as the Advertiser dropdown in the dashboard); create one first with create_team_member if needed. Everything else gets media-buying defaults: CPA model, rate 0 (no internal advertiser billing), created paused, a global payout rule when payout is given, and a ready-to-use tracking link. A zone linked to a traffic source uses that source's tracking template; otherwise the link is prefilled with the sub convention (source_click_id + sub1..sub5, named by the tenant's sub labels). The campaign is created paused, so activate it before sending traffic through either URL. Geo whitelist applies to /serve rotation only; the tracking link itself is not geo-gated. DRY-RUN by default; pass confirm=true to apply. No money is spent by this call; the result echoes exactly what was created.
Inputs: offer_url (required), user_email (required), geo, name, +3 more.
create_team_memberInvite a team memberAInspect
Invite a team member: create a user API key with an email in the current namespace — the same operation as the dashboard's "Add Team Member". Requires owner/manager, or a scoped manager role (publisher_manager / advertiser_manager), which can only create its own managed role (publisher / advertiser respectively) assigned to itself — the API enforces this, not this tool, so a scoped manager's role/manager_email args may be overridden. Returns the new member's plaintext API key ONCE, in the confirmed response — it is not shown again by list_team, which deliberately never echoes tokens, so copy it now and send it to them over a private channel. Does not send an invite email; the API key is the credential, handed over out of band. DRY-RUN by default; pass confirm=true to apply.
Inputs: role (required), email (required), confirm, expires_at, +2 more.
create_traffic_sourceCreate a traffic sourceAInspect
Create a traffic source — an ad network account bought from. Creating from a preset (exoclick, trafficstars, propellerads, adsterra, richads) copies the network's verified tracking + postback templates into an editable row; [BRACKETED] pieces in a postback template are account-specific values to fill in. Link zones to the source via create_zone/update_zone traffic_source_id, and get_zone_url renders its template. The api_token is stored write-only for upcoming cost sync. DRY-RUN by default; pass confirm=true to apply.
Inputs: name (required), preset, status, confirm, +3 more.
create_zoneCreate a zoneAInspect
Create a traffic-source zone in the current namespace. Requires a name; optional postback_url (where conversions are reported back — include {source_click_id}), site_url, traffic_back_url, user_email (publisher owner), and traffic_source_id (get_zone_url then renders that source's tracking template). Status is always active on create. Counts against the plan's zone limit (402 if exceeded). DRY-RUN by default; pass confirm=true to apply.
Inputs: name (required), confirm, site_url, user_email, +3 more.
cut_zonesCut underperforming zonesADestructiveInspect
Blacklist underperforming zones on a campaign based on thresholds (CR, spend, ROI). Evaluates zone stats over the given window and adds matching zones to the campaign's zone blacklist. DRY-RUN by default: it shows which zones would be cut and how the blacklist changes. Pass confirm=true to actually apply. spend means media_cost (your traffic cost). A zone is cut only if it matches ALL provided thresholds.
Inputs: campaign_id (required), to, from, range, +5 more.
delete_payout_ruleDelete a payout ruleADestructiveInspect
Delete a campaign payout rule (global or per-zone). Omit zone_id to delete the global rule; pass a zone UUID to delete that zone's override. DRY-RUN by default; pass confirm=true to apply. Without a global rule, conversions resolve to $0.
Inputs: campaign_id (required), confirm, zone_id.
get_campaignGet a campaign's full recordARead-onlyIdempotentInspect
Get one campaign's full record: every field (including the untruncated offer URL, exact schedule, budgets/pacing, silent-conversions flag, payout goal type) plus its targeting rules and payout rules in one call. list_campaigns renders a summary table (offer URL truncated, no dates/pacing/silent) meant for scanning many campaigns; use this when you need one campaign's complete data — e.g. before recreating it as a new campaign, or before editing it with update_campaign.
Inputs: campaign_id (required).
get_statsGet affset statsARead-onlyIdempotentInspect
Pull affset traffic stats grouped by a single dimension. Returns impressions, clicks, conversions, CR, payout, media cost and ROI as a table. Drill down by calling repeatedly: first group_by=date or campaign_id, then narrow with filters (campaign_ids, zone_ids, sub1..sub5, conversion_type, advertiser_email, publisher_email, paid_only) and change group_by (zone_id, sub1, ...). Sub columns are titled with the tenant's configured labels (e.g. "Zone (sub1)") when set; group_by/filters always take the raw subN key. conversion_type only matches conversion rows, so filtering by it zeroes impressions, clicks and media cost — it narrows to conversions of that type, not clicks that led to one. paid_only defaults to true (same as the dashboard): conversions and CR exclude informative pings whose pixel type missed payout_goal_type, so CR is not inflated above 100%. Set false for the raw unfiltered count. ROI is blank until traffic cost has been imported for the slice. group_by=advertiser_email / publisher_email break down by team member; the API limits them to owner/manager plus the matching side's manager role (403 otherwise). advertiser_email / publisher_email are also standalone filters — narrow every row to one advertiser's campaigns or one publisher's zones regardless of group_by, instead of breaking every user out into its own row. Same role limits as the matching group_by value.
Inputs: to, from, sub1, sub2, +11 more.
get_tracking_linkGet a campaign's tracking linkARead-onlyIdempotentInspect
Get the tracking link for an existing campaign + zone — the /track/click link that goes straight to that one campaign with no rotation or targeting checks. Both the campaign and zone must be active for the public link to work. Same link create_campaign echoes on create; this re-derives it later, for any campaign, with whatever sub values you want. A zone linked to a traffic source renders that source's tracking template instead. Uses the tenant's custom API domain when one is set. Read-only: builds the URL, changes nothing.
Inputs: campaign_id (required), cost, sub1, sub2, +5 more.
get_zone_urlGet the zone URL for a traffic sourceARead-onlyIdempotentInspect
Get the zone URL to paste into a traffic source's campaign settings — the /serve link that rotates across the zone's active campaigns. A zone linked to a traffic source renders that source's tracking template; otherwise the URL is prefilled with the sub convention (source_click_id + sub1..sub5) and optionally the network's cost macro. Uses the tenant's custom API domain when one is set. Read-only: builds the URL, changes nothing. For a link straight to one active campaign without targeting checks, use get_tracking_link instead.
Inputs: cost, sub1, sub2, sub3, +4 more.
list_campaignsList campaignsARead-onlyIdempotentInspect
List campaigns in the current namespace. Filter by status and optionally by name (client-side contains match — the API has no search). Returns id, name, status, offer URL, model/rate, advertiser, budgets. Paginated (default 20, max 100).
Inputs: sort, limit, order, offset, +2 more.
list_conversionsList conversionsARead-onlyIdempotentInspect
List recent conversion records (audit trail) for debugging payouts and pixel params. Shows payout, spend, pixel type, source_click_id, click_id, subs, postback outcome, and the raw payload. paid_only: true drops informative conversions server-side — rows recorded with postback_skipped=non_goal_type because the pixel type missed the campaign's payout_goal_type. Silent conversions and other skip reasons still come back (not a payout>0 filter). Default false, all rows. Beyond pagination/sort/paid_only, the optional click_id / source_click_id / type / payload_contains / zero_payout filters run client-side on the current page. Does not include campaign_id/zone_id (not returned by the API).
Inputs: sort, type, limit, order, +6 more.
list_payout_rulesList payout rulesARead-onlyIdempotentInspect
List a campaign's payout rules (global + per-zone) and its payout_goal_type. Global rule applies to all zones; a zone-specific rule overrides it for that zone. When payout_goal_type is set, spend/payout apply only on conversions whose pixel type= exactly matches (others still record, but with $0).
Inputs: campaign_id (required).
list_sub_labelsList sub labelsARead-onlyIdempotentInspect
List the tenant's display names for sub1–sub5 (traffic-source breakdown slots). Unlabeled slots show as the raw key. Used by get_stats column titles and tracking-link / zone-URL query params.
Inputs: no named parameters.
list_targeting_rulesList campaign targeting rulesARead-onlyIdempotentInspect
List a campaign's targeting rules (type, method whitelist/blacklist, rule values). Rules gate /serve rotation; the direct tracking link does not enforce them. Call list_targeting_types for type ids/names.
Inputs: campaign_id (required).
list_targeting_typesList targeting rule typesARead-onlyIdempotentInspect
List targeting rule types available in this tenant (id, name, description), flagging the seeded types the /serve path does not actually evaluate. Use the id (or name) when setting campaign targeting rules. Enforced types: geo, device_type, zone_id, os, browser, unique_users.
Inputs: no named parameters.
list_teamList team membersARead-onlyIdempotentInspect
List team members (user API keys) in the current namespace: email, role, manager, created/expiry. Never returns API tokens. Requires owner/manager (or a scoped manager role).
Inputs: role, include_expired.
list_traffic_sourcesList traffic sourcesARead-onlyIdempotentInspect
List the tenant's traffic sources — the ad networks bought from, each with the tracking template its linked zones render in get_zone_url/get_tracking_link and an optional postback template. The stored network API token is write-only and shown only as set/none. Read-only.
Inputs: limit, offset, status.
list_zonesList zonesARead-onlyIdempotentInspect
List traffic-source zones in the current namespace. Filter by status and optionally by name (client-side contains match). Returns id, name, linked traffic source, status, postback_url, site_url, publisher. Paginated (default 20, max 100).
Inputs: sort, limit, order, offset, +2 more.
remove_targeting_ruleRemove a targeting ruleADestructiveInspect
Remove one targeting rule from a campaign (safe merge — other rules are kept). Identify by rule_id, or by type + method. DRY-RUN by default; pass confirm=true to apply.
Inputs: campaign_id (required), type, method, confirm, +1 more.
set_campaign_statusRun or pause a campaignADestructiveInspect
Run (activate) or pause a campaign. 'run' enters /serve zone rotation and counts against the plan's active-campaign limit (402 if exceeded). 'pause' removes the campaign from active serving, so both /serve selection and direct tracking links stop. DRY-RUN by default; pass confirm=true to apply. For name/offer/budget edits use update_campaign.
Inputs: action (required), campaign_id (required), confirm.
set_payout_goalSet payout goal typeADestructiveInspect
Set or clear a campaign's payout_goal_type (goal-based conversions). When set, spend and payout apply only when the conversion pixel's type= exactly matches; other types are still recorded with $0. Pass null (or empty string) to clear. DRY-RUN by default; pass confirm=true to apply.
Inputs: goal_type (required), campaign_id (required), confirm.
set_payout_ruleSet a payout ruleADestructiveInspect
Set a campaign payout rule (global or per-zone). Upserts: if a rule already exists for that scope it is replaced (delete + create, with the old payout restored if the create fails). Omit zone_id for the global rule; pass a zone UUID for a zone override. DRY-RUN by default; pass confirm=true to apply.
Inputs: payout (required), campaign_id (required), confirm, zone_id.
set_sub_labelsSet sub labelsADestructiveInspect
Set or clear tenant display names for sub1–sub5. Partial update — only provided keys change; pass null or "" to clear a label. Max 40 chars each. DRY-RUN by default; pass confirm=true to apply. Affects stats column titles and link helpers.
Inputs: sub1, sub2, sub3, sub4, +2 more.
set_targeting_ruleSet a targeting ruleADestructiveInspect
Upsert one targeting rule on a campaign (safe merge — other rules are kept). Identify the type by id or name (e.g. geo, zone_id, device_type, os, browser, unique_users). If a rule with the same type + method already exists it is updated; otherwise a new one is added. rule is comma-separated values (geo: BR,MX; unique_users: visits/hours). Values are normalised to what /serve matches — an unmatched whitelist stops delivery. DRY-RUN by default; pass confirm=true to apply.
Inputs: rule (required), type (required), method (required), campaign_id (required), +1 more.
update_campaignUpdate a campaignADestructiveInspect
Update a campaign (partial): name, offer URL (redirect_url), status, rate, payment_model, start/end dates, daily/total budget, pacing. DRY-RUN by default; pass confirm=true to apply. For run/pause prefer set_campaign_status. Activating a paused campaign can hit the plan's active-campaign limit (402). Targeting rules and payout rules are separate tools.
Inputs: campaign_id (required), name, rate, pacing, +8 more.
update_traffic_sourceUpdate a traffic sourceADestructiveInspect
Update a traffic source (name, tracking_template, postback_template, api_token, status). Partial update — only provided fields change; pass null (or "") to clear a template or the stored api_token. Zones linked to the source pick the new tracking template up immediately in get_zone_url/get_tracking_link. DRY-RUN by default; pass confirm=true to apply.
Inputs: traffic_source_id (required), name, status, confirm, +3 more.
update_zoneUpdate a zoneADestructiveInspect
Update a traffic-source zone (name, status, postback_url, site_url, traffic_back_url, traffic_source_id). Partial update — only provided fields change. Pass null for a URL field or traffic_source_id to clear it. Linking a traffic source makes get_zone_url/get_tracking_link render its tracking template. DRY-RUN by default; pass confirm=true to apply.
Inputs: zone_id (required), name, status, confirm, +4 more.
whoamiShow the tenant this MCP is bound toARead-onlyIdempotentInspect
Return the tenant this MCP server is bound to: namespace, API base URL, and the derived dashboard URL (https://{namespace}.affset.com) — everything you need to hand the operator a working deep link, or to pick the right host for a URL you were about to guess. Also reports the tenant's company name, timezone and custom API domain when the /api/tenant read succeeds. Read-only, no side effects. Call this once at the start of a session instead of guessing the namespace from the owner's email — one MCP instance = exactly one tenant, and that binding is already fixed at startup.
Inputs: no named parameters.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 29 tools
Each tool targets a distinct resource or action, with clear boundaries between similar helpers like get_zone_url and get_tracking_link, and update_campaign vs set_campaign_status. Cross-references in descriptions further eliminate ambiguity.
Most tools follow a consistent snake_case verb_noun pattern: list_*, create_*, get_*, update_*, set_*. Minor inconsistencies like delete_payout_rule vs remove_targeting_rule and non-pattern tools whoami and cut_zones keep it from a perfect score.
29 tools exceeds the 25+ threshold and makes the server feel heavy for a single MCP surface, even though the underlying platform domain is broad. An agent faces a large decision space before it can pick the right operation.
The suite covers campaigns, zones, traffic sources, payout rules, targeting rules, stats, conversions, team members, and sub labels, with create/read/update operations for the main entities. The main gap is no delete/remove for campaigns, zones, traffic sources, or team members, but pause/status updates provide workarounds.
Maintenance
Related MCP Connectors
Manage and optimize your ads on Meta, Google, TikTok, X, ChatGPT Ads, Reddit and LinkedIn from chat.
Conversational access to advertising performance data, creative analysis, and campaign insights
Conversational access to advertising performance data, creative analysis, and campaign insights
Manage Google, Meta, TikTok, Snapchat and LinkedIn ads, plus GA4, Tag Manager and Search Console, by chat from Claude or ChatGPT. Spend increases need your confirmation first.
Related MCP Servers
- AlicenseBqualityCmaintenanceIntegrates PropellerAds' programmatic advertising platform with AI to automate campaign management, real-time optimization, and performance analysis. It enables users to create, scale, and manage ad campaigns through natural language commands for tasks like bid adjustment and zone blacklisting.212MIT
- AlicenseNot gradedqualityDmaintenanceEnables management and analysis of Meta (Facebook/Instagram) ads through natural language conversations, with 30 tools for reading and writing ad data.MIT
- FlicenseNot gradedqualityBmaintenanceEnables monitoring and managing multi-platform media buying accounts via natural language, detecting anomalies like creative fatigue and spend spikes, with AI-powered recommendations and a human-in-the-loop approval queue.-

AdCrunch MCP Serverofficial
FlicenseNot gradedqualityCmaintenanceEnables querying ad campaign performance and setup across Meta, TikTok, and Google Ads using natural language through AI agents.1-