> ## 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.

# Using n8n with Marrow MCP

# Using n8n with Marrow MCP

n8n is a workflow automation tool that helps you connect Marrow data to your AI agents using MCP.

<img src="https://mintlify.s3.us-west-1.amazonaws.com/hologrowinc/hub-files/mcp/marrow/n8n-connector.png" alt="Marrow MCP with n8n connector overview" />

## Quick setup for experienced n8n users

If you already know n8n, here is everything you need to connect Marrow MCP:

1. Add an **AI Agent** node with an **MCP Client Tool**.
2. Configure the MCP Client Tool:

* **Endpoint:** `https://mcp.marrow.com/mcp/v1`
* **Server Transport:** HTTP Streamable
* **Authentication:** Header Auth
  * **Name:** `marrow-mcp-key`
  * **Value:** your MCP key from [Marrow MCP Integrations](https://app.marrow.com/integrations/mcp)

That's it. Your AI Agent can now use all Marrow MCP tools. Read on for a detailed walkthrough or an example of saving responses to a file.

***

## Full walkthrough

### Step 1: Run n8n locally and create a new workflow

1. Start n8n locally:

```bash theme={null}
npx n8n
```

This command downloads everything you need to run n8n locally and starts it. You can then open the n8n web interface in your browser at [http://localhost:5678](http://localhost:5678).

> For other ways to run n8n, see [its documentation](https://docs.n8n.io/hosting/).

Next, click **Create Workflow** in the top-right corner.

### Step 2: Create a new node

1. Click the **Add first step...** button in the center of your screen.
2. Select the trigger node you want. This example uses the `On chat message` trigger because it matches the use case of asking the agent about the data.
3. Create a new node by clicking the `+` button right next to the trigger node.
4. Select `AI`, and then select `AI Agent`. You can choose other options, but this one is the most generic and lets you use any LLM provider you want.

### Step 3: Configure the AI node

1. After adding the AI node, you will see three `+` buttons at the bottom of the node.
2. The first one is for the **Chat Model**. Select any provider you want.
3. The second one is for **Memory**. It stores the conversation context, including what was said before and what was answered. Choose the option that suits you best. The default is fine for this example.
4. The third one is for **Tool**. It lets you use MCP tools. Click it and select **MCP Client Tool**.
5. You will now see a configuration window for the MCP Client Tool. Fill it in with these values:
   * Endpoint: [https://mcp.marrow.com/mcp/v1](https://mcp.marrow.com/mcp/v1)
   * Server Transport: HTTP Streamable
   * Authentication: Header Auth
6. To configure Header Auth, click the button marked with a green circle in the following image:

<img src="https://mintlify.s3.us-west-1.amazonaws.com/hologrowinc/hub-files/mcp/n8n/mcp-auth.png" alt="Header Auth" />

Next, you will see authentication header name and value fields. Fill them in with these values:

* Name: marrow-mcp-key
* Value: MCP key that you created on the [Marrow MCP Integrations](https://app.marrow.com/integrations/mcp) page.
* Allowed HTTP Request Domains: You can leave it as it is or change it to your preference.

Then click **Save** to save the configuration.

### Step 4: Save the AI response to a file

In this example, you save the AI Agent's response as a Markdown file on your local filesystem.

1. Click the `+` button next to the AI Agent node to add a new node.
2. Search for **Convert to File** and add it.
3. Configure the Convert to File node:
   * **Operation:** Text to File
   * **Text Input Field:** drag the output from the AI Agent node (the `output` field) into the **Text** input, or use the expression `{{ $json.output }}`.
   * **File Name:** enter a name, for example `marrow-report.md`.
   * **Encoding:** UTF-8 (default is fine).
4. Click the `+` button next to the Convert to File node to add another node.
5. Search for **Read/Write Files from Disk** and add it.
6. Configure the Read/Write Files from Disk node:
   * **Operation:** Write File to Disk
   * **File Path:** set the full path where you want to save the file, for example `/tmp/marrow-report.md`.
   * **Input Binary Field:** `data` (this is the default binary field name from Convert to File).
7. Click **Test workflow** to run the full chain. Your AI Agent will query Marrow, and the response will be saved to the file path you specified.

> The Read/Write Files from Disk node requires n8n to have access to the filesystem. When running locally, you need to allow access to the target directory before starting n8n:
>
> ```bash theme={null}
> export N8N_RESTRICT_FILE_ACCESS_TO="/tmp"
> npx n8n
> ```
>
> Replace `/tmp` with the path you want n8n to write to. If you run n8n in Docker, make sure you also mount the target directory as a volume.

### Final workflow

<img src="https://mintlify.s3.us-west-1.amazonaws.com/hologrowinc/hub-files/mcp/n8n/final-workflow.png" alt="Final workflow" />

To run the workflow, type your message in the chat input at the bottom of the screen and click **Send**. The response will be saved to the file path you specified.

***

## Related resources

* [n8n documentation](https://docs.n8n.io/)
* [n8n integrations](https://docs.n8n.io/integrations/)
* [n8n hosting](https://docs.n8n.io/hosting/)
* [n8n AI integration tutorial](https://docs.n8n.io/advanced-ai/intro-tutorial/)

## 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-n8n-docs)
