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

# n8n

> Call Spiral's tools from an n8n workflow or AI Agent with the MCP Client nodes and an API key.

n8n reaches Spiral through two nodes: **MCP Client**, which runs one tool as a workflow step, and **MCP Client Tool**,
which gives an **AI Agent** node every Spiral tool to choose from. Both work on n8n Cloud and self-hosted n8n.

**1. Create a key**

Create a key under **API keys** in the [console](https://spiral.ai/start).

**2. Add an MCP Client node**

In a workflow, add an **MCP Client** node (or, under an **AI Agent** node, an **MCP Client Tool**) and set:

* **Server Transport**: **HTTP Streamable**

* **MCP Endpoint URL**:

  ```text theme={null}
  https://api.spiral.ai/mcp
  ```

* **Authentication**: **Bearer Auth**. Create a credential and paste the key as its **Bearer Token**.

n8n keeps the key in its encrypted credentials; it is never part of the workflow.

**3. Pick a tool**

The node lists Spiral's tools. In an **MCP Client** node pick one, such as `run`, and give it its arguments:

```json theme={null}
{
  "provider": "fal",
  "model": "fal-ai/flux/schnell",
  "input": { "prompt": "a lighthouse at dawn" },
  "wait": true
}
```

With **MCP Client Tool**, keep **Tools to Include** on **All** and ask the agent:

```text theme={null}
Find a text-to-image tool, tell me what one image costs, then generate a lighthouse at dawn.
```

> [accordion] Sign in instead of a key
>
> Newer n8n versions offer **OAuth2** as the **Authentication**. Create an **MCP OAuth2 API** credential, keep
> **Use Dynamic Client Registration** on, enter `https://api.spiral.ai/mcp` as the server and connect: Spiral
> opens, you sign in, pick the organization and click **Authorize**.

[Guides for every tool in n8n](https://spiral.ai/integrations/n8n): each tool's prompts, options and price.

If something does not work, see [Troubleshooting](/docs/mcp-server.md#troubleshooting).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.