{
  "markdown": "# Amazon Ads MCP Server\n\nA Model Context Protocol (MCP) server that provides tools for interacting with the Amazon Advertising API. This server enables AI assistants to access and manage Amazon Ads campaigns, keywords, performance data, and more.\n\n## Features\n\nThis MCP server provides the following tools:\n\n- **get_profiles**: List all available Amazon Ads profiles/accounts\n- **get_campaigns**: Retrieve advertising campaigns with optional filtering by state and type\n- **get_campaign_performance**: Get performance metrics for campaigns (impressions, clicks, cost, sales)\n- **get_keywords**: Retrieve keywords for campaigns or ad groups\n- **update_keyword_bid**: Update bid amounts for specific keywords\n- **create_campaign**: Create new advertising campaigns\n- **get_product_ads**: Retrieve product ads for campaigns or ad groups\n\n## Prerequisites\n\n1. **Amazon Ads Account**: You need an active Amazon Ads account\n2. **API Credentials**: Register for Amazon Ads API access and obtain:\n   - Client ID\n   - Client Secret\n   - Refresh Token\n\n### Getting Amazon Ads API Credentials\n\n#### Step 1: Register Your Application\n\n1. Go to [Amazon Advertising API](https://advertising.amazon.com/API/docs/en-us/get-started/overview)\n2. Sign in with your Amazon Ads account\n3. Navigate to the Developer Center and create a new application\n4. You'll receive a **Client ID** and **Client Secret** - save these!\n\n#### Step 2: Get Your Refresh Token\n\nWe provide a helper script to obtain your refresh token through the OAuth flow:\n\n1. Create a `.env` file in the project root:\n   ```bash\n   AMAZON_ADS_CLIENT_ID=your_client_id_here\n   AMAZON_ADS_CLIENT_SECRET=your_client_secret_here\n   ```\n\n2. Run the OAuth helper script:\n   ```bash\n   npm run get-token\n   ```\n\n3. Your browser will open to Amazon's authorization page\n4. Sign in and authorize the application\n5. The script will display your **refresh token** - copy it to your `.env` file\n\n#### Step 3: Note Your Region\n\nDetermine your advertising region:\n- **NA**: North America (amazon.com)\n- **EU**: Europe (amazon.co.uk, amazon.de, etc.)\n- **FE**: Far East (amazon.co.jp, etc.)\n\n## Installation\n\n1. Clone this repository:\n```bash\ngit clone <your-repo-url>\ncd amazonads-mcp\n```\n\n2. Install dependencies:\n```bash\nnpm install\n```\n\n3. Build the project:\n```bash\nnpm run build\n```\n\n## Configuration\n\n### Environment Variables\n\nCreate a `.env` file or set the following environment variables:\n\n```bash\nAMAZON_ADS_CLIENT_ID=your_client_id\nAMAZON_ADS_CLIENT_SECRET=your_client_secret\nAMAZON_ADS_REFRESH_TOKEN=your_refresh_token\nAMAZON_ADS_REGION=NA  # Options: NA, EU, FE\nAMAZON_ADS_SANDBOX=false  # Set to true for testing with sandbox API\n```\n\n### Claude Desktop Configuration\n\nAdd this server to your Claude Desktop configuration file:\n\n**macOS**: `~/Library/Application Support/Claude/claude_desktop_config.json`\n**Windows**: `%APPDATA%/Claude/claude_desktop_config.json`\n\n```json\n{\n  \"mcpServers\": {\n    \"amazonads\": {\n      \"command\": \"node\",\n      \"args\": [\"/absolute/path/to/amazonads-mcp/build/index.js\"],\n      \"env\": {\n        \"AMAZON_ADS_CLIENT_ID\": \"your_client_id\",\n        \"AMAZON_ADS_CLIENT_SECRET\": \"your_client_secret\",\n        \"AMAZON_ADS_REFRESH_TOKEN\": \"your_refresh_token\",\n        \"AMAZON_ADS_REGION\": \"NA\"\n      }\n    }\n  }\n}\n```\n\n## Usage Examples\n\nOnce configured in Claude Desktop, you can ask Claude to:\n\n- \"Show me all my Amazon Ads campaigns\"\n- \"What are the performance metrics for campaign ID 12345 from Jan 1 to Jan 31?\"\n- \"List all keywords for campaign 12345\"\n- \"Update the bid for keyword 67890 to $1.50\"\n- \"Create a new Sponsored Products campaign with a $50 daily budget\"\n- \"Show me all product ads in campaign 12345\"\n\n## Development\n\n### Project Structure\n\n```\namazonads-mcp/\n├── src/\n│   ├── index.ts              # Main MCP server implementation\n│   └── amazon-ads-client.ts  # Amazon Ads API client\n├── build/                     # Compiled JavaScript output\n├── package.json\n├── tsconfig.json\n└── README.md\n```\n\n### Building\n\n```bash\nnpm run build\n```\n\n### Development Mode\n\nWatch for changes and rebuild automatically:\n\n```bash\nnpm run watch\n```\n\n### Testing the Server\n\nRun the server directly:\n\n```bash\nnpm start\n```\n\nThe server communicates over stdio and expects MCP protocol messages.\n\n## API Coverage\n\nThis server currently supports:\n\n- **Sponsored Products**: Full support for campaigns, keywords, and product ads\n- **Sponsored Brands**: Campaign management (partial support)\n- **Sponsored Display**: Campaign management (partial support)\n- **Reporting**: Basic performance metrics (simplified implementation)\n\n## Important Notes\n\n1. **Rate Limiting**: The Amazon Ads API has rate limits. The client does not currently implement rate limiting logic.\n\n2. **Reporting API**: The `get_campaign_performance` tool uses a simplified implementation. For production use, you should implement the full async reporting flow:\n   - Create report request\n   - Poll for report completion\n   - Download and parse report\n\n3. **Error Handling**: API errors are returned to the caller. Ensure proper credential configuration to avoid authentication errors.\n\n4. **Regions**: Make sure to set the correct region (NA, EU, FE) based on your Amazon Ads account.\n\n## Security\n\n- Never commit your `.env` file or expose API credentials\n- Refresh tokens should be stored securely\n- Consider implementing credential rotation for production use\n\n## Resources\n\n- [Amazon Ads API Documentation](https://advertising.amazon.com/API/docs/en-us)\n- [Model Context Protocol Documentation](https://modelcontextprotocol.io)\n- [MCP TypeScript SDK](https://github.com/modelcontextprotocol/typescript-sdk)\n\n## License\n\nMIT\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n",
  "bytes": 5757,
  "sha": "f4ab9be3fe9e7113e285c141b4b2f99ffc8f87a26bdbcf78a578acfb08988712",
  "repo_slug": "cprice70/amazonads-mcp",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_cprice70_amazonads_mcp_adbdbdcf/readme"
}