Amazon Ads in Codex CLI

Connect your Amazon Ads, Seller/Vendor Central, Amazon DSP, and Amazon Marketing Cloud data to OpenAI's Codex CLI through MCP. Query campaigns, manage inventory, analyze DSP performance, and run AMC queries — all from your terminal.

Read access + opt-in editing OAuth in the browser — no API keys Connect free · $20 two-week trial · AI Connect from $10/week
Codex CLI Session
$ codex mcp add map --url https://app.marketplaceadpros.com/mcp
✓ Added MCP server "map"

$ codex
> Show DSP line items pacing under 80% this week
  for Brand X, then suggest budget shifts.
Powered by your Marketplace Ad Pros MCP connection.

Setup for Codex CLI

Two commands

  1. Sign up at app.marketplaceadpros.com and connect your Amazon Ads, Seller Central, Vendor Central, DSP, or AMC accounts (free).
  2. Install Codex CLI if you haven't already.
  3. Add the Marketplace Ad Pros MCP server:
    codex mcp add map --url https://app.marketplaceadpros.com/mcp
  4. Start a Codex session. On the first tool call you'll be redirected to your browser to log in to Marketplace Ad Pros and authorize Codex.
    codex
After authorization, Codex caches the tokens and you won't need to log in again. Run any prompt that mentions Amazon Ads, Seller Central, DSP, or AMC and Codex will discover the MAP tools automatically.
Alternative: edit config.toml directly

Codex stores MCP server configuration in ~/.codex/config.toml (or a project-scoped .codex/config.toml in trusted projects). Both the CLI and the IDE extension read from the same file. Add this block:

[mcp_servers.map]
url = "https://app.marketplaceadpros.com/mcp"

Then trigger the OAuth flow once:

codex mcp login map

You can verify the server is active inside a Codex TUI session with /mcp.

Advanced: API key (bearer token) fallback

If OAuth isn't an option (e.g. headless server with no browser), generate an API key on the Integrations page, export it as an env var, and point Codex at it via bearer_token_env_var:

export MAP_API_KEY="your_api_key_here"

Then in ~/.codex/config.toml:

[mcp_servers.map]
url = "https://app.marketplaceadpros.com/mcp"
bearer_token_env_var = "MAP_API_KEY"

Codex will send Authorization: Bearer $MAP_API_KEY on every request.

Advanced: tool allow/deny and timeouts

If you want a read-only setup, or want Codex to prompt before each write, you can scope tools and approval mode per-server in config.toml:

[mcp_servers.map]
url = "https://app.marketplaceadpros.com/mcp"
default_tools_approval_mode = "prompt"  # or "auto" / "approve"
startup_timeout_sec = 20
tool_timeout_sec = 120
# Optionally restrict to specific tools:
# enabled_tools = ["ask_report_analyst", "list_brands", "list_resources"]

See the Codex MCP docs for the full list of options.

What You Can Do

Manage every layer of your Amazon business from Codex — ads, catalog, and programmatic — through one MCP connection.

Amazon Ads

Sponsored Products, Brands, and Display. Spend, sales, ACOS, ROAS, keyword and search-term analysis, bid and budget recommendations.

Seller & Vendor Central

Orders, FBA inventory, catalog data, listings, and Brand Analytics reports. Cross-reference inventory before scaling spend.

Amazon DSP

Programmatic display campaigns, line items, creatives, and pacing. Browse, analyze, and optimize DSP from the terminal.

Amazon Marketing Cloud

Run AMC queries through AI — cross-channel attribution, new-to-brand analysis, audience insights. Closed Beta

Opt-in Editing

Turn on Edit Mode to update campaigns, ad groups, keywords, and budgets. Codex confirms each change before applying; every write is logged.

Scriptable Workflows

Because it's a CLI, you can pipe Codex into shell scripts, cron jobs, or CI pipelines for unattended reports and checks.

Frequently Asked Questions

Codex CLI is OpenAI's open-source coding agent that runs in your terminal. It can execute commands, edit files, and call MCP servers — including the Marketplace Ad Pros MCP for Amazon Ads, Seller/Vendor Central, DSP, and AMC. Codex CLI docs →

Run codex mcp add map --url https://app.marketplaceadpros.com/mcp in your terminal. The next time you start a Codex session you'll be redirected to your browser to log in and authorize access. No API keys to copy.

All of your connected Amazon Ads accounts (Sponsored Products, Sponsored Brands, Sponsored Display, DSP), Seller Central and Vendor Central data, Brand Analytics reports, and Amazon Marketing Cloud queries — all through the same MCP connection.

Not unless you ask it to. Access is read-only by default. You can opt in to write access in your settings, and even then Codex confirms before making any change. Everything is logged. More on AI editing.

Connecting your Amazon Ads accounts is free. A $20 two-week trial gives you full access. AI Connect starts at $10/week. Optimization plans with daily recommendations start at $149/month. Codex CLI itself is free from OpenAI but uses your OpenAI API credits.

Once You're Connected

Get more out of Codex with these resources.

50 AI Prompts

Copy-paste prompts for reporting, optimization, and diagnostics.

Browse Prompts

Getting Consistent Results

Fix hallucinations and wrong-account mistakes with 5 proven strategies.

Read the Guide

DSP Prompts

Prompts for managing and analyzing Amazon DSP programmatic campaigns.

DSP Prompts

Get Your Amazon Data Into Codex

Free account connection. $20 two-week trial. AI Connect from $10/week.

Get Started Free