Amazon Ads MCP serverand Python AI tasks
qbash hosts a Amazon 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 Amazon Ads with models such as Claude and GPT.
Add the qbash MCP
Use Amazon Ads from Claude Code, Codex, Cursor and other MCP clients. Connect Amazon 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 advertising profiles you can reach, one per account and marketplace
- List Sponsored Products campaigns with their state, budget and bidding strategy
- Create Sponsored Products campaigns with a daily budget, targeting type and bidding strategy
- Pause, enable or rename campaigns, or change their budget and end date
- List ad groups with their state and default bid
- Create ad groups in a campaign with a default bid
Write a Amazon 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.
Find search terms to add as negative keywords
run_report pulls the last 30 days of Sponsored Products search terms. An inline prompt lists the terms that spent money without a sale, with the keyword that matched each one, as candidates for negative keywords.
report = qbash.integrations.amazon_ads.run_report(
profile_id="your-advertising-profile-id",
ad_product="SPONSORED_PRODUCTS",
report_type_id="spSearchTerm",
start_date="2026-10-13",
end_date="2026-11-11",
group_by=["searchTerm"],
columns=["campaignName", "adGroupName", "keyword", "matchType", "searchTerm", "impressions", "clicks", "cost", "purchases7d", "sales7d"],
time_unit="SUMMARY",
)
rows = report["rows"]
if rows:
review = qbash.ai.run_prompt(
slug="amazon-ads-negative-keywords",
variables={"search_terms": json.dumps(rows)},
)
qbash.output(review)
else:
qbash.output("Amazon returned no Sponsored Products search terms for these 30 days.")
Sample run_report response
{
"status": "success",
"report_id": "a1b2c3d4-0000-4000-8000-000000000001",
"report_status": "COMPLETED",
"rows": [
{
"campaignName": "SP, Yoga mats, manual",
"adGroupName": "Mats, broad",
"keyword": "yoga mat",
"matchType": "BROAD",
"searchTerm": "yoga mat thick 1 inch",
"impressions": 4810,
"clicks": 61,
"cost": 58.34,
"purchases7d": 6,
"sales7d": 209.94
},
{
"campaignName": "SP, Yoga mats, manual",
"adGroupName": "Mats, broad",
"keyword": "yoga mat",
"matchType": "BROAD",
"searchTerm": "yoga mat cleaner spray",
"impressions": 2266,
"clicks": 38,
"cost": 41.12,
"purchases7d": 0,
"sales7d": 0
},
{
"campaignName": "SP, Yoga mats, auto",
"adGroupName": "Auto targeting",
"keyword": "close-match",
"matchType": "TARGETING_EXPRESSION_PREDEFINED",
"searchTerm": "kids yoga mat",
"impressions": 1932,
"clicks": 24,
"cost": 22.7,
"purchases7d": 0,
"sales7d": 0
}
]
}
Custom MCP server
Build a custom MCP server with Amazon Ads
Create a hosted MCP server that combines Amazon Ads tools with your other connectors, Tasks and memory folders. You choose each tool it exposes, so a server can share Amazon Ads reads with write tools left off.
Share the server with your team, and each person adds it to the client they already use.
Amazon Ads MCP questions
Does Amazon Ads have an official MCP server?
Amazon Ads opened its own MCP server to Amazon Ads API partners with active API credentials in February 2026, and it is in open beta. qbash puts Amazon Ads on one URL with your other connectors, and the same methods run in Python Tasks.
What does the Amazon Ads connector need to connect?
A Login with Amazon sign-in that grants the advertising::campaign_management scope, from an account with Amazon Ads API access. Each call names the advertising profile to use, and list_profiles shows one per account and marketplace.
Why do Amazon Ads reports take a while to arrive?
The Amazon Ads API builds reports in the background, so a report is requested first and downloaded once it finishes. run_report waits for it and returns the rows, and create_report with get_report lets a Task check back later for long date ranges.
Related analytics connectors
Build a Amazon Ads task
Write it in Python with AI steps, or describe it to your coding agent through the qbash MCP.