# How to Use n8n with MCP (Server and Client Setup)

> There are three ways. To let an AI assistant use your whole n8n instance, open Settings > Instance-level MCP, enable MCP access, turn on "Available in MCP" for each workflow, and connect your client to https://<your-n8n-domain>/mcp-server/http (n8n 2.33.0 or newer). To expose one workflow as tools, add an MCP Server Trigger node and publish the workflow. To let an n8n AI agent use another MCP server, add the MCP Client Tool node to the agent.

Source page: https://aiwiserank.com/guides/n8n-mcp · Last checked: 2026-10-29 · Tool: n8n

## Which setup you need

MCP (Model Context Protocol) is the standard way AI assistants such as Claude, ChatGPT and Cursor call outside tools. n8n can sit on either side of it:

| You want to… | Use |
|---|---|
| Let Claude, Cursor or another assistant find and run your n8n workflows | **Instance-level MCP access** (one connection for the whole instance) |
| Turn one specific workflow into a set of tools with its own URL | The **MCP Server Trigger** node |
| Let an AI agent *inside* n8n use tools from another MCP server | The **MCP Client Tool** node |

## Option 1: Connect an AI assistant to your whole n8n instance

This works on n8n Cloud and self-hosted. The settings described here need **n8n 2.33.0 or newer**.

### Step 1: Turn it on

1. Go to **Settings > Instance-level MCP**. You need to be the instance owner or an admin.
2. Select **Enable MCP access**.

### Step 2: Choose which workflows assistants can use

By default, **no workflow can be run**. Assistants can only see short previews of the workflows you have access to. Enable each workflow you want them to use, in any of three places:
- the **Workflows enabled** list on the same settings page;
- **Settings > Available in MCP** inside the workflow editor;
- **Enable MCP access** in the workflow card's menu.

Add a short **description** to each enabled workflow. It's how the assistant decides which workflow fits a request.

### Step 3: Connect your client

Open **Settings > Instance-level MCP > Connect a client**. The server URL ends in `/mcp-server/http`. For Cursor and VS Code, the dialog has a **one-click setup**.

**Claude Code, signing in with OAuth (recommended):**

```shell
claude mcp add --transport http n8n https://<your-n8n-domain>/mcp-server/http
```

Then run `/mcp` in Claude Code, select **n8n**, and sign in to approve access.

**Claude Code, with an access token instead:** copy the token from the **API key** tab of the **Connect a client** dialog, then:

```shell
claude mcp add --transport http n8n-mcp https://<your-n8n-domain>/mcp-server/http \
  --header "Authorization: Bearer <YOUR_N8N_MCP_TOKEN>"
```

**Cursor**, in `~/.cursor/mcp.json`:

```json
{
  "mcpServers": {
    "n8n": {
      "type": "streamable-http",
      "url": "https://<your-n8n-domain>/mcp-server/http"
    }
  }
}
```

**VS Code**, in `.vscode/mcp.json`:

```json
{
  "servers": {
    "n8n": {
      "type": "http",
      "url": "https://<your-n8n-domain>/mcp-server/http"
    }
  }
}
```

The same dialog also lists Codex, Gemini CLI, Windsurf, Claude.ai, ChatGPT and Mistral Vibe.

**Good to know:**
- Running a workflow through MCP uses its **published** version, not your unsaved edits.
- Access isn't split per client. **Every connected assistant sees every enabled workflow.**
- Each person only sees enabled workflows they have permission to view in n8n.

## Option 2: Expose one workflow with the MCP Server Trigger node

Use this when you want a self-contained set of tools at its own URL, for example to share with a teammate's assistant.

1. Create a workflow and add the **MCP Server Trigger** node.
2. Connect the tool nodes you want to offer to it.
3. Under **Authentication**, choose **Bearer auth** or **Header auth**. **None** also works, but then anyone with the URL can use the tools.
4. The node has two URLs:
   - the **Test URL** works while you select **Listen for Test Event**, and shows the data in the editor;
   - the **Production URL** works once you **publish** the workflow. Its runs appear under **Executions**.
5. Give your assistant the **Production URL**.

The node speaks **SSE** and **streamable HTTP**, not **stdio**. For desktop apps that only start local stdio servers, such as Claude Desktop, n8n's docs use the `mcp-remote` bridge:

```json
{
  "mcpServers": {
    "n8n": {
      "command": "npx",
      "args": [
        "mcp-remote",
        "<MCP_URL>",
        "--header",
        "Authorization: Bearer ${AUTH_TOKEN}"
      ],
      "env": {
        "AUTH_TOKEN": "<MCP_BEARER_TOKEN>"
      }
    }
  }
}
```

Put this in Claude Desktop's config file. Replace `<MCP_URL>` with the Production URL and `<MCP_BEARER_TOKEN>` with your token, then restart Claude Desktop.

## Option 3: Use another MCP server inside an n8n AI agent

1. Add an **AI Agent** node to a workflow.
2. Under its **Tool** connection, add the **MCP Client Tool** node.
3. Enter the MCP server's **endpoint** URL and choose its **authentication**: bearer, header, multiple headers, OAuth2, or none.
4. Under **Tools to Include**, pick **All**, **Selected**, or **All Except**. Offering fewer tools makes the agent's choices more reliable.

If the service you want is already in n8n's built-in MCP server list, use that integration instead. The MCP Client Tool node is meant for servers that aren't listed.

## Common problems

- **The assistant sees a workflow but can't run it.** It isn't enabled for MCP yet; turn on **Available in MCP** for it.
- **It runs an old version of a workflow.** MCP runs the **published** version, so publish your latest changes.
- **The MCP Server Trigger URL stops working after you close the editor.** You used the **Test URL**. Publish the workflow and use the **Production URL**.
- **Claude Desktop can't connect.** Claude Desktop starts local servers; use the `mcp-remote` config above rather than pasting the URL directly.
- **Claude.ai asks you to sign in even though Authentication is set to None.** n8n's docs say claude.ai custom connectors do this; sign in, or set up Bearer auth.
- **Connections fail in queue mode.** If you run several webhook replicas, route all `/mcp*` requests to **one** dedicated webhook replica.
- **No "Instance-level MCP" in Settings.** Update to n8n 2.33.0 or newer. You also need to be the instance owner or an admin.

## Sources

- https://docs.n8n.io/advanced-ai/accessing-n8n-mcp-server/
- https://docs.n8n.io/connect/connect-to-n8n-mcp-server/mcp-client-examples/
- https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-langchain.mcptrigger/
- https://docs.n8n.io/integrations/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.toolmcp/
