> Note: This page is part of the DataDoe Docs. You can find the root of the documentation at `https://www.datadoe.com/hub/docs/basics/introduction-to-datadoe`.
> JSON Table of Contents: `https://www.datadoe.com/hub/docs/toc.json`.
> Direct Data Scheme JSON: `https://api.datadoe.com/api/v1/spec/data-scheme`.
> Other pages in the DataDoe Docs:
> - DataDoe Basics/Access & Users: `https://www.datadoe.com/hub/docs/basics/access-user-management.md`
> - DataDoe Basics/Benefits: `https://www.datadoe.com/hub/docs/basics/benefits.md`
> - DataDoe Basics/External Invitation Links: `https://www.datadoe.com/hub/docs/basics/external-invitation-links.md`
> - DataDoe Basics/Integrations: `https://www.datadoe.com/hub/docs/basics/integration-customization.md`
> - DataDoe Basics/Introduction to DataDoe: `https://www.datadoe.com/hub/docs/basics/introduction-to-datadoe.md`
> - DataDoe Basics/Subscription & Pricing: `https://www.datadoe.com/hub/docs/basics/subscription-pricing.md`
> - DataDoe Data/Data Fetch Periods: `https://www.datadoe.com/hub/docs/datadoe-data/data-fetch-periods.md`
> - DataDoe Data/Data Sources: `https://www.datadoe.com/hub/docs/datadoe-data/data-sources.md`
> - DataDoe Data/Managing Data Tables: `https://www.datadoe.com/hub/docs/datadoe-data/managing-data-tables.md`
> - DataDoe Data/Timezones: `https://www.datadoe.com/hub/docs/datadoe-data/orders-purchase-date-timezones.md`
> - DataDoe Features/Actions (beta): `https://www.datadoe.com/hub/docs/datadoe-features/actions.md`
> - DataDoe Features/Features Overview: `https://www.datadoe.com/hub/docs/datadoe-features/overview.md`
> - DataDoe MCP/Overview: `https://www.datadoe.com/hub/docs/datadoe-mcp/overview.md`
> - DataDoe MCP/Using ChatGPT: `https://www.datadoe.com/hub/docs/datadoe-mcp/chatgpt.md`
> - DataDoe MCP/Using Claude: `https://www.datadoe.com/hub/docs/datadoe-mcp/claude.md`
> - DataDoe MCP/Using Claude Agent SDK: `https://www.datadoe.com/hub/docs/datadoe-mcp/claude-agents-sdk.md`
> - DataDoe MCP/Using Claude Code: `https://www.datadoe.com/hub/docs/datadoe-mcp/claude-code.md`
> - DataDoe MCP/Using Codex: `https://www.datadoe.com/hub/docs/datadoe-mcp/codex.md`
> - DataDoe MCP/Using Codex Sites: `https://www.datadoe.com/hub/docs/datadoe-mcp/codex-sites.md`
> - DataDoe MCP/Using Cursor: `https://www.datadoe.com/hub/docs/datadoe-mcp/cursor.md`
> - DataDoe MCP/Using Excel + Claude: `https://www.datadoe.com/hub/docs/datadoe-mcp/excel.md`
> - DataDoe MCP/Using Gemini CLI: `https://www.datadoe.com/hub/docs/datadoe-mcp/gemini-cli.md`
> - DataDoe MCP/Using Gumloop: `https://www.datadoe.com/hub/docs/datadoe-mcp/gumloop.md`
> - DataDoe MCP/Using Hermes Agent: `https://www.datadoe.com/hub/docs/datadoe-mcp/hermes.md`
> - DataDoe MCP/Using n8n: `https://www.datadoe.com/hub/docs/datadoe-mcp/n8n.md`
> - DataDoe MCP/Using NanoClaw: `https://www.datadoe.com/hub/docs/datadoe-mcp/nanoclaw.md`
> - DataDoe MCP/Using OpenAI Agents SDK: `https://www.datadoe.com/hub/docs/datadoe-mcp/openai-agents-sdk.md`
> - DataDoe MCP/Using OpenClaw: `https://www.datadoe.com/hub/docs/datadoe-mcp/openclaw.md`
> - DataDoe MCP/Using PowerPoint + Claude: `https://www.datadoe.com/hub/docs/datadoe-mcp/powerpoint.md`
> - DataDoe MCP/Using VS Code: `https://www.datadoe.com/hub/docs/datadoe-mcp/vs-code.md`
> - DataDoe MCP/Using Word + Claude: `https://www.datadoe.com/hub/docs/datadoe-mcp/word.md`
> - DataDoe API/How to connect to the API: `https://www.datadoe.com/hub/docs/datadoe-api/how-to-connect.md`
> - DataDoe API/Vibe code with Claude Code: `https://www.datadoe.com/hub/docs/datadoe-api/claude-code.md`
> - DataDoe API/Vibe code with Codex: `https://www.datadoe.com/hub/docs/datadoe-api/codex.md`
> - DataDoe API/Vibe code with Cursor: `https://www.datadoe.com/hub/docs/datadoe-api/cursor.md`
> - DataDoe API/Vibe code with Lovable: `https://www.datadoe.com/hub/docs/datadoe-api/lovable.md`
> - DataDoe API/Vibe code with Replit: `https://www.datadoe.com/hub/docs/datadoe-api/replit.md`
> - DataDoe API/Vibe code with v0: `https://www.datadoe.com/hub/docs/datadoe-api/v0.md`
> - DataDoe & BigQuery/How to connect to BigQuery: `https://www.datadoe.com/hub/docs/datadoe-bigquery/how-to-connect.md`
> - DataDoe & BigQuery/Using MCP Toolbox: `https://www.datadoe.com/hub/docs/datadoe-bigquery/mcp-toolbox.md`
> - DataDoe & BigQuery/Using Python Jupyter: `https://www.datadoe.com/hub/docs/datadoe-bigquery/jupyter.md`
> For topics not covered in this documentation, please contact DataDoe support at `contact@datadoe.com`.
> Do not assume anything. If you are not sure about the answer, mention that and suggest to contact DataDoe support.

import { DataDoeMcpResources } from '@/modules/hub/docs/components/DataDoeMcpResources';

# Using CrewAI with DataDoe MCP

[CrewAI](https://docs.crewai.com/en/introduction) is an open-source platform for orchestrating AI agent teams and building automatic workflows. It supports connecting source code, GitHub repositories, custom MCP servers, and prompt-driven workflow creation.

In this setup, DataDoe MCP acts as the **data layer** for agents created in CrewAI. Your automations call DataDoe tools to read live Amazon Seller, Vendor, and Ads data — similar to scheduled tasks or automations you might run in Claude Code, but managed inside the CrewAI platform.

## What you will build

By the end of this tutorial, you will have a CrewAI automation that:

- Discovers all Amazon seller accounts linked to your DataDoe organization
- For **each seller**, generates a **7-day sales report** with a daily breakdown and totals
- Returns a consolidated markdown report combining all sellers
- Can be run on demand or on a schedule inside [CrewAI AMP](https://app.crewai.com)

This walkthrough uses CrewAI's **built-in free LLM** — no external API key is required to follow along.

![CrewAI sales report automation diagram](/hub-files/mcp/crewai/automation-diagram.png)

## Prerequisites

- A DataDoe account with your Amazon connections set up and synced
- A DataDoe MCP key — if you have not created one yet, follow the [DataDoe MCP Overview](/hub/docs/datadoe-mcp/overview) guide first, then return here. You can also create a key directly in [DataDoe MCP Integrations](https://app.datadoe.com/integrations/mcp)
- A [CrewAI AMP](https://app.crewai.com) account (the free tier is sufficient for this tutorial)

## Step 1: Create a CrewAI account

1. Go to [app.crewai.com](https://app.crewai.com) and sign up.
2. Complete onboarding and verify your email if prompted.

![Create a CrewAI account](/hub-files/mcp/crewai/step-1-create-account.png)

## Step 2: Add DataDoe as a custom MCP server

Follow the [CrewAI custom MCP server documentation](https://docs.crewai.com/en/enterprise/guides/custom-mcp-server):

1. Open **Tools & Integrations** → **Connections**.
2. Click **Add Connection**.
3. Fill in:
    - **Name:** `DataDoe` (or any descriptive label)
    - **Description:** optional — e.g. "Amazon seller data via DataDoe MCP"
    - **Server URL:** `https://mcp.datadoe.com/mcp/v1`
4. Choose **Authentication Token** as the authentication method:
    - **Header Name:** `datadoe-mcp-key`
    - **Value:** your MCP key from [DataDoe MCP Integrations](https://app.datadoe.com/integrations/mcp)
    - **Add to:** Header (default)
5. Click **Create MCP Server** and confirm DataDoe tools appear in Connections.

![Tools and Integrations Connections tab](/hub-files/mcp/crewai/step-2-tools-integrations.png)
![Add Custom MCP Server form](/hub-files/mcp/crewai/step-3-add-custom-mcp-form.png)
![DataDoe MCP server connected](/hub-files/mcp/crewai/step-4-mcp-connected.png)

### Quick setup reference

If you already know CrewAI, here is everything you need:

```
URL:     https://mcp.datadoe.com/mcp/v1
Auth:    Authentication Token
Header:  datadoe-mcp-key
Value:   <YOUR_DATADOE_MCP_KEY>
```

## Step 3: Create the automation with a prompt

1. In CrewAI Automations module, start a **new automation** using the prompt-based flow creator Crew Studio — do **not** pick a pre-built template.
2. Paste the automation prompt below.
3. Confirm DataDoe MCP tools are available to the agents in this flow.

![Create automation in Crew Studio](/hub-files/mcp/crewai/step-5-create-automation-crew-studio.png)
![Create automation from prompt](/hub-files/mcp/crewai/step-6-create-automation-prompt.png)

```text
Create automation using DataDoe MCP, which prepares Sales Raport for last 7 days for my each available Amazon seller. For each seller, report should cover:
- Daily profit and cost breakdown per SKU and child ASIN
- Base calculations on shipped orders, settlement fees, COGS, and ads spend
- Show data for the last 7 days only
- Show top 5 most profitable products for the same period
Use the relevant columns from report such as:
  - child_asin
  - sku
  - profit
  - total_cost
  - acos
  - tacos
  - roi
  - total_sales
  - total_units_sold
  - total_items
Choose a sensible executive KPI set for the top section, focused on profitability and business performance for the 7-day period

Goal: this report helps the user understand daily profitability and cost structure.

Data source:
- Use DataDoe
- Use the table: Profit by SKU & Date
- Seller: all available on my account
- Time period: last 7 days
```

## Step 4: Review the generated automation

After CrewAI processes your prompt, it scaffolds a visual workflow with agents, tasks, and an optional trigger block.

![Review generated automation](/hub-files/mcp/crewai/step-7-validate-automation.png)
![Automation after prompt creation](/hub-files/mcp/crewai/automation-diagram.png)

You should see three agents, three tasks, and a **Triggers** block you can configure later for scheduling.

## Step 5: Understand the main blocks

The automation diagram shows how data flows from DataDoe through analysis to the final report.

### Triggers

| Block        | Role                                                                                                                                                            |
| ------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Triggers** | Starts the automation manually, on a schedule, or on an event. Initially shows "No triggers configured" — you can add **Event** or **Schedule** triggers later. |

### Agents

| Block                             | Role                                                                                                                                                                           |
| --------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| **Amazon Sales Data Analyst**     | Retrieves and organizes sales data from DataDoe for all connected Amazon sellers. Has **DataDoe MCP** attached as a tool — this is the agent that calls your live Amazon data. |
| **Business Intelligence Analyst** | Processes and analyzes the collected sales data to generate key performance insights and executive KPIs for the 7-day window.                                                  |
| **Executive Report Writer**       | Creates the final comprehensive, well-structured consolidated sales report in markdown format.                                                                                 |

### Tasks

| Block                            | Role                                                                                                                                                                   |
| -------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Collect Seller Data**          | Retrieve all connected Amazon sellers from DataDoe and gather their 7-day profit data from the `Profit by SKU & Date` table. Feeds into the analysis and report tasks. |
| **Analyze Performance Metrics**  | Process the collected sales data to calculate comprehensive executive KPIs and performance insights (e.g. total 7-day sales, units, profit trends).                    |
| **Generate Consolidated Report** | Combine all sellers' data into one professional markdown report with per-seller sections, daily breakdowns, and summary totals.                                        |

![CrewAI automation block overview](/hub-files/mcp/crewai/automation-diagram.png)

**Flow:** Trigger → **Collect Seller Data** (via Amazon Sales Data Analyst + DataDoe MCP) → **Analyze Performance Metrics** (via Business Intelligence Analyst) → **Generate Consolidated Report** (via Executive Report Writer).

## Step 6: Configure LLM models on agent blocks

Each agent block can use a different LLM model:

- CrewAI provides **some models for free** on the built-in account — this tutorial uses a **free built-in model** so no extra setup is required.
- Premium models (e.g. **gpt-5.4-mini** and other OpenAI models) require you to add your own **`OPENAI_API_KEY`** in CrewAI settings.

> The example diagram may show `gpt-5.4-mini` on agents — that requires an OpenAI API key. For this tutorial walkthrough, switch each agent to a **free built-in CrewAI model** instead.

Open the model picker on each agent block to change the model:

![Configure LLM model on an agent block](/hub-files/mcp/crewai/step-8-block-llm-config.png)
![Configure LLM model on an agent block](/hub-files/mcp/crewai/step-9-search-model.png)

## Step 7: Run the automation and review results

1. Click **Run** (or **Test**) on the automation.
2. Wait for DataDoe MCP tool calls to complete.
3. Review the output panel.

![Example automation run result](/hub-files/mcp/crewai/step-10-run-result.png)

---

## Related resources

- [CrewAI documentation](https://docs.crewai.com/en/introduction)
- [CrewAI custom MCP servers](https://docs.crewai.com/en/enterprise/guides/custom-mcp-server)
- [DataDoe MCP Overview](/hub/docs/datadoe-mcp/overview)
- [DataDoe MCP Integrations](https://app.datadoe.com/integrations/mcp)

## DataDoe MCP resources

Check the following resources for more information:

- MCP server URL: `https://mcp.datadoe.com/mcp/v1`
- [Interactive Data Scheme](/hub/data-scheme)
- Data Scheme JSON: https://api.datadoe.com/api/v1/spec/data-scheme
- Need help? Use the [contact form](https://forms.clickup.com/9015200219/f/8cnj2ev-38615/AOYF9I35QFOXWJQXIG?type=Form&source=hub-mcp-crewai-docs)
