n8n MCP Setup: Instance-Level MCP, MCP Server Trigger and MCP Client Tool (2026)
Connect n8n and MCP both ways: turn on instance-level MCP and add it to Claude Code, Codex or Cursor, expose one workflow with the MCP Server Trigger node, or call external MCP servers from an AI Agent with the MCP Client Tool.
Does n8n Support MCP?
Yes, in both directions. n8n can act as an MCP server, so Claude Desktop, Claude Code, Codex, Cursor and other MCP clients can search, run and even build your workflows. And n8n can act as an MCP client, so an AI Agent inside a workflow can call tools from any external MCP server.
There are three pieces, and picking the right one saves most of the confusion:
| You want to | Use | Where |
|---|---|---|
| Let an AI client see and run your workflows (one connection per instance) | Instance-level MCP access | Settings > Instance-level MCP |
| Expose the tools of one specific workflow as its own MCP server | MCP Server Trigger node | Inside that workflow |
| Give an n8n AI Agent tools from an external MCP server | MCP Client Tool node | Attached to an AI Agent |
This guide is checked against n8n's docs for Connect to n8n MCP server, the MCP client connection examples, the MCP Server Trigger node and the MCP Client Tool node (reviewed 2026-11-17).
Option 1: Instance-Level MCP Access (Recommended for AI Clients)
Instance-level MCP gives you one MCP server for the whole n8n instance, with central authentication. Connected clients can search your workflows, run the ones you enable, and (from n8n 2.13.0) create and edit workflows and data tables.
- In n8n, go to Settings > Instance-level MCP and select Enable MCP access. You need instance owner or admin rights. It works on n8n Cloud and self-hosted.
- Enable MCP access for each workflow you want clients to use. Nothing is exposed until you do, apart from
search_workflows, which returns previews of workflows you can already view. - Select Connect and choose OAuth (recommended) or API key. The dialog (n8n 2.33.0+) shows steps for Claude Code, Codex, Gemini CLI, Claude.ai, ChatGPT, Cursor, VS Code and Windsurf.
- Copy the Server URL. It ends in
/mcp-server/http, for examplehttps://your-instance.app.n8n.cloud/mcp-server/http. It is not the editor URL in your browser's address bar.
Add it to Claude Code with OAuth, then run /mcp, pick n8n and approve access in the browser:
claude mcp add --transport http n8n https://<your-n8n-domain>/mcp-server/http
Or with an API key (the API key tab generates a personal access token; copy it right away, n8n only shows it once):
claude mcp add --transport http n8n-mcp https://<your-n8n-domain>/mcp-server/http \
--header "Authorization: Bearer <YOUR_N8N_MCP_TOKEN>"
Codex uses codex mcp add n8n --url "https://<your-n8n-domain>/mcp-server/http" followed by codex mcp login n8n. Gemini CLI uses gemini mcp add --transport http n8n https://<your-n8n-domain>/mcp-server/http. In Claude Desktop, add a custom connector under Settings > Connectors and paste the same Server URL.
Cursor (mcp.json) takes the URL directly:
{
"mcpServers": {
"n8n": {
"type": "streamable-http",
"url": "https://<your-n8n-domain>/mcp-server/http"
}
}
}
A local install serves plain HTTP, so use http://localhost:5678/mcp-server/http there.
What to know before you enable it
- Enabled workflows are visible to every client you connect. You can't scope a workflow to one client; visibility is per user, not per client.
execute_workflowruns the published version by default; it also has a manual mode that runs the current unpublished version.- Each OAuth client keeps only the permissions you granted. Review or revoke them under Connected clients. API-key clients don't appear there.
- Self-hosted admins can remove the feature entirely with
N8N_DISABLED_MODULES=mcp.
Option 2: MCP Server Trigger (One Workflow as an MCP Server)
The MCP Server Trigger node turns a single workflow into an MCP server. Unlike normal triggers, it doesn't pass data to the next node: it only connects to tool nodes, and clients list and call those tools. Attach other workflows as tools with the Custom n8n Workflow Tool node.
- Add an MCP Server Trigger node to a new workflow and attach the tool nodes you want to expose.
- Choose authentication: None, Bearer, Header, or n8n User Auth (OAuth2) (node version 2+).
- Optionally set a fixed Path (the default is random) and Instructions that clients add to the model's system prompt.
- Use the Test URL while building (it registers when you listen for a test event) and the Production URL after you publish the workflow.
The node speaks SSE and streamable HTTP, not stdio. For a client that only runs stdio servers, n8n's docs use a gateway such as supergateway to bridge the URL.
Limits worth knowing: in queue mode with several webhook replicas, route all /mcp* requests to one dedicated replica or connections will break; behind nginx, turn off proxy buffering for the MCP path; and claude.ai custom connectors ask you to sign in even when the node's authentication is None.
Option 3: MCP Client Tool (Use External MCP Servers in n8n)
The MCP Client Tool node lets an n8n AI Agent call tools from another MCP server, such as one you found on MCP.so.
- Add an AI Agent node and a chat model.
- Attach an MCP Client Tool node as one of the agent's tools. If the service is in n8n's built-in MCP server registry, connect it from the node panel without a credential.
- Otherwise enter the server endpoint and choose authentication: Bearer, generic header, multiple headers or OAuth2.
- Under Tools to Include, choose All, Selected or All Except, so the agent only sees the tools it needs.
FAQ
What is the difference between instance-level MCP and the MCP Server Trigger? Instance-level MCP is one connection for the whole instance with central auth, and you switch workflows on one by one. The MCP Server Trigger lives inside one workflow and exposes only that workflow's tools, which is useful when you want to design a specific server.
Why does my client say it can't connect to n8n?
The most common cause is pasting the editor URL. The Server URL ends in /mcp-server/http. Also check that MCP access is enabled, that the workflow itself is enabled for MCP, and, for self-hosted setups behind a proxy, that buffering is off for the MCP endpoint.
Can an MCP client build new n8n workflows? Yes, from n8n 2.13.0 instance-level MCP includes tools to create and edit workflows and data tables, subject to the permissions you grant the client.
Can I turn MCP off again? Yes. In Connection details, open the MCP status control and choose Disable. That disconnects every connected client and revokes its access; you can enable it again later.