StackAdapt MCP server for AI agents

Live

BEARER TOKEN

PROGRAMMATIC ADS

Marketing

StackAdapt gives your agent programmatic advertising control in your StackAdapt account: read advertisers, campaigns, campaign groups, ads, and custom segments, pull delivery stats, and pause, resume, or archive campaigns and ads.

  • Per-user credentials: each call uses the actual user's access token, never a shared bot.
  • Encrypted per-tenant vault: AES-256, resolved at request time, never in LLM context.
  • Scoped before every call: pre-call scope check, 90-day SIEM-exportable audit chain.
StackAdapt
agent · Acme Q3
Run
Pause the Spring Launch campaign and record why.
S
stackadapt_pause_campaign
268ms
Ad operations agent
Paused the Spring Launch campaign and recorded the reason as a budget review.
Sources: StackAdapt campaign, 1 campaign
stackadapt
1 campaign
18:29
Message Claude...

Tools your programmatic advertising agent reaches for on StackAdapt, scoped per user.

CALL ANY TOOL
23 tools for programmatic advertising in StackAdapt: list advertisers, campaigns, groups, ads, and segments, read delivery stats, create and update campaign groups, and pause, resume, or archive.
stackadapt_archive_ad
Archive ad
Archive one or more StackAdapt ads (creatives) so they are retired and no longer active. Returns archivedCount (ads that were not already archived), each ad's id, name, archived flag and creative status, plus userErrors. Failures are reported in userErrors with HTTP 200 (check it first); request-level problems such as an invalid token come back in a top-level errors array. Use this to retire ads for good. Use stackadapt_pause_ad instead if you may want to resume them later. Requires the ad IDs (find them with stackadapt_list_ads).
Parameters
Name
Type
Required
Description
ids
array
Required
IDs of the ads to act on, as strings. Pass one ID to act on a single ad. Example: ["5001","5002"].
stackadapt_archive_campaign
Archive campaign
stackadapt_archive_campaign_group
Archive campaign group
stackadapt_create_campaign_group
Create campaign group
stackadapt_get_ad
Get ad
stackadapt_get_advertiser
Get advertiser
stackadapt_get_campaign
Get campaign
stackadapt_get_campaign_delivery
Get campaign delivery
stackadapt_get_campaign_group
Get campaign group
stackadapt_get_campaign_group_delivery
Get campaign group delivery
stackadapt_get_token_info
Get token info
stackadapt_list_ads
List ads
stackadapt_list_advertisers
List advertisers
stackadapt_list_campaign_groups
List campaign groups
stackadapt_list_campaigns
List campaigns
stackadapt_list_custom_segments
List custom segments
stackadapt_pause_ad
Pause ad
stackadapt_pause_campaign
Pause campaign
stackadapt_pause_campaign_group
Pause campaign group
stackadapt_resume_ad
Resume ad
stackadapt_resume_campaign
Resume campaign
stackadapt_resume_campaign_group
Resume campaign group
stackadapt_update_campaign_group
Update campaign group
Build your Agent
Same auth pattern across LangChain, OpenAI, Anthropic, and Google ADK.
Python · LlamaIndex
import { ScalekitClient } from "@scalekit-sdk/node";
import { createReactAgent } from "@langchain/langgraph/prebuilt";

const sk = new ScalekitClient(env.SCALEKIT_ENV_URL, env.SCALEKIT_CLIENT_ID, env.SCALEKIT_CLIENT_SECRET);

// StackAdapt tools scoped to this user
const { tools } = await sk.tools.listScopedTools("user_123", {
  filter: { connectionNames: ["stackadapt"], toolNames: [
    "stackadapt_list_campaigns",
    "stackadapt_get_campaign_delivery",
    "stackadapt_pause_campaign"] },
  pageSize: 100,
});

const agent = createReactAgent({ llm, tools });
await agent.invoke({ messages: [{ role: "user", content: "List this advertiser's campaigns, report delivery for the Spring Launch one, and pause it" }] });
import OpenAI from "openai";
import { ScalekitClient } from "@scalekit-sdk/node";

const sk = new ScalekitClient(env.SCALEKIT_ENV_URL, env.SCALEKIT_CLIENT_ID, env.SCALEKIT_CLIENT_SECRET);
const openai = new OpenAI();

const { tools } = await sk.tools.listScopedTools("user_123", {
  filter: { connectionNames: ["stackadapt"] }, pageSize: 100,
});

const res = await openai.chat.completions.create({
  model: "gpt-5",
  messages: [{ role: "user", content: "List this advertiser's campaigns, report delivery for the Spring Launch one, and pause it" }],
  tools,
});

// Execute the tool call with the user's vaulted StackAdapt access token
await sk.tools.executeTool(res.choices[0].message.tool_calls[0], "user_123");
import Anthropic from "@anthropic-ai/sdk";
import { ScalekitClient } from "@scalekit-sdk/node";

const sk = new ScalekitClient(env.SCALEKIT_ENV_URL, env.SCALEKIT_CLIENT_ID, env.SCALEKIT_CLIENT_SECRET);
const anthropic = new Anthropic();

const { tools } = await sk.tools.listScopedTools("user_123", {
  filter: { connectionNames: ["stackadapt"] }, pageSize: 100,
});

const msg = await anthropic.messages.create({
  model: "claude-sonnet-5",
  max_tokens: 1024,
  messages: [{ role: "user", content: "List this advertiser's campaigns, report delivery for the Spring Launch one, and pause it" }],
  tools,
});

// Tool call runs with the user's vaulted StackAdapt access token
await sk.tools.executeTool(msg.content, "user_123");
import { Agent } from "@google/adk/agents";
import { ScalekitClient } from "@scalekit-sdk/node";

const sk = new ScalekitClient(env.SCALEKIT_ENV_URL, env.SCALEKIT_CLIENT_ID, env.SCALEKIT_CLIENT_SECRET);

const { tools } = await sk.tools.listScopedTools("user_123", {
  filter: { connectionNames: ["stackadapt"] }, pageSize: 100,
});

const agent = new Agent({
  name: "ad_operations_agent",
  model: "gemini-2.5-pro",
  instruction: "StackAdapt tools scoped to this user",
  tools,
});

await agent.run("List this advertiser's campaigns, report delivery for the Spring Launch one, and pause it");
Try these prompts
Copy any prompt into your agent. Each maps directly to a StackAdapt tool. Click to copy, paste into your agent, done.
Campaigns
Copy the prompt
Copied
List the active campaigns for this advertiser.
Copy the prompt
Copied
Show delivery, clicks, CTR, and cost for this campaign.
Copy the prompt
Copied
Get this campaign with its flights and attached ads.
Control
Copy the prompt
Copied
Pause the Spring Launch campaign.
Copy the prompt
Copied
Resume these 3 paused ads.
Copy the prompt
Copied
Archive the expired campaign group.
Groups and audiences
Copy the prompt
Copied
Create a campaign group under this advertiser with a shared budget.
Copy the prompt
Copied
List my custom audience segments.
Copy the prompt
Copied
Update this campaign group's frequency cap.
SEE HOW AUTH WORKS
Each user connects their own StackAdapt access token once, and Scalekit sends it with every call. Tokens stay vaulted, every call is scope checked, and every action is logged.
1
Authorize
Your user connects
StackAdapt
once. We tie it to their identity and the access they approved, with no shared bot account and no org-wide access
Who:
user ‘A’
when:
Once per user
access:
Limited to user
2
Store
Their
StackAdapt
credential lives in a vault scoped to them. User A's data is never reachable by an agent acting for user B, even on the same connection
vault:
encrypted
scope:
per-user
tenants:
isolated
3
Resolve
When your agent calls a
StackAdapt
tool, we fetch the right credential server-side. It never touches your agent, never appears in the LLM context, never shows up in your logs
speed:
~40ms
check:
before every call
seen by:
nobody
4
Audit
Every
StackAdapt
tool call is logged: who triggered it, which tool ran, what came back. 90 days of history, tied to the user who authorized it
history:
90 days
export:
SIEM-ready
logged:
every call
Test other agents
See the same per-user auth pattern across other marketing connectors.
GTM and RevOps Teams
Revenue forecast commentary
Pulls open pipeline from Salesforce and HubSpot, calculates coverage against quota, flags at-risk stages, posts commentary to Slack, and logs every snapshot to Google Sheets.
Test other agents
See the same per-user auth pattern across other marketing connectors.
GTM
Revenue forecast agent
Score pipeline coverage against quota across Salesforce and HubSpot, post forecast commentary to Slack, log snapshots to Sheets.
Why Scalekit
Secure your agent's access. Connectors ship in minutes
01.
Shared tokens break per-user analytics
A shared StackAdapt access token looks fine in a demo. In production every campaign pause and archive looks like one service account, and you cannot tell which user triggered it. Scalekit resolves the credential of the actual user who triggered the agent, never a shared bot.
// shared token
audit → bot_service_account

// scalekit
audit → user_abc ✓
02.
Authentication is not authorization
03.
Multi-tenancy is architectural
04.
StackAdapt today. Ten connectors tomorrow.
“Our agents act across Salesforce, Gong, Google Drive, and more, on behalf of every customer. Scalekit behind the scenes meant we can keep adding tools without ever rebuilding how credentials or tool calling work.”
Venu Madhav Kattagoni
Head of Engineering / Von
FAQs
Frequently Asked Questions
Does the agent access StackAdapt as the user or through a shared access token?
As the user. Each user connects their own StackAdapt access token once, and Scalekit sends it with every call. Every pause, resume, and archive in your audit trail is attributed to that user, not a shared service account.
Where is the StackAdapt access token stored?
In Scalekit's managed AES-256 token vault, namespaced per tenant. To rotate it, the user reconnects with a new access token. Revocation is a single dashboard action. Credentials never appear in prompts, logs, or LLM context.
Can I limit what the agent does in StackAdapt?
Yes. Filter by tool name in listScopedTools to expose only what you want, for example the list, get, and delivery tools without stackadapt_archive_campaign, stackadapt_archive_campaign_group, or stackadapt_archive_ad, or the pause and resume tools that change delivery. Scalekit also enforces scope checks before every API call.
What happens when a user revokes StackAdapt access?
The connection is invalidated on the next tool call. Subsequent requests for that user fail closed with a clear error. Other users in the tenant remain unaffected. The event is logged for audit.
Which permissions does the access token have?
stackadapt_get_token_info returns the identity and permissions of the access token in use, plus the StackAdapt account it belongs to, so the agent can check what it is allowed to do before it changes a campaign.
Start in your coding agent
Up and running in one command
Install the Scalekit skill in your editor of choice. Connector, auth, tools, prompt, all wired up
Claude Code REPL
/plugin marketplace add scalekit-inc/claude-code-authstack
/plugin install agentkit@scalekit-auth-stack
Cursor Code REPL
# ~/.cursor/mcp.json
{
""mcpServers"": {
""stackadapt"": {
""url"": ""https://mcp.scalekit.com/stackadapt"",
""headers"": { ""Authorization"": ""Bearer $SCALEKIT_TOKEN"" }
}
}
}
Codex Code REPL
# ~/.codex/config.toml
[mcp_servers.stackadapt]
url = ""https://mcp.scalekit.com/stackadapt""
auth_env = ""SCALEKIT_TOKEN""
Copilot Code REPL
# .vscode/mcp.json
{
""servers"": {
""stackadapt"": {
""url"": ""https://mcp.scalekit.com/stackadapt"",
""type"": ""http""
}
}
}