Amazon data in Grok Build

One grok mcp add and the Grok CLI reads your Seller Central, Vendor Central and Amazon Ads data. Use it for nightly reports in CI, internal tools and scripts, from the same config your other coding agents already use.

  • One command
  • Read-only CI recipe
  • 14-day free trial
• Already connected elsewhere

Set up in Claude Code? Grok Build reads it.

Grok Build loads MCP servers from Claude Code and Cursor config files as well as its own, so a repo that already has DataDoe in .mcp.json needs no second setup. If it doesn’t, one command adds it. More on the Claude side: DataDoe in Claude Code.

.mcp.json · written by claude mcp add --scope project
{
  "mcpServers": {
    "datadoe": {
      "type": "http",
      "url": "https://mcp.datadoe.com/mcp/v1",
      "headers": {
        "datadoe-mcp-key": "${DATADOE_MCP_KEY}"
      }
    }
  }
}
Where Grok Build looksfirst wins
  1. 1.grok/config.tomlproject, walked up to the git root
  2. 2~/.grok/config.tomlyour user config
  3. 3.mcp.json · ~/.claude.jsonClaude CodeClaude Code
  4. 4.cursor/mcp.jsonCursorCursor
datadoe loaded from .mcp.json
Nothing in those files yet?
grok mcp add --transport http datadoe https://mcp.datadoe.com/mcp/v1

The first DataDoe call opens your browser to sign in. Then grok inspect lists every server and the file it came from, and grok mcp doctor datadoe tests the connection. A DataDoe connector that Claude Code takes from your Claude account isn’t in these files, so add it with the command.

• Headless

The report is waiting before the stand-up

grok -p runs one prompt and exits, so a scheduled CI job can ask DataDoe the same questions every morning and keep the answer as a file. An xAI API key signs the job in; your DataDoe MCP key sits next to it in the runner’s secrets.

name: amazon-nightly
on:
  schedule:
    - cron: "30 6 * * *"
  workflow_dispatch:
jobs:
  report:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - run: curl -fsSL https://x.ai/cli/install.sh | bash
      - run: echo "$HOME/.grok/bin" >> "$GITHUB_PATH"
      - name: Amazon report
        env:
          XAI_API_KEY: ${{ secrets.XAI_API_KEY }}
          DATADOE_MCP_KEY: ${{ secrets.DATADOE_MCP_KEY }}
        run: |
          mkdir -p reports
          grok --no-auto-update -p "$(cat prompts/nightly.md)" \
            --permission-mode dontAsk \
            --output-format plain > "reports/$(date +%F).md"
      - uses: actions/upload-artifact@v4
        with:
          name: amazon-report
          path: reports/
Use DataDoe. For yesterday, by marketplace:
sales, units, ad spend and TACoS, against
the 7-day average.
 
Then the five SKUs that moved most, with
the reason you can see in the data.
 
Write Markdown. Read only: do not start
any Action.
  • 06:30 UTCafter DataDoe’s overnight refresh
  • dontAskanything without an allow rule is refused
  • Artifactor commit it, or post it to Slack
• Unattended runs

A job that reads Amazon and can’t change it

Nobody is there to answer a prompt at 06:30. So lock writes twice: once in the repo, where Grok Build reads its rules, and once in DataDoe, which refuses what the account isn’t allowed to do.

  • 1Deny the write tool in the repoCommit .grok/config.toml without the key. DataDoe’s read tools are allowed, the tool that starts Actions is denied, and in Grok Build a deny always wins.
  • 2Set the Amazon accounts to Read onlyDo it on the Accounts page in DataDoe and leave Action types off. Both apply to the whole Organization, not to one key, and a live change needs both switched on.
  • 3Keep writes for a personAt your desk, Grok Build’s default Ask mode stops before each tool call. With DataDoe, writes are off by default, you can preview a change as a dry run first, and every change is logged. How Actions work

1In the repo

.grok/config.toml
[mcp_servers.datadoe]
url = "https://mcp.datadoe.com/mcp/v1"
headers = { "datadoe-mcp-key" = "${DATADOE_MCP_KEY}" }
 
[permission]
allow = ["MCPTool(datadoe__*)"]
deny  = ["MCPTool(datadoe__actions_start)"]

2In DataDoe

• Developers

Your own agent on Grok, with DataDoe as a tool

Building something of your own rather than using the CLI? The xAI API connects to DataDoe as a remote MCP tool, from the xAI SDK or the Responses endpoint. It sends the DataDoe key as a header and calls tools without asking anyone, so decide in code which tools it gets.

import os
from xai_sdk import Client
from xai_sdk.chat import user
from xai_sdk.tools import mcp
 
client = Client(api_key=os.getenv("XAI_API_KEY"))
chat = client.chat.create(
    model=os.getenv("GROK_MODEL"),
    tools=[mcp(
        server_url="https://mcp.datadoe.com/mcp/v1",
        server_label="datadoe",
        extra_headers={"datadoe-mcp-key": os.getenv("DATADOE_MCP_KEY")},
        allowed_tool_names=["sellers_and_vendors_list", "exports_sources_get",
                            "exports_source_get", "exports_create", "exports_get"],
    )],
)
chat.append(user("Sales and ad spend for yesterday, by marketplace"))
print(chat.sample().content)
curl https://api.x.ai/v1/responses \
  -H "Authorization: Bearer $XAI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "YOUR_GROK_MODEL",
    "input": "Sales and ad spend for yesterday, by marketplace",
    "tools": [{
      "type": "mcp",
      "server_url": "https://mcp.datadoe.com/mcp/v1",
      "server_label": "datadoe",
      "headers": { "datadoe-mcp-key": "YOUR_DATADOE_MCP_KEY" },
      "allowed_tools": ["sellers_and_vendors_list", "exports_sources_get",
                        "exports_source_get", "exports_create", "exports_get"]
    }]
  }'

What the API does differently

Sign-in
Header or token only. No OAuth for remote MCP, so use a DataDoe MCP key.
Approval
None. require_approval isn’t supported; the model calls tools on its own.
Scope
Pass read tools in allowed_tools, and set the Amazon accounts to Read only or leave Action types off.
FAQ

Grok Build, answered.

Install Grok Build, then run:

grok mcp add --transport http datadoe https://mcp.datadoe.com/mcp/v1

The first DataDoe call opens a browser where you sign in to DataDoe and pick the Organization; you can also open /mcps in Grok Build and press i. Add --scope project to write the server into .grok/config.toml for the whole repo.

At your own terminal, sign in: Grok Build handles OAuth for remote servers and keeps the token in ~/.grok/mcp_credentials.json. For CI, shared machines and the xAI API, use a DataDoe MCP key from Integrations → MCP in the app, sent as the datadoe-mcp-key header and read from an environment variable so it never lands in the repo.

Grok Build itself, with a SuperGrok or X Premium+ subscription or an xAI API key. Headless jobs in CI sign in with XAI_API_KEY. On DataDoe's side, The Base Plan is $97 a month and you can try it free for 14 days.

Yes, if the server is in a file. Grok Build also loads ~/.claude.json, the project .mcp.json and .cursor/mcp.json, below its own config.toml. Run grok inspect to see where each server came from. Turn the import off with [compat.claude] mcps = false or [compat.cursor] mcps = false.

Not with the recipe on this page. The repo denies MCPTool(datadoe__actions_start), the job runs with --permission-mode dontAsk, and the Amazon accounts are set to Read only in DataDoe. Writes are off by default anyway; when you do switch them on, use a Grok Build permission mode that asks before each change and preview it as a dry run first. Every change is logged.

DataDoe refreshes most tables daily, around 2:00 in the seller's local time, and key tables during the day. About two years of history is backfilled when you connect, recent data first, so week-on-week and year-on-year comparisons work from the first run.

Grok Build when you want an agent in the terminal or a CI step that asks DataDoe in plain English. The xAI API when the agent is your own product; it calls tools without approval, so limit them in code. For chat on grok.com, see Grok with DataDoe; if your team works in OpenAI's agent, Codex uses the same server.

No. This page is about the Grok Build command-line agent. The app builder on grok.com and in the mobile apps is a separate product, and we haven't tested DataDoe with it.

Want the first job set up?

Book a call and we'll add DataDoe to your repo, write the nightly prompt with you and set the Amazon accounts to Read only for CI.

Book a demo
• Get started

Amazon data, in your terminal.

Connect Seller Central, Vendor Central and Amazon Ads once, then ask from the terminal, a script or a CI job. Writes stay off until you switch them on.

  • Seller, Vendor and Ads
  • 100+ tables
  • Read-only accounts for CI
  • $97/mo, 14-day free trial