amazon-ads-mcp 0.2.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- amazon_ads_mcp-0.2.4/LICENSE +21 -0
- amazon_ads_mcp-0.2.4/PKG-INFO +664 -0
- amazon_ads_mcp-0.2.4/README.md +637 -0
- amazon_ads_mcp-0.2.4/pyproject.toml +113 -0
- amazon_ads_mcp-0.2.4/src/amazon_ads_mcp/__init__.py +11 -0
- amazon_ads_mcp-0.2.4/src/amazon_ads_mcp/auth/__init__.py +33 -0
- amazon_ads_mcp-0.2.4/src/amazon_ads_mcp/auth/base.py +211 -0
- amazon_ads_mcp-0.2.4/src/amazon_ads_mcp/auth/hooks.py +172 -0
- amazon_ads_mcp-0.2.4/src/amazon_ads_mcp/auth/manager.py +791 -0
- amazon_ads_mcp-0.2.4/src/amazon_ads_mcp/auth/oauth_state_store.py +277 -0
- amazon_ads_mcp-0.2.4/src/amazon_ads_mcp/auth/providers/__init__.py +14 -0
- amazon_ads_mcp-0.2.4/src/amazon_ads_mcp/auth/providers/direct.py +393 -0
- amazon_ads_mcp-0.2.4/src/amazon_ads_mcp/auth/providers/example_auth0.py.example +216 -0
- amazon_ads_mcp-0.2.4/src/amazon_ads_mcp/auth/providers/openbridge.py +512 -0
- amazon_ads_mcp-0.2.4/src/amazon_ads_mcp/auth/registry.py +146 -0
- amazon_ads_mcp-0.2.4/src/amazon_ads_mcp/auth/secure_token_store.py +297 -0
- amazon_ads_mcp-0.2.4/src/amazon_ads_mcp/auth/token_store.py +723 -0
- amazon_ads_mcp-0.2.4/src/amazon_ads_mcp/config/__init__.py +5 -0
- amazon_ads_mcp-0.2.4/src/amazon_ads_mcp/config/sampling.py +111 -0
- amazon_ads_mcp-0.2.4/src/amazon_ads_mcp/config/settings.py +366 -0
- amazon_ads_mcp-0.2.4/src/amazon_ads_mcp/exceptions.py +314 -0
- amazon_ads_mcp-0.2.4/src/amazon_ads_mcp/middleware/__init__.py +11 -0
- amazon_ads_mcp-0.2.4/src/amazon_ads_mcp/middleware/authentication.py +1474 -0
- amazon_ads_mcp-0.2.4/src/amazon_ads_mcp/middleware/caching.py +177 -0
- amazon_ads_mcp-0.2.4/src/amazon_ads_mcp/middleware/oauth.py +175 -0
- amazon_ads_mcp-0.2.4/src/amazon_ads_mcp/middleware/sampling.py +112 -0
- amazon_ads_mcp-0.2.4/src/amazon_ads_mcp/models/__init__.py +320 -0
- amazon_ads_mcp-0.2.4/src/amazon_ads_mcp/models/amc_models.py +837 -0
- amazon_ads_mcp-0.2.4/src/amazon_ads_mcp/models/api_responses.py +847 -0
- amazon_ads_mcp-0.2.4/src/amazon_ads_mcp/models/base_models.py +215 -0
- amazon_ads_mcp-0.2.4/src/amazon_ads_mcp/models/builtin_responses.py +496 -0
- amazon_ads_mcp-0.2.4/src/amazon_ads_mcp/models/dsp_models.py +556 -0
- amazon_ads_mcp-0.2.4/src/amazon_ads_mcp/models/stores_brands.py +610 -0
- amazon_ads_mcp-0.2.4/src/amazon_ads_mcp/server/__init__.py +6 -0
- amazon_ads_mcp-0.2.4/src/amazon_ads_mcp/server/__main__.py +6 -0
- amazon_ads_mcp-0.2.4/src/amazon_ads_mcp/server/builtin_prompts.py +269 -0
- amazon_ads_mcp-0.2.4/src/amazon_ads_mcp/server/builtin_tools.py +962 -0
- amazon_ads_mcp-0.2.4/src/amazon_ads_mcp/server/file_routes.py +547 -0
- amazon_ads_mcp-0.2.4/src/amazon_ads_mcp/server/html_templates.py +149 -0
- amazon_ads_mcp-0.2.4/src/amazon_ads_mcp/server/mcp_server.py +327 -0
- amazon_ads_mcp-0.2.4/src/amazon_ads_mcp/server/openapi_utils.py +158 -0
- amazon_ads_mcp-0.2.4/src/amazon_ads_mcp/server/sampling_handler.py +251 -0
- amazon_ads_mcp-0.2.4/src/amazon_ads_mcp/server/server_builder.py +751 -0
- amazon_ads_mcp-0.2.4/src/amazon_ads_mcp/server/sidecar_loader.py +178 -0
- amazon_ads_mcp-0.2.4/src/amazon_ads_mcp/server/transform_executor.py +827 -0
- amazon_ads_mcp-0.2.4/src/amazon_ads_mcp/tools/__init__.py +22 -0
- amazon_ads_mcp-0.2.4/src/amazon_ads_mcp/tools/cache_management.py +105 -0
- amazon_ads_mcp-0.2.4/src/amazon_ads_mcp/tools/download_tools.py +267 -0
- amazon_ads_mcp-0.2.4/src/amazon_ads_mcp/tools/identity.py +236 -0
- amazon_ads_mcp-0.2.4/src/amazon_ads_mcp/tools/oauth.py +598 -0
- amazon_ads_mcp-0.2.4/src/amazon_ads_mcp/tools/profile.py +150 -0
- amazon_ads_mcp-0.2.4/src/amazon_ads_mcp/tools/profile_listing.py +285 -0
- amazon_ads_mcp-0.2.4/src/amazon_ads_mcp/tools/region.py +320 -0
- amazon_ads_mcp-0.2.4/src/amazon_ads_mcp/tools/region_identity.py +175 -0
- amazon_ads_mcp-0.2.4/src/amazon_ads_mcp/utils/__init__.py +6 -0
- amazon_ads_mcp-0.2.4/src/amazon_ads_mcp/utils/async_compat.py +215 -0
- amazon_ads_mcp-0.2.4/src/amazon_ads_mcp/utils/errors.py +452 -0
- amazon_ads_mcp-0.2.4/src/amazon_ads_mcp/utils/export_content_type_resolver.py +249 -0
- amazon_ads_mcp-0.2.4/src/amazon_ads_mcp/utils/export_download_handler.py +579 -0
- amazon_ads_mcp-0.2.4/src/amazon_ads_mcp/utils/header_resolver.py +81 -0
- amazon_ads_mcp-0.2.4/src/amazon_ads_mcp/utils/http/__init__.py +56 -0
- amazon_ads_mcp-0.2.4/src/amazon_ads_mcp/utils/http/circuit_breaker.py +127 -0
- amazon_ads_mcp-0.2.4/src/amazon_ads_mcp/utils/http/client_manager.py +329 -0
- amazon_ads_mcp-0.2.4/src/amazon_ads_mcp/utils/http/request.py +207 -0
- amazon_ads_mcp-0.2.4/src/amazon_ads_mcp/utils/http/resilience.py +512 -0
- amazon_ads_mcp-0.2.4/src/amazon_ads_mcp/utils/http/resilient_client.py +195 -0
- amazon_ads_mcp-0.2.4/src/amazon_ads_mcp/utils/http/retry.py +76 -0
- amazon_ads_mcp-0.2.4/src/amazon_ads_mcp/utils/http_client.py +873 -0
- amazon_ads_mcp-0.2.4/src/amazon_ads_mcp/utils/media/__init__.py +21 -0
- amazon_ads_mcp-0.2.4/src/amazon_ads_mcp/utils/media/negotiator.py +243 -0
- amazon_ads_mcp-0.2.4/src/amazon_ads_mcp/utils/media/types.py +199 -0
- amazon_ads_mcp-0.2.4/src/amazon_ads_mcp/utils/openapi/__init__.py +16 -0
- amazon_ads_mcp-0.2.4/src/amazon_ads_mcp/utils/openapi/json.py +55 -0
- amazon_ads_mcp-0.2.4/src/amazon_ads_mcp/utils/openapi/loader.py +263 -0
- amazon_ads_mcp-0.2.4/src/amazon_ads_mcp/utils/openapi/refs.py +46 -0
- amazon_ads_mcp-0.2.4/src/amazon_ads_mcp/utils/region_config.py +200 -0
- amazon_ads_mcp-0.2.4/src/amazon_ads_mcp/utils/response_wrapper.py +171 -0
- amazon_ads_mcp-0.2.4/src/amazon_ads_mcp/utils/sampling_helpers.py +156 -0
- amazon_ads_mcp-0.2.4/src/amazon_ads_mcp/utils/sampling_wrapper.py +173 -0
- amazon_ads_mcp-0.2.4/src/amazon_ads_mcp/utils/security.py +630 -0
- amazon_ads_mcp-0.2.4/src/amazon_ads_mcp/utils/tool_naming.py +137 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024 KuudoAI
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,664 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: amazon-ads-mcp
|
|
3
|
+
Version: 0.2.4
|
|
4
|
+
Summary: Amazon Ads API MCP Server - Implementation for Amazon Advertising API
|
|
5
|
+
License: MIT
|
|
6
|
+
License-File: LICENSE
|
|
7
|
+
Author: Amazon Ads API MCP SDK
|
|
8
|
+
Requires-Python: >=3.10,<4.0
|
|
9
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
10
|
+
Classifier: Programming Language :: Python :: 3
|
|
11
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
12
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
16
|
+
Requires-Dist: PyYAML (>=6.0.2)
|
|
17
|
+
Requires-Dist: cryptography (>=41.0.0)
|
|
18
|
+
Requires-Dist: fastmcp (>=2.14.4,<3.0)
|
|
19
|
+
Requires-Dist: httpx (>=0.28.1)
|
|
20
|
+
Requires-Dist: openai (>=1.109.1)
|
|
21
|
+
Requires-Dist: pydantic (>=2.12.5)
|
|
22
|
+
Requires-Dist: pydantic-settings (>=2.12.0)
|
|
23
|
+
Requires-Dist: pyjwt (>=2.10.1)
|
|
24
|
+
Requires-Dist: python-dotenv (>=1.2.1)
|
|
25
|
+
Description-Content-Type: text/markdown
|
|
26
|
+
|
|
27
|
+
<div align="center">
|
|
28
|
+
|
|
29
|
+
# Amazon Ads API MCP SDK
|
|
30
|
+
|
|
31
|
+
**Build AI-powered advertising applications with the Model Context Protocol (MCP) SDK for Amazon Advertising API**
|
|
32
|
+
|
|
33
|
+
*Made with ❤️ + ☕ by [Openbridge](https://www.openbridge.com/)*
|
|
34
|
+
|
|
35
|
+
[](https://www.python.org/downloads/)
|
|
36
|
+
[](https://opensource.org/licenses/MIT)
|
|
37
|
+
|
|
38
|
+
mcp-name: io.github.tspicer/amazon_ads_mcp
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
</div>
|
|
42
|
+
|
|
43
|
+
## What Are MCP Tools?
|
|
44
|
+
Think of MCP (Model Context Protocol) as a translator between an AI model and outside systems (like Amazon Ads). Each MCP tool is like a remote control button that tells the AI how to interact with Amazon Ads. Without MCP tools, the AI would have no idea how to “talk” to Amazon Ads.
|
|
45
|
+
|
|
46
|
+
With MCP tools:
|
|
47
|
+
* The AI knows the exact endpoints to call.
|
|
48
|
+
* The AI can request campaign reports, budgets, or targeting data safely.
|
|
49
|
+
* Everything is structured, so the AI doesn’t break things by making random guesses.
|
|
50
|
+
|
|
51
|
+
👉 In short: MCP tools = a safe, well-labeled toolkit that lets AI work with the [Amazon Ads API](https://advertising.amazon.com/API/docs/en-us).
|
|
52
|
+
|
|
53
|
+
## 🚀 What is Amazon Ads API MCP SDK?
|
|
54
|
+
|
|
55
|
+
The Amazon Ads API MCP SDK is an open-source implementation that provides a robust foundation for creating AI-powered advertising tools, chatbots, and automated services.
|
|
56
|
+
|
|
57
|
+
### ✨ Key Features
|
|
58
|
+
|
|
59
|
+
- **🔌 MCP Integration**: Full Model Context Protocol compliance for AI application integration
|
|
60
|
+
- **🌍 Multi-Region Support**: NA, EU, and FE region endpoints with automatic routing
|
|
61
|
+
- **📊 Comprehensive API Coverage**: Campaigns, profiles, reporting, DSP, AMC workflows, and more
|
|
62
|
+
- **📝 Type Safety**: Full Pydantic model support with comprehensive type hints
|
|
63
|
+
- **🧪 Production Ready**: Includes testing, validation, and error handling
|
|
64
|
+
|
|
65
|
+
## 🎯 Use Cases
|
|
66
|
+
|
|
67
|
+
### Claude Desktop Integration
|
|
68
|
+
- **Campaign Management**: Ask Claude to create, update, or analyze campaigns
|
|
69
|
+
- **Performance Insights**: Get AI-powered analysis of your advertising performance
|
|
70
|
+
- **Budget Optimization**: Let Claude suggest budget adjustments based on performance
|
|
71
|
+
- **Creative Testing**: Get recommendations for ad creative improvements
|
|
72
|
+
- **Reporting**: Generate custom reports and insights on demand
|
|
73
|
+
|
|
74
|
+
### AI Applications
|
|
75
|
+
- **Marketing Chatbots**: Build conversational AI that can manage Amazon Ads campaigns
|
|
76
|
+
- **Automated Reporting**: AI-powered insights and performance analysis
|
|
77
|
+
- **Smart Budget Management**: Intelligent budget optimization using AI
|
|
78
|
+
- **Creative Optimization**: AI-driven ad creative testing and optimization
|
|
79
|
+
|
|
80
|
+
### Enterprise Services
|
|
81
|
+
- **Marketing Automation Platforms**: Integrate Amazon Ads into existing marketing tools
|
|
82
|
+
- **Agency Management Systems**: Multi-client, multi-account advertising management
|
|
83
|
+
- **E-commerce Integrations**: Connect Amazon Ads with e-commerce platforms
|
|
84
|
+
- **Analytics Dashboards**: Real-time advertising performance monitoring
|
|
85
|
+
|
|
86
|
+
### Developer Tools
|
|
87
|
+
- **API Wrappers**: Create custom SDKs for specific use cases
|
|
88
|
+
- **Testing Frameworks**: Automated testing for Amazon Ads integrations
|
|
89
|
+
- **Development Tools**: Local development and debugging utilities
|
|
90
|
+
|
|
91
|
+
## 📚 What Is Included In the Amazon Ads MCP?
|
|
92
|
+
There is broad coverage in the MCP server for the published in the Amazon Ads API. Each aligns with a collection of operations within the Amazon Ads API. This includes services like the new [Campaign Management services in the new Amazon Ads API v1](https://advertising.amazon.com/API/docs/en-us/guides/campaign-management/overview), [Exports](https://advertising.amazon.com/API/docs/en-us/guides/exports/overview), [Amazon Marketing Cloud](https://advertising.amazon.com/API/docs/en-us/guides/amazon-marketing-cloud/overview) and many more.
|
|
93
|
+
|
|
94
|
+
Here is a representative list of the various Amazon API services in the MCP:
|
|
95
|
+
|
|
96
|
+
- Accounts
|
|
97
|
+
- Audiences
|
|
98
|
+
- Reporting
|
|
99
|
+
- Brand metrics
|
|
100
|
+
- Sponsored Products
|
|
101
|
+
- Sponsored Brands
|
|
102
|
+
- Sponsored Display
|
|
103
|
+
- Amazon DSP
|
|
104
|
+
- Amazon Attribution
|
|
105
|
+
- Recommendations & insights
|
|
106
|
+
- Creatives
|
|
107
|
+
- Change history
|
|
108
|
+
- Data provider
|
|
109
|
+
- Products
|
|
110
|
+
- Unified pre-moderation
|
|
111
|
+
- Moderation
|
|
112
|
+
- Amazon Marketing Stream
|
|
113
|
+
- Locations
|
|
114
|
+
- Exports
|
|
115
|
+
- Media Planning
|
|
116
|
+
- Amazon Ads API v1 (Beta)
|
|
117
|
+
|
|
118
|
+
### 🧪 Amazon Ads API v1 (Beta)
|
|
119
|
+
|
|
120
|
+
The Amazon Ads API v1 represents a reimagined approach to the Amazon Ads API, built from the ground up to provide a seamless experience across all Amazon advertising products through a common model. One major benefit of this common model is improved compatibility with code generation tools such as client library generators.
|
|
121
|
+
|
|
122
|
+
> **⚠️ Beta Notice**: These APIs are currently in beta at Amazon. Features and endpoints may change. Use in production with caution.
|
|
123
|
+
|
|
124
|
+
| Package Name | Description | Prefix |
|
|
125
|
+
|-------------|-------------|--------|
|
|
126
|
+
| `ads-api-v1-sp` | Sponsored Products v1 | `spv1_` |
|
|
127
|
+
| `ads-api-v1-sb` | Sponsored Brands v1 | `sbv1_` |
|
|
128
|
+
| `ads-api-v1-dsp` | Amazon DSP v1 | `dspv1_` |
|
|
129
|
+
| `ads-api-v1-sd` | Sponsored Display v1 | `sdv1_` |
|
|
130
|
+
| `ads-api-v1-st` | Sponsored Television v1 | `stv1_` |
|
|
131
|
+
|
|
132
|
+
To activate Ads API v1 packages, add them to your `AMAZON_AD_API_PACKAGES` environment variable:
|
|
133
|
+
|
|
134
|
+
```bash
|
|
135
|
+
# Example: Enable Sponsored Products v1 and DSP v1
|
|
136
|
+
AMAZON_AD_API_PACKAGES="profiles,ads-api-v1-sp,ads-api-v1-dsp"
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
For more information, see Amazon's [Campaign Management Overview](https://advertising.amazon.com/API/docs/en-us/guides/campaign-management/overview).
|
|
140
|
+
|
|
141
|
+
## Installation
|
|
142
|
+
|
|
143
|
+
We recommend installing Amazon Ads API MCP with 🐳 [Docker](https://docs.astral.sh/uv/):
|
|
144
|
+
|
|
145
|
+
```bash
|
|
146
|
+
docker pull openbridge/amazon-ads-mcp
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
Copy the environment template
|
|
150
|
+
```bash
|
|
151
|
+
cp .env.example .env
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
Edit .env with your settings
|
|
155
|
+
|
|
156
|
+
Start the server with Docker Compose
|
|
157
|
+
```bash
|
|
158
|
+
docker-compose up -d
|
|
159
|
+
```
|
|
160
|
+
The server will be available at http://localhost:9080
|
|
161
|
+
|
|
162
|
+
Check logs
|
|
163
|
+
```bash
|
|
164
|
+
docker-compose logs -f
|
|
165
|
+
```
|
|
166
|
+
Stop the server
|
|
167
|
+
```bash
|
|
168
|
+
docker-compose down
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
For full installation instructions, including verification, upgrading, and developer setup, see the [**Installation Guide**](INSTALL.md).
|
|
172
|
+
|
|
173
|
+
## Configuration
|
|
174
|
+
Amazon Ads requires that all calls to the API are authorized. If you are not sure what this means, you should read the Amazon docs:
|
|
175
|
+
|
|
176
|
+
* Amazon Ads API onboarding overview: https://advertising.amazon.com/API/docs/en-us/guides/onboarding/overview
|
|
177
|
+
* Getting started with the Amazon Ads API: https://advertising.amazon.com/API/docs/en-us/guides/get-started/overview
|
|
178
|
+
|
|
179
|
+
There are two paths for connecting to the API;
|
|
180
|
+
1. Bring Your Own App (BYOA)
|
|
181
|
+
2. Leverage Partner Apps
|
|
182
|
+
|
|
183
|
+
## Bring Your Own Amazon Ads API App
|
|
184
|
+
If you have your own Amazon Ads API app, or want to create one, the process is detailed below.
|
|
185
|
+
|
|
186
|
+
### 1. Register Your Application with Amazon
|
|
187
|
+
|
|
188
|
+
1. Go to the [Amazon Developer Console](https://developer.amazon.com/)
|
|
189
|
+
2. Create or select your Login with Amazon application
|
|
190
|
+
3. Note your `Client ID` and `Client Secret`
|
|
191
|
+
4. Set your callback URL to "Allowed Return URLs". This is where you are running this server:
|
|
192
|
+
- For production: `https://your-server.com/auth/callback`
|
|
193
|
+
- For local development: `http://localhost:8000/auth/callback`
|
|
194
|
+
|
|
195
|
+
Once you have your app secured and approved by Amazon, you will need the client ID and secret:
|
|
196
|
+
```bash
|
|
197
|
+
# Amazon Ads API Credentials (required)
|
|
198
|
+
AMAZON_AD_API_CLIENT_ID="your-client-id"
|
|
199
|
+
AMAZON_AD_API_CLIENT_SECRET="your-client-secret"
|
|
200
|
+
```
|
|
201
|
+
Make sure these are in your `.env` file. Also, make sure you set your authorization method to `direct` in the same `.env`:
|
|
202
|
+
|
|
203
|
+
```bash
|
|
204
|
+
AUTH_METHOD=direct
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
### Complete OAuth Flow
|
|
208
|
+
To authorize your connection to Amazon, you need to complete an OAuth workflow as an end user. First, you need to set your region. Authorization occurs at the region level and not setting your region may cause a failure. The server will default to the `na` region. You can manually set the region with tool `set_active_region`.
|
|
209
|
+
|
|
210
|
+
* Tool: `set_active_region`
|
|
211
|
+
* Parameters: `na` | `eu` | `fe`
|
|
212
|
+
|
|
213
|
+
Example prompt: *"Set my current region to `eu`"*
|
|
214
|
+
|
|
215
|
+
### Step 1: Start OAuth
|
|
216
|
+
|
|
217
|
+
To connect to Amazon Ads API, you use an MCP tool to start your OAuth flow
|
|
218
|
+
* Tool: `start_oauth_flow`
|
|
219
|
+
* Example prompt: *"Start my OAuth flow"*
|
|
220
|
+
|
|
221
|
+
<img src="images/step1.png" alt="Step 1" style="max-width: 600px;">
|
|
222
|
+
|
|
223
|
+
### Step 2: Redirect to Amazon Ads
|
|
224
|
+
|
|
225
|
+
In this example, you are prompted to click the link that will open a browser window and request approval at Amazon.
|
|
226
|
+
|
|
227
|
+
<img src="images/step2.png" alt="Step 2" style="max-width: 600px;">
|
|
228
|
+
|
|
229
|
+
### Step 3: Approve Request
|
|
230
|
+
|
|
231
|
+
In the browser window, Amazon will prompt that you approve the request to connect.
|
|
232
|
+
|
|
233
|
+
<img src="images/step3.png" alt="Step 3" style="max-width: 600px;">
|
|
234
|
+
|
|
235
|
+
### Step 4: Success
|
|
236
|
+
|
|
237
|
+
If all goes well, you will see a success response. You can close the browser window and go back to your client. If you see something else, attempt the process again and confirm all your configuration elements are correct
|
|
238
|
+
|
|
239
|
+
<img src="images/step4.png" alt="Step 4" style="max-width: 600px;">
|
|
240
|
+
|
|
241
|
+
|
|
242
|
+
### Step 5: Confirmation
|
|
243
|
+
|
|
244
|
+
To confirm that your MCP server is connected to the Amazon Ads API, check your OAuth status
|
|
245
|
+
|
|
246
|
+
* Tool: `check_oauth_status`
|
|
247
|
+
* Example prompt: *"Check my OAuth status"*
|
|
248
|
+
|
|
249
|
+
<img src="images/step5.png" alt="Step 5" style="max-width: 600px;">
|
|
250
|
+
|
|
251
|
+
You are ready to start interacting with the Amazon Ads API system!
|
|
252
|
+
|
|
253
|
+
### Partner Applications: Token Authentication
|
|
254
|
+
You can configure your client, like Claude, to use authentication by supplying a valid access token. This is most appropriate for service accounts, long-lived API keys, CI/CD, applications where authentication is managed separately, or other non-interactive authentication methods.
|
|
255
|
+
|
|
256
|
+
#### Openbridge Partner App
|
|
257
|
+
As an Ads API Partner application provider, Openbridge offers a ready-to-go gateway to the Amazon Ads API. You log into your Openbridge account, provision a token, then set your token in your client config (see below).
|
|
258
|
+
|
|
259
|
+
First, set Openbridge as the auth method:
|
|
260
|
+
|
|
261
|
+
```bash
|
|
262
|
+
AUTH_METHOD=openbridge
|
|
263
|
+
```
|
|
264
|
+
|
|
265
|
+
That is it for the server config. To access the server, you need configure the client, like Claude Desktop, to pass the token directly. (see [Example MCP Client: Connect Claude Desktop](#example-mcp-client-connect-claude-desktop))
|
|
266
|
+
|
|
267
|
+
##### Authorized Amazon Accounts
|
|
268
|
+
|
|
269
|
+
Your Amazon authorizations reside in Openbridge. Your first step in your client is to request your current identities: `"List my remote identities"`. Next, you would tell the MCP server to use one of these identities: `"Set my remote identity to <>"`. You can then ask the MCP to `List all of my Amazon Ad profiles` linked to that account. If you do not see an advertiser listed, set a different identity.
|
|
270
|
+
|
|
271
|
+
|
|
272
|
+
### Set Your Amazon Ads MCP Packages
|
|
273
|
+
To activate, you need to set a comma-separated package to load. For example, to activate `profiles` and `amc-workflow`, set your package environment like this:
|
|
274
|
+
- `AMAZON_AD_API_PACKAGES="profiles,amc-workflow"`
|
|
275
|
+
|
|
276
|
+
Here is the list of tool packages available in the server:
|
|
277
|
+
|
|
278
|
+
- `profiles`
|
|
279
|
+
- `campaign-manage`
|
|
280
|
+
- `accounts-manager-accounts`
|
|
281
|
+
- `accounts-ads-accounts`
|
|
282
|
+
- `accounts-portfolios`
|
|
283
|
+
- `accounts-billing`
|
|
284
|
+
- `accounts-account-budgets`
|
|
285
|
+
- `audiences-discovery`
|
|
286
|
+
- `reporting-version-3`
|
|
287
|
+
- `brand-benchmarks`
|
|
288
|
+
- `brand-metrics`
|
|
289
|
+
- `stores-analytics`
|
|
290
|
+
- `sponsored-products`
|
|
291
|
+
- `sp-suggested-keywords`
|
|
292
|
+
- `sponsored-brands-v4`
|
|
293
|
+
- `sponsored-brands-v3`
|
|
294
|
+
- `sponsored-display`
|
|
295
|
+
- `dsp-measurement`
|
|
296
|
+
- `dsp-advertisers`
|
|
297
|
+
- `dsp-audiences`
|
|
298
|
+
- `dsp-conversions`
|
|
299
|
+
- `dsp-target-kpi-recommendations`
|
|
300
|
+
- `amazon-attribution`
|
|
301
|
+
- `audience-insights`
|
|
302
|
+
- `forecasts`
|
|
303
|
+
- `brand-store-manangement`
|
|
304
|
+
- `partner-opportunities`
|
|
305
|
+
- `tactical-recommendations`
|
|
306
|
+
- `persona-builder`
|
|
307
|
+
- `creative-assets`
|
|
308
|
+
- `change-history`
|
|
309
|
+
- `data-provider-data`
|
|
310
|
+
- `data-provider-hashed`
|
|
311
|
+
- `products-metadata`
|
|
312
|
+
- `products-eligibility`
|
|
313
|
+
- `unified-pre-moderation-results`
|
|
314
|
+
- `moderation-results`
|
|
315
|
+
- `amazon-marketing-stream`
|
|
316
|
+
- `locations`
|
|
317
|
+
- `exports-snapshots`
|
|
318
|
+
- `marketing-mix-modeling`
|
|
319
|
+
- `reach-forecasting`
|
|
320
|
+
- `amc-administration`
|
|
321
|
+
- `amc-workflow`
|
|
322
|
+
- `amc-rule-audience`
|
|
323
|
+
- `amc-ad-audience`
|
|
324
|
+
- `ads-api-v1-sp` *(Beta)*
|
|
325
|
+
- `ads-api-v1-sb` *(Beta)*
|
|
326
|
+
- `ads-api-v1-dsp` *(Beta)*
|
|
327
|
+
- `ads-api-v1-sd` *(Beta)*
|
|
328
|
+
- `ads-api-v1-st` *(Beta)*
|
|
329
|
+
|
|
330
|
+
You will note that some are broken up into smaller groupings. For example, Amazon Marketing Cloud has bundles; `amc-ad-audience`, `amc-administration`, `amc-rule-audience`, and `amc-workflow`. This is done to create efficiencies and optimizations that reduce context limits in many AI clients.
|
|
331
|
+
|
|
332
|
+
## Understanding Amazon Ads MCP Tools
|
|
333
|
+
|
|
334
|
+
Amazon Ads MCP tools have prefixes (like `cp_` for Campaign Performance or `amc_` for Amazon Marketing Cloud) to help organize the specific Ads API operation.
|
|
335
|
+
|
|
336
|
+
Example prefixes:
|
|
337
|
+
- `cp_` → campaign/advertising APIs
|
|
338
|
+
- `amc_` → AMC-related APIs
|
|
339
|
+
- `dsp_` → DSP APIs
|
|
340
|
+
- `sd_` → Sponsored Display
|
|
341
|
+
- `ams_` → Amazon Marketing Stream
|
|
342
|
+
- `spv1_` → Sponsored Products v1 *(Beta)*
|
|
343
|
+
- `sbv1_` → Sponsored Brands v1 *(Beta)*
|
|
344
|
+
- `dspv1_` → Amazon DSP v1 *(Beta)*
|
|
345
|
+
- `sdv1_` → Sponsored Display v1 *(Beta)*
|
|
346
|
+
- `stv1_` → Sponsored Television v1 *(Beta)*
|
|
347
|
+
|
|
348
|
+
This will translate into collections of tools that align with the API operations that are available:
|
|
349
|
+
|
|
350
|
+
**Campaign Management (`cp_`)**
|
|
351
|
+
- `cp_listCampaigns` — List all campaigns
|
|
352
|
+
- `cp_getCampaign` — Get specific campaign
|
|
353
|
+
- `cp_createCampaign` — Create new campaign
|
|
354
|
+
- `cp_updateCampaign` — Update campaign
|
|
355
|
+
- `cp_archiveCampaign` — Archive campaign
|
|
356
|
+
|
|
357
|
+
**Sponsored Products (`sp_`)**
|
|
358
|
+
- `sp_listProductAds` — List product ads
|
|
359
|
+
- `sp_createKeywords` — Create keywords
|
|
360
|
+
- `sp_updateBids` — Update keyword bids
|
|
361
|
+
- `sp_getNegativeKeywords` — Get negative keywords
|
|
362
|
+
|
|
363
|
+
**AMC Workflows (`amc_`)**
|
|
364
|
+
- `amc_listWorkflows` — List AMC workflows
|
|
365
|
+
- `amc_executeWorkflow` — Run workflow
|
|
366
|
+
- `amc_getWorkflowStatus` — Check workflow status
|
|
367
|
+
|
|
368
|
+
Users would see tools like:
|
|
369
|
+
|
|
370
|
+
- **"List my Amazon Ads campaigns"**
|
|
371
|
+
→ Claude uses: `cp_listCampaigns`
|
|
372
|
+
|
|
373
|
+
- **"Create an AMC workflow"**
|
|
374
|
+
→ Claude uses: `amc_createWorkflow`
|
|
375
|
+
|
|
376
|
+
- **"Export my sponsored products ads data"**
|
|
377
|
+
→ Claude uses: `export_createAdExport`
|
|
378
|
+
|
|
379
|
+
## 📥 Downloading Reports & Exports
|
|
380
|
+
|
|
381
|
+
When you request a report or export, the data is downloaded server-side and stored in profile-scoped directories. You can then retrieve files via HTTP.
|
|
382
|
+
|
|
383
|
+
### Download Workflow
|
|
384
|
+
|
|
385
|
+
```
|
|
386
|
+
1. Request Report 2. List Downloads 3. Get Download URL 4. Download File
|
|
387
|
+
──────────────── ─────────────── ───────────────── ─────────────────
|
|
388
|
+
"Generate a campaign "List my downloaded "Get URL for the Open URL in browser
|
|
389
|
+
performance report" files" campaign report" or use curl
|
|
390
|
+
│ │ │ │
|
|
391
|
+
▼ ▼ ▼ ▼
|
|
392
|
+
request_and_download list_downloads() get_download_url() GET /downloads/...
|
|
393
|
+
_report() │ │
|
|
394
|
+
│ │ │
|
|
395
|
+
▼ ▼ ▼
|
|
396
|
+
data/profiles/ Returns file list Returns HTTP URL
|
|
397
|
+
{profile_id}/ with metadata like:
|
|
398
|
+
reports/... http://localhost:9080/
|
|
399
|
+
downloads/reports/...
|
|
400
|
+
```
|
|
401
|
+
|
|
402
|
+
### Example Prompts
|
|
403
|
+
|
|
404
|
+
| Task | Example Prompt |
|
|
405
|
+
|------|----------------|
|
|
406
|
+
| Download a report | *"Generate a Sponsored Products report for January 2026"* |
|
|
407
|
+
| List available files | *"Show me my downloaded files"* |
|
|
408
|
+
| Get download link | *"Get the download URL for the report we just created"* |
|
|
409
|
+
| Filter by type | *"List my downloaded campaign exports"* |
|
|
410
|
+
|
|
411
|
+
### HTTP Download API
|
|
412
|
+
|
|
413
|
+
Once you have a download URL, you can retrieve files directly:
|
|
414
|
+
|
|
415
|
+
```bash
|
|
416
|
+
# List available downloads
|
|
417
|
+
curl http://localhost:9080/downloads
|
|
418
|
+
|
|
419
|
+
# Download a specific file
|
|
420
|
+
curl -O http://localhost:9080/downloads/reports/async/report_123.json.gz
|
|
421
|
+
|
|
422
|
+
# With authentication (if enabled)
|
|
423
|
+
curl -H "Authorization: Bearer your-token" \
|
|
424
|
+
-O http://localhost:9080/downloads/exports/campaigns/export.json
|
|
425
|
+
```
|
|
426
|
+
|
|
427
|
+
### Profile Isolation
|
|
428
|
+
|
|
429
|
+
Files are stored per-profile to ensure data isolation:
|
|
430
|
+
- Each profile's files are in `data/profiles/{profile_id}/`
|
|
431
|
+
- You can only access files for your active profile
|
|
432
|
+
- Set your profile first: *"Set my active profile to 123456789"*
|
|
433
|
+
HTTP download endpoints and download tools serve profile-scoped files only. Move legacy files into a profile directory for access.
|
|
434
|
+
|
|
435
|
+
## Advertiser Profiles & Regions
|
|
436
|
+
|
|
437
|
+
### Setting Your Advertiser Profile
|
|
438
|
+
Per Amazon: *Profiles play a crucial role in the Amazon Ads API by determining the management scope for a given call. A profile ID is a required credential to access an advertiser's data and services in a specific marketplace.*
|
|
439
|
+
|
|
440
|
+
You may not know what profile(s) authorization grants you access to. You can list all advertising profiles accessible by your authorization:
|
|
441
|
+
|
|
442
|
+
* Tool: `ac_listProfiles`
|
|
443
|
+
* Example prompt: *"List my advertiser profile ids"*
|
|
444
|
+
|
|
445
|
+
**Warning:** Large accounts can return very large profile lists that may exceed client context limits. Prefer these bounded tools for discovery:
|
|
446
|
+
|
|
447
|
+
* Tool: `summarize_profiles` — *"Summarize my advertiser profiles"*
|
|
448
|
+
* Tool: `search_profiles` — *"Find profiles with Acme in the name in US"*
|
|
449
|
+
* Tool: `page_profiles` — *"Show the first 20 UK profiles"*
|
|
450
|
+
* Tool: `refresh_profiles_cache` — *"Refresh my profile list cache"*
|
|
451
|
+
|
|
452
|
+
Response includes profile details:
|
|
453
|
+
- profileId, countryCode, currencyCode
|
|
454
|
+
- dailyBudget, timezone
|
|
455
|
+
- accountInfo (type: seller/vendor/agency)
|
|
456
|
+
|
|
457
|
+
Let's assume your list included profile ID `1043817530956285`. You can check for more details by getting profile details to confirm this is the one you want to use.
|
|
458
|
+
|
|
459
|
+
* Tool: `ac_getProfile`
|
|
460
|
+
* Example prompt: *"Get the details for my profile_id: `1043817530956285`"*
|
|
461
|
+
|
|
462
|
+
Assuming this is the profile you want to use, you need to **set** the profile Amazon requires for API calls:
|
|
463
|
+
* Tool: `set_active_profile`
|
|
464
|
+
* Example prompt: *"Set my active profile id to `1043817530956285`"*
|
|
465
|
+
|
|
466
|
+
When you set the profile, it determines:
|
|
467
|
+
- Which account's data you access
|
|
468
|
+
- Currency and timezone for reports
|
|
469
|
+
- Available campaigns/ads/keywords
|
|
470
|
+
|
|
471
|
+
The profile ID will be set in the background for the duration of your session. Repeat the process if you want to switch to a new profile.
|
|
472
|
+
|
|
473
|
+
Most calls to the Amazon Ads API require a Region. Each [advertiser profile ID](https://advertising.amazon.com/API/docs/en-us/guides/account-management/authorization/profiles) is associated with an advertising account in a specific region/marketplace.
|
|
474
|
+
|
|
475
|
+
The region is part of an advertiser profile. When you set an advertiser profile with `set_active_profile`, it will set the region that is associated with the profile automatically.
|
|
476
|
+
|
|
477
|
+
* Tool: `set_active_profile`
|
|
478
|
+
|
|
479
|
+
Example prompt: *"Set my active advertiser profile to `111111111111`"*
|
|
480
|
+
|
|
481
|
+
Since profile ID `111111111111` is based in `na`, the region will be set based on the profile region.
|
|
482
|
+
|
|
483
|
+
### Set Active Region
|
|
484
|
+
The Amazon Ads MCP server includes tools for managing API regions as defaults and dynamically, allowing you to switch between North America (`na`), Europe (`eu`), and Far East (`fe`) regions without restarting the server.
|
|
485
|
+
|
|
486
|
+
| Region Code | Name | API Endpoint
|
|
487
|
+
|------------|------|--------------|
|
|
488
|
+
| `na` | North America | https://advertising-api.amazon.com
|
|
489
|
+
| `eu` | Europe | https://advertising-api-eu.amazon.com
|
|
490
|
+
| `fe` | Far East | https://advertising-api-fe.amazon.com
|
|
491
|
+
|
|
492
|
+
When you set a region, the system automatically:
|
|
493
|
+
|
|
494
|
+
1. **Updates API endpoints** - Routes API calls to the correct regional endpoint
|
|
495
|
+
2. **Updates OAuth endpoints** - Uses the correct token refresh endpoint for the region
|
|
496
|
+
3. **Clears cached tokens** - Ensures fresh authentication for the new region
|
|
497
|
+
4. **Preserves other settings** - Keeps profile ID and identity settings intact
|
|
498
|
+
|
|
499
|
+
|
|
500
|
+
**IMPORTANT: Avoid Region Mismatch**: *If you attempt to set a region that is not associated with your advertiser profile, the Ads API will reject your requests. For example, if a profile ID is attached to `na` and you manually set the region to `eu`, you have created a mismatch which will cause API request failures.*
|
|
501
|
+
|
|
502
|
+
### Get Active Region
|
|
503
|
+
If you are not sure what region is set, you can check for the region
|
|
504
|
+
* Tool: `get_active_region`
|
|
505
|
+
* Returns: Current region, endpoints, and configuration source
|
|
506
|
+
|
|
507
|
+
Example prompt: *"What is my current active region?"*
|
|
508
|
+
|
|
509
|
+
## Example MCP Client: Connect Claude Desktop
|
|
510
|
+
|
|
511
|
+
Navigate to Connector Settings
|
|
512
|
+
|
|
513
|
+
Open Claude in your browser and navigate to the settings page. You can access this by clicking on your profile icon and selecting “Settings” from the dropdown menu. Once in settings, locate and click on the “Connectors” section in the sidebar. This will display your currently configured connectors and provide options to add new ones.
|
|
514
|
+
|
|
515
|
+
Edit your Claude Desktop configuration file:
|
|
516
|
+
|
|
517
|
+
**macOS**: `~/Library/Application Support/Claude/claude_desktop_config.json`
|
|
518
|
+
**Windows**: `%APPDATA%\Claude\claude_desktop_config.json`
|
|
519
|
+
**Linux**: `~/.config/Claude/claude_desktop_config.json`
|
|
520
|
+
|
|
521
|
+
In this example, we show how to use the bearer token using the Openbridge API key. Add this configuration to your `mcpServers` section:
|
|
522
|
+
|
|
523
|
+
```json
|
|
524
|
+
{
|
|
525
|
+
"mcpServers": {
|
|
526
|
+
"amazon_ads_mcp": {
|
|
527
|
+
"command": "npx",
|
|
528
|
+
"args": [
|
|
529
|
+
"-y",
|
|
530
|
+
"mcp-remote@latest",
|
|
531
|
+
"http://${HOSTNAME}:${PORT}/mcp/",
|
|
532
|
+
"--allow-http",
|
|
533
|
+
"--header",
|
|
534
|
+
"Authorization:Bearer ${OPENBRIDGE_API_KEY}",
|
|
535
|
+
"--header",
|
|
536
|
+
"Accept:application/json,text/event-stream",
|
|
537
|
+
"--debug"
|
|
538
|
+
],
|
|
539
|
+
"env": {
|
|
540
|
+
"MCP_TIMEOUT": "300",
|
|
541
|
+
"HOSTNAME": "your_hostname",
|
|
542
|
+
"PORT": "your_server_port",
|
|
543
|
+
"MCP_TIMEOUT": "120000",
|
|
544
|
+
"MCP_REQUEST_TIMEOUT": "60000",
|
|
545
|
+
"MCP_CONNECTION_TIMEOUT": "10000",
|
|
546
|
+
"MCP_SERVER_REQUEST_TIMEOUT": "60000",
|
|
547
|
+
"MCP_TOOL_TIMEOUT": "120000",
|
|
548
|
+
"MCP_REQUEST_WARNING_THRESHOLD": "10000",
|
|
549
|
+
"OPENBRIDGE_API_KEY": "your_openbridge_token_here"
|
|
550
|
+
}
|
|
551
|
+
}
|
|
552
|
+
}
|
|
553
|
+
}
|
|
554
|
+
```
|
|
555
|
+
**Note**: Replace `hostname`, `port` and `your_openbridge_token_here` with your actual OpenBridge token.
|
|
556
|
+
|
|
557
|
+
**IMPORTANT**: Cursor and Claude Desktop (Windows) have a bug where spaces inside args aren't escaped when it invokes npx, which ends up mangling these values. You can work around it using: [mcp-remote custom headers documentation](https://github.com/geelen/mcp-remote?tab=readme-ov-file#custom-headers).
|
|
558
|
+
|
|
559
|
+
The config would look something like this:
|
|
560
|
+
|
|
561
|
+
|
|
562
|
+
```json
|
|
563
|
+
{
|
|
564
|
+
"mcpServers": {
|
|
565
|
+
"amazon_ads_mcp": {
|
|
566
|
+
"command": "npx",
|
|
567
|
+
"args": [
|
|
568
|
+
"-y",
|
|
569
|
+
"mcp-remote",
|
|
570
|
+
"http://${HOSTNAME}:${PORT}/mcp/",
|
|
571
|
+
"--allow-http",
|
|
572
|
+
"--header",
|
|
573
|
+
"Authorization:${AUTH_HEADER}"
|
|
574
|
+
"--header",
|
|
575
|
+
"Accept: application/json, text/event-stream"
|
|
576
|
+
],
|
|
577
|
+
"env": {
|
|
578
|
+
"MCP_TIMEOUT": "300",
|
|
579
|
+
"HOSTNAME": "your_hostname",
|
|
580
|
+
"PORT": "your_server_port",
|
|
581
|
+
"MCP_TIMEOUT": "120000",
|
|
582
|
+
"MCP_REQUEST_TIMEOUT": "60000",
|
|
583
|
+
"MCP_CONNECTION_TIMEOUT": "10000",
|
|
584
|
+
"MCP_SERVER_REQUEST_TIMEOUT": "60000",
|
|
585
|
+
"MCP_TOOL_TIMEOUT": "120000",
|
|
586
|
+
"MCP_REQUEST_WARNING_THRESHOLD": "10000",
|
|
587
|
+
"AUTH_HEADER": "Bearer <your_openbridge_token_here>"
|
|
588
|
+
}
|
|
589
|
+
}
|
|
590
|
+
}
|
|
591
|
+
}
|
|
592
|
+
```
|
|
593
|
+
|
|
594
|
+
Here is another example, which can be used if you are using OAuth since the `OPENBRIDGE_API_KEY` is not needed:
|
|
595
|
+
|
|
596
|
+
```json
|
|
597
|
+
{
|
|
598
|
+
"mcpServers": {
|
|
599
|
+
"amazon_ads_mcp": {
|
|
600
|
+
"command": "npx",
|
|
601
|
+
"args": [
|
|
602
|
+
"-y",
|
|
603
|
+
"mcp-remote@latest",
|
|
604
|
+
"http://localhost:9080/mcp/",
|
|
605
|
+
"--allow-http"
|
|
606
|
+
],
|
|
607
|
+
"env": {
|
|
608
|
+
"MCP_TIMEOUT": "120000",
|
|
609
|
+
"MCP_REQUEST_TIMEOUT": "60000",
|
|
610
|
+
"MCP_CONNECTION_TIMEOUT": "10000",
|
|
611
|
+
"MCP_SERVER_REQUEST_TIMEOUT": "60000",
|
|
612
|
+
"MCP_TOOL_TIMEOUT": "120000",
|
|
613
|
+
"MCP_REQUEST_WARNING_THRESHOLD": "10000"
|
|
614
|
+
}
|
|
615
|
+
}
|
|
616
|
+
}
|
|
617
|
+
}
|
|
618
|
+
```
|
|
619
|
+
|
|
620
|
+
*Note: For various Claude configurations similar to what was shown above, see the [MCP Remote docs](https://github.com/geelen/mcp-remote) for the latest settings/options.*
|
|
621
|
+
|
|
622
|
+
### 3. Restart Claude Desktop
|
|
623
|
+
|
|
624
|
+
After saving the configuration file, restart Claude Desktop to load the new MCP server.
|
|
625
|
+
|
|
626
|
+
## ⚠️ Context Limits and Active MCP Server Tools
|
|
627
|
+
MCP tool registration and use can impact your AI systems usage limits. Usage limits control how much you can interact with an AI system, like Claude, over a specific time period. As Anthropic states, think of the amount of information/data used as drawing down on a "conversation budget". That budget determines how many messages you can send to your AI client, or how long you can work, before needing to wait for your limit to reset.
|
|
628
|
+
|
|
629
|
+
MCP Server tools contribute metadata like titles, descriptions, hints, and schemas to the model's context. This metadata is loaded into the LLM’s context window, which acts as its short-term working memory.
|
|
630
|
+
|
|
631
|
+
Each client, like Claude, has a fixed-size context window. This defines the maximum amount of information it can process in a single interaction—including user prompts, system instructions, tool metadata, and any prior messages.
|
|
632
|
+
|
|
633
|
+
The more tools you activate, the more of that limited space gets consumed up front. When you activate many tools, their combined schema and config payloads can significantly use up this context and you may quickly hit the context ceiling. This is when you’ll start seeing errors or warnings about exceeding the chat length limit.
|
|
634
|
+
|
|
635
|
+
**The Amazon Ads MCP provides coverage across the entire API. As a result, there can be 100s of tools!**
|
|
636
|
+
|
|
637
|
+
* More tools = less room for user interaction: Activating unnecessary tools reduces available space for your actual prompt or data.
|
|
638
|
+
* Start small: Activate only what you need for the current task. You can always add more later.
|
|
639
|
+
|
|
640
|
+
If you're encountering unexpected length issues, review which tools are active. Trimming unused ones can help minimize context use.
|
|
641
|
+
|
|
642
|
+
## Troubleshooting
|
|
643
|
+
|
|
644
|
+
**Server not connecting?**
|
|
645
|
+
- Ensure the Docker container is running: `docker-compose ps`
|
|
646
|
+
- Check server logs: `docker-compose logs -f`
|
|
647
|
+
- Verify the port is correct (8765 by default)
|
|
648
|
+
|
|
649
|
+
**Authentication errors?**
|
|
650
|
+
- Check your OpenBridge token is valid
|
|
651
|
+
- Ensure the token is properly set in the environment
|
|
652
|
+
- Verify your Amazon Ads API access
|
|
653
|
+
|
|
654
|
+
**Claude not recognizing the server?**
|
|
655
|
+
- Restart Claude Desktop after configuration changes
|
|
656
|
+
- "Reload Page" in Claude Desktop if the MCP is not active
|
|
657
|
+
- Check the JSON syntax is valid
|
|
658
|
+
- Ensure the server name matches exactly
|
|
659
|
+
|
|
660
|
+
|
|
661
|
+
## 📄 License
|
|
662
|
+
|
|
663
|
+
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
|
|
664
|
+
|