Skip to content
Mia Automation
NLEN Sign in Put Mia to workGet started

n8n MCP: expose your workflows to AI apps, and use MCP servers from n8n

MCP (Model Context Protocol) is the standard that lets an AI app use tools from another program, and n8n speaks it in both directions. As an MCP server, n8n makes your workflows available to Claude, ChatGPT or a coding agent, either per workflow with the MCP Server Trigger or for your whole instance with the built-in MCP server. As an MCP client, an n8n agent uses the tools of another MCP server. We built and tested both directions on n8n 2.47.3.

Automation recipesUpdated 7 min read

Tested by us on 11 November 2026.

Animated diagram: an AI app asks n8n's MCP server for a tool, the tool runs a workflow that calculates or writes a row, and the answer goes back to the AI app.
Direction 1: n8n as an MCP server. The AI app picks a tool, n8n runs it.

Three ways to combine n8n and MCP

Tested on n8n 2.47.3 on November 11, 2026.
ApproachWhat the AI app can doWhen to use it
MCP Server Trigger in one workflowOnly the tools you attach to that workflowYou want tight control over what an AI app may do, such as read-only access
n8n's built-in MCP serverSearch, build, validate, test and run workflows; 57 tools on our instanceYou want an AI app or coding agent to build workflows for you
MCP Client Tool in an agentAn n8n agent uses the tools of another MCP serverYour agent needs a service that offers an MCP server

Recipe 1: a workflow as an MCP server

We built an MCP server with two tools: *business_overview* (open invoices and quotes, all totals precalculated) and *add_lead* (a new row in the lead list). An AI app that connects sees those two and nothing else.

  1. MCP Server Trigger

    Drop the trigger on a new canvas. Set Authentication to *Bearer Auth* and create a credential with a long random token. Give it a fixed path; ours is *books*. Under *Instructions*, describe when each tool may be used.

  2. Attach the tools

    A *Call n8n Workflow Tool* for the overview and a Data Table tool for the lead. Give each tool a short, accurate description, because that's what the AI app reads to choose. With $fromAI() the AI app fills in fields such as name and email.

  3. Publish

    After Publish, the server lives at https://<your-n8n>/mcp/books. The test URL only works while the editor is listening for a test event.

  4. Test with MCP Inspector

    The official MCP Inspector has a command-line mode, so you can check your tools without an AI app.

    bash
    npx -y @modelcontextprotocol/inspector --cli https://<your-n8n>/mcp/books --transport http --header "Authorization: Bearer <token>" --method tools/list
n8n canvas with an MCP Server Trigger and two tools underneath: business_overview and add_lead. (opens at full size)
The MCP server in n8n: one trigger, two tools.
Terminal output from MCP Inspector: the tools add_lead and business_overview are listed, add_lead inserts a row, and with a wrong token n8n answers with a 403 error. (opens at full size)
Our MCP Inspector test, shortened. A wrong token got a 403.

In our test, the Inspector listed both tools with the descriptions and fields we set. The overview came back with the totals already calculated, and *add_lead* inserted a test lead with *mcp* as its source. With a wrong token, n8n refused with *Authorization data is wrong* and status 403, and it did the same with no token at all. Template: 15-your-books-as-mcp-server.json, plus the helper workflow 12-business-overview-helper.json.

Connect it to Claude Code or Claude Desktop

In Claude Code you add the server with one command; --header carries the token, and --scope user makes the server available in all your projects. For Claude Desktop, n8n's docs describe a route through the mcp-remote package. To be clear, we didn't run these two commands ourselves. In our test setup, n8n ran on a different machine than Claude Code, so we connected Claude Code to n8n's built-in MCP server through a small relay of our own. That worked; the command below is the one Claude Code's docs give.

bash
claude mcp add --transport http n8n-books https://<your-n8n>/mcp/books --header "Authorization: Bearer <token>"
claude mcp list

Command as documented by Claude Code, checked November 11, 2026.

Recipe 2: n8n's built-in MCP server

n8n also has an MCP server for the whole instance. Turn it on under Settings, Instance-level MCP, or on a self-hosted instance with the environment variables N8N_MCP_MANAGED_BY_ENV=true and N8N_MCP_ACCESS_ENABLED=true. The URL ends in /mcp-server/http, and clients authenticate with OAuth or a personal access token. We enabled it with the variables and listed the tools: 57 of them, from *search_workflows* and *execute_workflow* to *create_workflow_from_code*, *validate_workflow* and *test_workflow*.

Think about what that means. An AI app holding that token can build, change and run workflows. According to n8n's docs, it can find every workflow you have access to, but it can only run or edit the ones you enable one by one. We saw that in practice: when Claude Code tried to open one of our existing workflows through this server, n8n replied that the workflow wasn't enabled for MCP. Building, validating and testing three new workflows worked fine. We describe how that went in building n8n workflows with Claude Code.

Recipe 3: n8n as an MCP client

It works the other way too. Attach an *MCP Client Tool* to an n8n agent, with the MCP server's URL and token, and the agent gets all of that server's tools. We had an agent running a small local model (qwen2.5:7b) use our own MCP server from recipe 1 and asked it three questions.

n8n execution of an agent with an MCP client tool: the question arrives through a webhook, the agent calls the chat model twice and the MCP client once. (opens at full size)
The agent as an MCP client: two model calls, one MCP call.

Two of the three answers were fully right: the most overdue invoice with the correct number of days, and the total value of pending quotes. The third question was *Does Eastend Bikes have anything outstanding?* The tool returned one open invoice of $605, not yet due, and a pending quote of $1,850. The agent named the invoice and left out the quote. The MCP connection did its job; the gap was in the model's reading. In our Dutch run, the same agent made a different slip on that question. Template: 16-agent-with-mcp-client.json.

What to watch out for

  • Always turn on authentication. Without a token, anyone who guesses the URL can use your tools. In our test, n8n rejected a wrong token with a 403.
  • Only expose write tools when you need them. A tool that adds a row or sends an email can be called at the wrong moment. Spell out in the server instructions when it's allowed, and route anything that leaves the building through a human.
  • Keep the math in the workflow. Our overview returns totals and days already calculated. In earlier tests, a small model doing its own arithmetic got it wrong.
  • Running n8n in queue mode with several webhook processes? Per n8n's docs, route all /mcp traffic to a single process, because an MCP connection stays open.

Questions

What is the n8n MCP server?

It's n8n's support for the Model Context Protocol. With it, an AI app can use n8n workflows as tools, either per workflow through the MCP Server Trigger or for the whole instance through the built-in MCP server.

How do I turn n8n into an MCP server?

Per workflow with the MCP Server Trigger and the tools you attach to it, or instance-wide by enabling the built-in MCP server under Settings, Instance-level MCP.

Can Claude Code talk to n8n over MCP?

Yes. Add the MCP server's URL with claude mcp add and a Bearer token in the header, and Claude Code can use its tools.

Is n8n's MCP server secure?

As secure as you set it up: require authentication, expose only the tools you need, and route actions that leave your business through a human.

Sources