amazonads-mcp
Amazon Ads MCP Server
一个 Model Context Protocol (MCP) 服务器,提供用于与 Amazon Advertising API 交互的工具。该服务器使 AI 助手能够访问和管理 Amazon Ads 广告活动、关键词、性能数据等。
功能
此 MCP 服务器提供以下工具:
get_profiles:列出所有可用的 Amazon Ads 配置文件/账户
get_campaigns:检索广告活动,可按状态和类型进行筛选
get_campaign_performance:获取广告活动的绩效指标(展示次数、点击次数、花费、销售额)
get_keywords:检索广告活动或广告组的关键词
update_keyword_bid:更新特定关键词的出价金额
create_campaign:创建新的广告活动
get_product_ads:检索广告活动或广告组的商品广告
Related MCP server: TikTok Ads MCP Server
前提条件
Amazon Ads 账户:您需要一个有效的 Amazon Ads 账户
API 凭据:注册 Amazon Ads API 访问权限并获取:
Client ID
Client Secret
Refresh Token
获取 Amazon Ads API 凭据
步骤 1:注册您的应用程序
使用您的 Amazon Ads 账户登录
导航到开发者中心并创建一个新应用程序
您将收到一个 Client ID 和 Client Secret - 请保存好!
步骤 2:获取您的 Refresh Token
我们提供了一个辅助脚本,通过 OAuth 流程获取您的 refresh token:
在项目根目录创建一个
.env文件:AMAZON_ADS_CLIENT_ID=your_client_id_here AMAZON_ADS_CLIENT_SECRET=your_client_secret_here运行 OAuth 辅助脚本:
npm run get-token您的浏览器将打开 Amazon 的授权页面
登录并授权该应用程序
脚本将显示您的 refresh token - 将其复制到您的
.env文件中
步骤 3:注意您的区域
确定您的广告区域:
NA:北美(amazon.com)
EU:欧洲(amazon.co.uk、amazon.de 等)
FE:远东(amazon.co.jp 等)
安装
克隆此仓库:
git clone <your-repo-url>
cd amazonads-mcp安装依赖:
npm install构建项目:
npm run build配置
环境变量
创建 .env 文件或设置以下环境变量:
AMAZON_ADS_CLIENT_ID=your_client_id
AMAZON_ADS_CLIENT_SECRET=your_client_secret
AMAZON_ADS_REFRESH_TOKEN=your_refresh_token
AMAZON_ADS_REGION=NA # Options: NA, EU, FE
AMAZON_ADS_SANDBOX=false # Set to true for testing with sandbox APIClaude Desktop 配置
将此服务器添加到您的 Claude Desktop 配置文件中:
macOS:~/Library/Application Support/Claude/claude_desktop_config.json
Windows:%APPDATA%/Claude/claude_desktop_config.json
{
"mcpServers": {
"amazonads": {
"command": "node",
"args": ["/absolute/path/to/amazonads-mcp/build/index.js"],
"env": {
"AMAZON_ADS_CLIENT_ID": "your_client_id",
"AMAZON_ADS_CLIENT_SECRET": "your_client_secret",
"AMAZON_ADS_REFRESH_TOKEN": "your_refresh_token",
"AMAZON_ADS_REGION": "NA"
}
}
}
}使用示例
在 Claude Desktop 中配置完成后,您可以要求 Claude:
"显示我所有的 Amazon Ads 广告活动"
"广告活动 ID 12345 从 1 月 1 日到 1 月 31 日的绩效指标是什么?"
"列出广告活动 12345 的所有关键词"
"将关键词 67890 的出价更新为 1.50 美元"
"创建一个每日预算为 50 美元的新 Sponsored Products 广告活动"
"显示广告活动 12345 中的所有商品广告"
开发
项目结构
amazonads-mcp/
├── src/
│ ├── index.ts # Main MCP server implementation
│ └── amazon-ads-client.ts # Amazon Ads API client
├── build/ # Compiled JavaScript output
├── package.json
├── tsconfig.json
└── README.md构建
npm run build开发模式
监视更改并自动重新构建:
npm run watch测试服务器
直接运行服务器:
npm start服务器通过 stdio 进行通信,并期望接收 MCP 协议消息。
API 覆盖范围
此服务器目前支持:
Sponsored Products:全面支持广告活动、关键词和商品广告
Sponsored Brands:广告活动管理(部分支持)
Sponsored Display:广告活动管理(部分支持)
报告:基本绩效指标(简化实现)
重要说明
速率限制:Amazon Ads API 有速率限制。该客户端目前未实现速率限制逻辑。
Reporting API:
get_campaign_performance工具使用简化实现。对于生产环境,您应实现完整的异步报告流程:创建报告请求
轮询报告完成状态
下载并解析报告
错误处理:API 错误会返回给调用方。请确保正确配置凭据,以避免身份验证错误。
区域:请根据您的 Amazon Ads 账户设置正确的区域(NA、EU、FE)。
安全
切勿提交您的
.env文件或暴露 API 凭据Refresh token 应安全存储
考虑在生产环境中实施凭据轮换
资源
许可证
MIT
贡献
欢迎贡献!请随时提交 Pull Request。
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Flicense-qualityFmaintenanceEnables users to analyze, manage, and optimize digital advertising campaigns through natural language conversations in Claude, offering performance insights, interactive visualizations, and campaign management for platforms like Amazon Ads.4
- Alicense-qualityBmaintenanceEnables AI assistants to manage TikTok advertising campaigns through the TikTok Ads API. Supports campaign creation, performance analytics, audience management, creative operations, and custom reporting through natural language interactions.48MIT
- AlicenseAqualityAmaintenanceEnables AI applications to interact with Amazon Advertising API through the Model Context Protocol. Supports campaign management, performance reporting, audience targeting, and comprehensive advertising operations across Amazon's advertising ecosystem.464MIT
- -license-quality-maintenanceEnables AI assistants to manage Google Ads accounts by providing tools for querying account data and performing write operations such as updating campaign budgets, statuses, and bidding strategies.2
Related MCP Connectors
Manage Google, Meta, Amazon, TikTok, LinkedIn & ChatGPT ads. 430 tools for campaigns & analytics.
Manage ad campaigns across Google, Meta, LinkedIn, Reddit, TikTok, and more via AI.
Manage ad campaigns across Google, Meta, LinkedIn, Reddit, TikTok, and more via AI.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/cprice70/amazonads-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server