Pinterest Ads MCP serverand Python AI tasks
qbash hosts a Pinterest Ads MCP server you can use in Claude, ChatGPT, Codex, Cursor, Grok Bot and Muse. Developers use qbash Tasks to write cloud-hosted Python functions that pair Pinterest Ads with models such as Claude and GPT.
Add the qbash MCP
Use Pinterest Ads from Claude Code, Codex, Cursor and other MCP clients. Connect Pinterest Ads in qbash, and your agent can work with its data and build Tasks that call it.
claude mcp add --transport http qbash https://mcp.qbash.com/mcp
Then run /mcp in Claude Code and sign in with qbash.
- List the Pinterest ad accounts the connected user owns or was given access to through Business Access
- Get one Pinterest ad account with its currency, time zone and the connected user's roles on it
- List the campaigns in a Pinterest ad account, optionally filtered by id or status
- Get one Pinterest campaign with its status, objective, spend caps and schedule
- List the ad groups in a Pinterest ad account, optionally for some campaigns or ad group ids
- Get one Pinterest ad group with its budget, bid, schedule and targeting
Write a Pinterest Ads task in Python
A qbash Task is a Python function hosted in the cloud. Python is the runtime and defines the process, and built-in inline prompts run on leading models such as Claude, GPT, Gemini and Grok.
Run a Task on a schedule, from an HTTP request or when a connected app sends an event. Your agents and chat tools call it over MCP.
Each run is logged with its inputs and results, and you can turn data logging off for any Task. Every Task has version control, and each run is locked to the version it ran.
Summarize a week of Pinterest Ads spend
get_ad_account_analytics returns one row per day of spend, impressions, clicks and conversions. An inline prompt totals the week and calls out the days that moved most.
end = (datetime.now(timezone.utc) - timedelta(days=1)).date()
report = qbash.integrations.pinterest_ads.get_ad_account_analytics(
ad_account_id="your-ad-account-id",
start_date=(end - timedelta(days=6)).isoformat(),
end_date=end.isoformat(),
columns=["SPEND_IN_DOLLAR", "PAID_IMPRESSION", "TOTAL_CLICKTHROUGH", "TOTAL_CONVERSIONS"],
granularity="DAY",
)
rows = report["rows"]
if rows:
summary = qbash.ai.run_prompt(
slug="pinterest-ads-weekly-summary",
variables={"rows": json.dumps(rows)},
)
qbash.output({"summary": summary})
else:
qbash.output("Pinterest recorded no ad delivery for this account last week.")
Sample get_ad_account_analytics response
{
"status": "success",
"rows": [
{
"AD_ACCOUNT_ID": "549755885175",
"DATE": "2026-11-09",
"SPEND_IN_DOLLAR": 84.12,
"PAID_IMPRESSION": 21430,
"TOTAL_CLICKTHROUGH": 312,
"TOTAL_CONVERSIONS": 9
},
{
"AD_ACCOUNT_ID": "549755885175",
"DATE": "2026-11-10",
"SPEND_IN_DOLLAR": 91.47,
"PAID_IMPRESSION": 23015,
"TOTAL_CLICKTHROUGH": 341,
"TOTAL_CONVERSIONS": 12
},
{
"AD_ACCOUNT_ID": "549755885175",
"DATE": "2026-11-11",
"SPEND_IN_DOLLAR": 63.8,
"PAID_IMPRESSION": 15822,
"TOTAL_CLICKTHROUGH": 198,
"TOTAL_CONVERSIONS": 3
}
]
}
Custom MCP server
Build a custom MCP server with Pinterest Ads
Create a hosted MCP server that combines Pinterest Ads tools with your other connectors, Tasks and memory folders. You choose each tool it exposes, so a server can share Pinterest Ads reads with write tools left off.
Share the server with your team, and each person adds it to the client they already use.
How to set it up
- Connect Pinterest Ads on the qbash Connectors page.
- Create an MCP server and add the Pinterest Ads tools you want to share.
- Paste the server URL into your client. It connects with OAuth or an access token.
Pinterest Ads MCP questions
Does Pinterest have an official Pinterest Ads MCP server?
Pinterest announced an MCP server covering ads data and insights in September 2026 and had not launched it as of November 2026. The qbash server puts Pinterest Ads on one URL with your other connectors, and the same methods run in Python tasks.
Can it create campaigns or spend money?
It can't create campaigns, ad groups or ads, and it never touches billing. It can pause, resume and rename them, and change budgets, bids and spend caps. Those edits reach live ads at once. Leave the update tools off a chat server that should only read.
Which ad accounts can it reach?
Every ad account the signed-in Pinterest user owns or reaches through Business Access. Reports need the Owner, Admin, Analyst or Campaign Manager role on that account.
How far back do reports go?
The analytics methods cover up to 90 days at a time. create_report runs a longer report of up to 186 days per request, and get_report saves the finished file to qbash as JSON or CSV.
Related analytics connectors
Build a Pinterest Ads task
Write it in Python with AI steps, or describe it to your coding agent through the qbash MCP.