> ## Documentation Index
> Fetch the complete documentation index at: https://docs.hologrow.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Use CrewAI with Marrow MCP

# Use CrewAI with Marrow MCP

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

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

## What you will build

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

* discover all Amazon seller accounts linked to your Marrow organization
* generate a **7-day sales report** for **each seller**, with a daily breakdown and totals
* return a consolidated Markdown report combining all sellers
* run on demand or on a schedule inside [CrewAI AMP](https://app.crewai.com)

This walkthrough uses CrewAI's **free built-in LLM**, so you do not need an external API key.

<img src="https://mintlify.s3.us-west-1.amazonaws.com/hologrowinc/hub-files/mcp/crewai/automation-diagram.png" alt="CrewAI sales report automation diagram" />

## Prerequisites

* A Marrow account with your Amazon connections set up and synced
* A Marrow MCP key. If you have not created one yet, follow the [Marrow MCP Overview](/hologrow-marrow-mcp/overview) guide first, then return here. You can also create a key directly in [Marrow MCP Integrations](https://app.marrow.com/integrations/mcp)
* A [CrewAI AMP](https://app.crewai.com) account. The free tier is enough 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 address if prompted.

<img src="https://mintlify.s3.us-west-1.amazonaws.com/hologrowinc/hub-files/mcp/crewai/step-1-create-account.png" alt="Create a CrewAI account" />

## Step 2: Add Marrow 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:** `Marrow` (or any descriptive label)
   * **Description:** optional, for example "Amazon seller data via Marrow MCP"
   * **Server URL:** `https://mcp.marrow.com/mcp/v1`
4. Choose **Authentication Token** as the authentication method:
   * **Header Name:** `marrow-mcp-key`
   * **Value:** your MCP key from [Marrow MCP Integrations](https://app.marrow.com/integrations/mcp)
   * **Add to:** Header (default)
5. Click **Create MCP Server** and confirm Marrow tools appear in Connections.

<img src="https://mintlify.s3.us-west-1.amazonaws.com/hologrowinc/hub-files/mcp/crewai/step-2-tools-integrations.png" alt="Tools and Integrations Connections tab" />

<img src="https://mintlify.s3.us-west-1.amazonaws.com/hologrowinc/hub-files/mcp/crewai/step-3-add-custom-mcp-form.png" alt="Add Custom MCP Server form" />

<img src="https://mintlify.s3.us-west-1.amazonaws.com/hologrowinc/hub-files/mcp/crewai/step-4-mcp-connected.png" alt="Marrow MCP server connected" />

### Quick setup reference

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

```text theme={null}
URL:     https://mcp.marrow.com/mcp/v1
Auth:    Authentication Token
Header:  marrow-mcp-key
Value:   <YOUR_MARROW_MCP_KEY>
```

## Step 3: Create the automation with a prompt

1. In the 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 Marrow MCP tools are available to the agents in this flow.

<img src="https://mintlify.s3.us-west-1.amazonaws.com/hologrowinc/hub-files/mcp/crewai/step-5-create-automation-crew-studio.png" alt="Create automation in Crew Studio" />

<img src="https://mintlify.s3.us-west-1.amazonaws.com/hologrowinc/hub-files/mcp/crewai/step-6-create-automation-prompt.png" alt="Create automation from prompt" />

```text theme={null}
Create an automation using Marrow MCP that prepares a sales report for the last 7 days for each available Amazon seller. For each seller, the 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 Marrow
- Use the table: Profit by SKU & Date
- Seller: all available sellers on my account
- Time period: last 7 days
```

## Step 4: Review the generated automation

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

<img src="https://mintlify.s3.us-west-1.amazonaws.com/hologrowinc/hub-files/mcp/crewai/step-7-validate-automation.png" alt="Review generated automation" />

<img src="https://mintlify.s3.us-west-1.amazonaws.com/hologrowinc/hub-files/mcp/crewai/automation-diagram.png" alt="Automation after prompt creation" />

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 Marrow through analysis to the final report.

### Triggers

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

### Agents

| Block                             | Role                                                                                                                                                                        |
| --------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Amazon Sales Data Analyst**     | Retrieves and organises sales data from Marrow for all connected Amazon sellers. Has **Marrow MCP** attached as a tool; this is the agent that calls your live Amazon data. |
| **Business Intelligence Analyst** | Processes and analyses 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 Marrow 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, for example total 7-day sales, units, and profit trends.         |
| **Generate Consolidated Report** | Combine all sellers' data into one professional Markdown report with per-seller sections, daily breakdowns, and summary totals.                                       |

<img src="https://mintlify.s3.us-west-1.amazonaws.com/hologrowinc/hub-files/mcp/crewai/automation-diagram.png" alt="CrewAI automation block overview" />

**Flow:** Trigger → **Collect Seller Data** (via Amazon Sales Data Analyst + Marrow 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, switch each agent to a **free built-in CrewAI model** instead.

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

<img src="https://mintlify.s3.us-west-1.amazonaws.com/hologrowinc/hub-files/mcp/crewai/step-8-block-llm-config.png" alt="Configure LLM model on an agent block" />

<img src="https://mintlify.s3.us-west-1.amazonaws.com/hologrowinc/hub-files/mcp/crewai/step-9-search-model.png" alt="Configure LLM model on an agent block" />

## Step 7: Run the automation and review results

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

<img src="https://mintlify.s3.us-west-1.amazonaws.com/hologrowinc/hub-files/mcp/crewai/step-10-run-result.png" alt="Example automation run result" />

***

## Related resources

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

## Marrow MCP resources

Check the following resources for more information:

* MCP server URL: `https://mcp.marrow.com/mcp/v1`
* [Interactive Data Scheme](/hub/data-scheme)
* Data Scheme JSON: [https://api.marrow.com/api/v1/spec/data-scheme](https://api.marrow.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)
