How n8n MCP server setup connects agents to your workflows
A team that wants AI agents to reach internal workflows or outside tools through the Model Context Protocol needs to decide which direction each connection runs before anything is built. n8n supports both. The MCP Server Trigger lets you publish n8n workflows as tools that an external MCP client, such as a coding assistant or a desktop agent, can discover and call. The MCP client capability works the other way: an n8n AI agent calls tools hosted on external MCP servers. Both use the open MCP protocol through n8n's own nodes, so the setup is a question of which workflows are exposed, which servers are trusted, and who may call them. DeployOpen plans and implements this setup on your self-hosted n8n instance, including the tool boundaries, authentication and review of what each agent can reach.
Most of the design effort sits in the first direction, because every workflow you expose becomes an action an agent can take. Decide which workflows are read-only and which write to business systems, and give exposed workflows their own narrow inputs rather than passing through general-purpose nodes. Confirm with your n8n version which authentication options the MCP Server Trigger offers and how the MCP endpoint URL is protected, since these details change between releases. Check the release notes for your target version before you commit to a design, and test each exposed tool with the client your teams actually use.
The second direction brings in trust decisions about other people's servers. Before an agent calls an external MCP server, record who operates it, what data it receives, and which credentials the n8n instance will hold for it. Queue mode adds a constraint: in n8n's queue mode, the MCP Server Trigger must be routed to a single main replica, so confirm this routing rule with your architecture before you scale out. Write these decisions down as part of the scope, because they determine the test plan and the access reviews that follow.
What a team needs before wiring MCP into n8n
MCP setup touches the n8n edition, the workflows you expose, the external servers agents call, and the network and certificate paths between them. Settle these inventories before building anything, because each one changes what the MCP trigger and client nodes need to work safely.
Edition, version and plan features
Record the exact n8n edition and version your team runs, and check whether your plan includes the MCP features you need. The pricing facts available to us do not list MCP, so confirm the current plan entitlements in n8n's pricing page and docs before you commit to a design. Also note the release your team plans to pin, since n8n ships minor releases roughly weekly and MCP behavior can change between them.
n8n pricingWorkflows to expose as tools
List which workflows an agent may call as tools, the inputs each one accepts and the data each one returns. Treat every exposed workflow as an API that can be invoked by a language model, so mark which ones write data, send messages or touch credentials. Workflows that do not need to be callable by agents should stay off the MCP path entirely.
External MCP servers and their owners
For every external MCP server an agent will reach, name the owning team, the transport it uses and the tools it offers. Confirm who can change its tool definitions, since a changed tool description can alter agent behavior without any change in your n8n workflows. Record who approves access and who responds when the server is down.
Network paths in both directions
Map the path from each agent client to the n8n MCP endpoint, and the path from n8n to each external MCP server. Check firewall rules, proxies and DNS on both legs, and confirm that outbound calls from n8n are allowed to reach the external hosts. Gaps often appear only when the MCP client runs on a different network segment than the n8n main instance.
TLS certificates clients will trust
Decide which certificate authority issues the certificate for the n8n endpoint and for each external MCP server, and confirm that every client trusts the chain. Plan renewal and rotation before go-live, and check whether any internal CA roots must be added to the n8n runtime and agent clients. A certificate that expires silently breaks tool calls without a clear error for the agent user.
Credential store and encryption key
Confirm where n8n stores credentials used by MCP client connections and which encryption key protects them. In queue mode, the main instance's encryption key must be shared with every worker and webhook processor so they can read stored credentials, so plan how that key is delivered and rotated. Restrict who can view or export MCP credentials, and record the owner of each key.
How an agent request reaches a workflow and returns a result
The request starts in an MCP client or agent running on a team device inside the organization's network and is checked at the MCP Server Trigger on the n8n main instance before any workflow runs. The trigger hands the call to the workflow tool behind it, which reads credentials that n8n stores encrypted in the database, and the result returns along the same path. External MCP servers are reached only through the MCP Client node, so outbound calls cross the trust boundary in one visible place. Check where authentication is enforced, which credentials each workflow can read, and that the external servers you allow are the ones you reviewed.
Request path from an agent through the MCP Server Trigger, workflow tools and external MCP servers.
Configuring the MCP server trigger and MCP client in sequence
This sequence turns a few well-chosen n8n workflows into authenticated MCP tools that clients can call, and connects n8n agents to external MCP servers with separate credentials. Each step ends with a check so the team knows the layer works before it adds the next one.
Choose the workflows that become tools
The automation owner and the security reviewer agree on the list of workflows to expose before anyone builds a trigger. Each candidate should do one narrow job, such as looking up an order status or creating a ticket with fixed fields, and should accept only the inputs it needs. Broad tools that can read or write many systems are harder to review and easier to misuse by an agent. The output is a short written list of tool names, their inputs, the systems they touch and the service account each one will run under. Confirm this list with the owners of those systems before moving on.
Add the MCP Server Trigger and set authentication
In each workflow that will serve as a tool, the builder adds the MCP Server Trigger node and sets its authentication method in the node settings. Check the options your n8n version offers and confirm them in the current n8n documentation, since the available methods and their naming can change between releases. Give the tool a clear name and description, because the client model reads these to decide when to call it. Store any shared secret or token in n8n's credential store, not in the workflow body. The check for this step is that the trigger node shows the expected authentication setting and that the workflow saves without warnings.
Publish the workflow and confirm the endpoint is reachable
The workflow must be active before the endpoint accepts client connections, so the builder activates it in the production instance and records the endpoint URL that the trigger displays. Confirm that the URL uses HTTPS through your reverse proxy and that it is reachable only from the networks that should call it. If the instance runs in queue mode, confirm that the routing rule for the MCP endpoint is applied as described in the next step of this topic. The check is a successful connection attempt from a network location inside your boundary and a refused connection from outside it.
Test the tool list from an MCP client
The engineer connects an MCP client to the endpoint, using the authentication method configured in step two, and requests the list of available tools. The list should show only the tools chosen in step one, with the names and descriptions the builder wrote. Run one read-only tool call with a known test input and compare the returned data with the source system. Any extra tool, missing description or unexpected field signals a configuration mistake to fix before the endpoint is shared. The check is a matching tool list and one correct result recorded in the change ticket.
Confirm a call with a wrong credential is denied
A security or platform engineer repeats the connection using an invalid or revoked credential and verifies that the request is rejected without returning any tool data. They then repeat the test with a valid credential that lacks the intended scope, if your authentication model supports scopes, and confirm the same result. Record the response codes and the n8n execution log entries for both attempts. This step proves the control works before real agents depend on it. The check is a documented denial for every invalid case and no tool output returned to an unauthenticated caller.
Add an MCP client connection for each external server
For each external MCP server the agent needs, the builder adds an MCP client connection in n8n and creates a separate credential for it. Keep one credential per external server so that access can be revoked for one system without affecting the others. Restrict the agent to the external tools it needs, and document the owner of each external server and the data it can return. Review the external server's own permission model, since n8n can only control what it asks for. The check is that the agent lists only the intended external tools and that a test call succeeds with its own credential.
Run a final end-to-end check and record the configuration
The builder runs one agent task that uses both an exposed tool and an external MCP tool, then reviews the execution log to confirm each call went to the expected endpoint with the expected credential. The team stores the tool list, authentication settings, credential owners and test results in the change record, along with the n8n version in use. Re-run the denial and tool-list checks after any upgrade or change to queue mode settings. The check is a complete execution record that matches the documented design and a signed-off change record.
Exposing workflows versus calling external MCP servers
Teams in this tab publish workflows that an agent can call as tools. The n8n MCP Server Trigger turns a workflow into an endpoint that an MCP client can discover and invoke, so each exposed workflow becomes a capability your organization has granted to a model. The main decisions are who owns each tool, how narrow its scope is, and what data the tool returns to the model. A workflow that returns a full customer record gives the model far more than a workflow that returns one order status.
- Tool owners: Name a business owner and a technical owner for every exposed workflow, and record who approves changes to its inputs and outputs.
- Tool scope: Expose only the actions an agent needs. Prefer a workflow that performs one bounded task over a general-purpose workflow that accepts arbitrary parameters.
- Returned data: Decide which fields go back to the model. Anything returned can be stored in the model's context, logged by the client, or repeated to users.
- Access to the endpoint: Decide which clients may connect and how they authenticate. Confirm the authentication options your n8n edition supports in the current MCP Server Trigger documentation.
- Input validation: Treat tool arguments as untrusted input from a model that may have been steered by a prompt injection.
Confirm with the internal owner of each underlying system which actions the workflow may perform, and document that list before the first agent connects.
Teams in this tab let n8n agents call tools hosted by someone else, such as a SaaS vendor's MCP server or a partner's endpoint. The work shifts from defining your own tools to controlling what leaves your network and what the external party can do with the credentials you give it. The vendor's terms, data handling and availability become part of your risk picture, and the agent's reach is limited by the credential scope you grant.
- Vendor terms: Read the vendor's terms for data retention, training use, subprocessors and logging of tool inputs. Ask for these in writing.
- Outbound network rules: Allow egress only to the specific endpoints you have approved. Test that the n8n host cannot reach other destinations, including internal addresses.
- Credential scope: Issue a dedicated token with the fewest permissions the agent needs, and rotate it on a schedule your security team sets.
- Tool list changes: External servers can change their tool set. Decide how new tools are reviewed before an agent may use them.
- Failure handling: Plan what the agent does when the external server is slow, returns errors or is unavailable.
Confirm with the vendor where data is processed, how long tool calls are logged, and how the vendor notifies you of changes to its tools.
Teams in this tab run an n8n instance that both exposes internal workflows to agents and calls external MCP servers. The shared instance is where the two directions can leak into each other: an internal credential used for an outbound call might be reachable from a workflow exposed to external clients, or a vendor token might be visible to workflows owned by another team. Separation is mainly a matter of ownership, credential boundaries and workflow structure, and it has to be designed before both directions go live.
- Separate credentials: Create one credential set for inbound tools and a different set for outbound MCP calls. Do not reuse a service account across both.
- Separate workflows: Keep exposed tool workflows and agent workflows in different projects, with named owners for each.
- Clear ownership: Record which team approves changes to exposed tools, which team approves new external servers, and who responds to an incident in either direction.
- Access roles: Restrict which users can edit credentials and which can publish MCP-exposed workflows, using the role model your n8n edition provides.
- Review cadence: Re-check both sets of credentials, endpoints and tool lists on the same schedule so that neither direction drifts unnoticed.
Confirm with your security and platform leads who may publish a tool and who may add an external endpoint, and write that decision down before the instance is shared.
Why MCP routing needs a single replica in queue mode
In queue mode, the main instance handles triggers and webhooks, then passes executions through Redis to a pool of workers that read and write workflow data in PostgreSQL. An MCP endpoint built with the MCP Server Trigger receives inbound requests much like a webhook, so where it is served matters. The topic's single-replica routing rule constrains how many replicas may serve that endpoint, which means a scaled-out layout can route MCP sessions to the wrong place if you do not account for it. Before you design the topology, confirm the exact wording of the rule and the n8n versions it applies to in the n8n queue mode documentation, because routing behavior can change between releases.
The rule has a direct effect on high availability. Multi-main setup, which runs several main instances, is restricted to Enterprise self-hosted deployments and is not available in the Community edition or n8n Cloud. If your organization is not on that tier, the MCP endpoint may depend on one main replica, so a restart or failed node interrupts every connected agent until service returns. Decide early whether MCP access is business-critical. If it is, the options are an Enterprise license with multi-main, a documented restart window agreed with the teams that depend on the tools, or a narrower set of exposed workflows. Ask n8n to confirm which of these your license and version support.
Every worker and webhook processor must hold the same encryption key as the main instance, because they need it to decrypt credentials stored in the database. This includes the credentials that authenticate agents to your MCP server and the credentials your agents use to call external MCP servers. Treat the key as shared infrastructure. Store it in your secrets system, confirm that every process receives an identical value, and plan key rotation as a coordinated change across all nodes, with a tested restore path if a key is lost. A mismatched key usually fails at runtime, when an agent first tries a tool, so verify credential access in each process before go-live.
Mapping workflows, parameters and credentials to MCP tools
This table gives one register row per exposed workflow tool and one per external MCP connection, so each entry has a named owner, credential and granted scope. Read the workflow rows as the contract a model sees and the connection rows as the access you have delegated. Confirm how the MCP trigger presents parameter names and types in your version before you freeze any tool name.
| Register field | Exposed workflow tool | External MCP server connection |
|---|---|---|
| Identifier | Tool name the model calls, kept short, lowercase and specific to one action | Server endpoint URL and the team that operates it |
| Description the model reads | One or two sentences stating what the tool does, what it returns and what it must not be used for | Summary of which tools the remote server exposes, reviewed when the server changes |
| Input parameters and types | Each parameter name, type, whether it is required and an allowed value set where possible (confirm how the trigger presents these in your version) | Tools you enable on the remote server, not every tool it advertises |
| Returned fields | Fields the workflow returns to the agent, with sensitive fields removed before the response | Data classes the agent may receive from the remote server |
| Credential used | The n8n credential the workflow calls downstream with, named by system and purpose, not a personal account | Credential type such as API key, OAuth2 or bearer token, and where it is stored |
| Scope granted | Downstream permissions the credential holds, limited to the operations the tool performs | Read, write or admin rights on the remote server, documented as the narrowest working set |
| Owning team | Team accountable for the workflow logic, changes and incident response | Team that approves the connection and rotates its credential |
| Review trigger | Renaming a parameter, changing a return field or changing the credential | Server version change, new tools advertised or scope expansion requested |
Securing MCP endpoints, credentials and tool permissions
An MCP endpoint built from n8n workflows exposes business actions to whatever client connects to it, and an external MCP server gives an agent tools that n8n will call with stored credentials. The controls below decide who can reach those tools, what each tool can do, and what gets recorded. Confirm each setting in the n8n version you run before you rely on it.
Authenticate the MCP Server Trigger endpoint
The MCP Server Trigger publishes a URL that clients use to call exposed workflows, so treat that URL as a credential surface. Confirm which authentication options your n8n version offers on the trigger, whether requests can be restricted by header or token, and whether the endpoint is reachable only through the proxy and network paths you intend. Test with an unauthenticated request and confirm it is rejected before any workflow runs.
Queue mode docsDesign each tool as one bounded action
Expose a workflow as a tool only when it performs one narrow action, such as looking up an order by ID or creating a single ticket. A tool that can read any record or run any update gives an agent a broad surface that prompt injection can abuse. Keep the input schema strict, validate values inside the workflow, and avoid tools that accept free-form query strings or raw SQL.
Isolate credentials for each external server
Create a separate n8n credential for each external MCP server and each downstream system a tool touches, instead of reusing one broad token. Scope each token to the minimum read or write permissions the tool needs, and name credentials so reviewers can tell which agent uses them. Rotate tokens on a schedule you document, and confirm that a credential used by one workflow cannot be selected by another without an explicit share.
Control outbound requests to MCP servers
When an agent calls an external MCP server, n8n makes outbound requests from your network, so the destination list matters. Allow only the hostnames and ports for approved servers, block metadata and internal address ranges unless a server needs them, and confirm whether your deployment can enforce these rules at the network layer. Review the outbound controls in the security hardening topic before adding new servers.
Log every tool call for audit
An audit trail should show which client called which tool, with what parameters, when, and what the workflow returned or changed. Confirm that execution data for MCP-triggered runs is retained long enough for your review cycle, and that sensitive fields are masked or excluded where your policy requires it. Forward logs to your central system and test that a single tool call can be traced end to end.
Restrict who can publish exposed workflows
A workflow becomes an agent tool the moment it is published with an MCP Server Trigger, so editing rights are an access decision. Limit publishing and editing to named roles, review changes to exposed workflows through your environment process, and check how projects and roles apply to shared credentials. Confirm which of these controls your plan includes, since SSO and role features depend on the edition you run.
SAML user managementCommon MCP failures in n8n and how to fix them
This table lists the failures teams most often hit when exposing n8n workflows as MCP tools or calling external MCP servers from agents. Each row gives the likely cause, the check to run and the fix, so you can work from the symptom a client shows back to the setting that needs changing.
| Symptom | Likely cause | Check | Fix |
|---|---|---|---|
| Client does not see the tools after publish | The workflow was saved but not activated, or the client is pointed at the test URL instead of the production URL | Confirm the workflow is active and compare the endpoint URL in the client with the production URL shown in the MCP Server Trigger node | Activate the workflow, use the production URL in the client config, then reconnect the client so it refetches the tool list |
| Authentication rejected at the MCP endpoint | Bearer token or header credential on the client does not match the one configured on the trigger, or a reverse proxy strips the Authorization header | Send a test request with the same header from outside the client and check the proxy access log for a 401 or 403 | Recreate the credential on both sides, confirm the proxy forwards the Authorization header, and rotate any token that was pasted into chat or tickets |
| Timeouts on long-running workflows | The client or an intermediate proxy closes the connection before the workflow returns its result | Time a single tool call end to end and compare with the read timeout on the client and on the reverse proxy | Shorten the tool's workflow, return a job identifier for later polling, or raise timeouts on the client and proxy after confirming the client supports them |
| Certificate trust errors for internal MCP servers | The n8n host or the client does not trust the internal certificate authority that signed the MCP server certificate | Run a TLS handshake from the n8n host with the MCP server URL and read the certificate chain it returns | Add the internal CA to the trust store used by the n8n process and restart it, rather than disabling certificate verification |
| Tool calls fail after a worker picks up the job in queue mode | The MCP trigger is registered on a worker or receives requests on a host that is not the single routing instance, so the session is not found | Check which process logs the incoming MCP request and confirm the trigger runs on one main or webhook process only | Route MCP traffic to one replica, as the queue mode routing rule requires, and keep the trigger on that replica |
| Credentials fail on workers after queue mode change | The encryption key on a worker or webhook processor differs from the main instance key, so stored credentials cannot be decrypted | Compare the encryption key setting on each process and look for decryption errors in worker logs | Set the same encryption key on the main instance, every worker and every webhook processor, then restart them |
| Outbound calls from a tool workflow are blocked | Network policy, egress firewall or a proxy setting blocks the external MCP server or the agent's model endpoint | Test the same host from the n8n container or VM with curl and compare with the allowed destinations in the firewall rules | Open the specific destination and port in the egress policy, or configure the proxy variables for n8n, and document the change for the security team |
What teams ask before setting up n8n MCP
How long does an n8n MCP setup take, and what drives the effort?
The effort depends on the number of tools you expose, the number of external MCP servers your agents call, how authentication is designed, the queue mode topology, and how much testing you require. A single server exposing a few well-defined workflows as tools is a small job. Each additional tool needs its input schema, description and permission check, and each external server needs credentials, network access and a test pass. Queue mode adds a routing decision because MCP sessions must reach the same main instance. Ask any partner for a written scope that lists these counts and the test cases before accepting a timeline, since no duration in this answer is supplied as a fact.
Can our own team set up n8n MCP without a partner?
Yes, a team with n8n administration experience and someone who understands MCP can build a basic setup in-house. The MCP Server Trigger and the MCP Client node are configured inside n8n, so most of the work is workflow design and authentication. The parts that tend to need outside or specialist help are the authentication design across several servers, the queue mode routing rule, and a security review of which workflows are exposed to an agent. Decide early which of these your team has already done before, and treat the rest as the scope a partner would cover.
What does the work need from our staff?
Plan for three groups of people. Workflow owners must confirm which workflows should become tools, what inputs they accept, what data they return, and who may call them. Your network and certificate team must allow the n8n endpoint to be reached by the agent clients and, for external MCP servers, allow outbound connections and trust their certificates. Finally, you need a test client, such as an MCP-capable agent or inspector tool, that the team can use to list tools and run calls during testing. Confirm each of these before the build starts so tests are not blocked late in the schedule.
Does MCP access in n8n require a paid plan?
Check this against n8n's pricing page before you commit, because plan rules change. The pricing page lists a free self-hosted Community edition and paid cloud and self-hosted plans, and it states that all plans include every integration. Confirm in writing whether the MCP features you need are included in the edition you plan to run, and confirm whether any related feature, such as SSO or environments, sits in a higher plan. Ask your vendor or partner to show the edition and feature check in the proposal, so licensing questions are settled before deployment.
Can MCP access run in a high availability design?
It depends on your edition and topology. In queue mode, the main instance handles triggers and webhooks and passes executions to workers, and MCP routing must follow a single-replica rule so that a session reaches the instance that holds it. Running several main instances for high availability is described by n8n as restricted to Enterprise self-hosted deployments, and it is not available in the Community edition or n8n Cloud. Before designing for availability, confirm with n8n's queue mode documentation how MCP sessions behave under failover, and plan recovery steps for a failed main instance either way.
What should we check before exposing workflows as MCP tools?
Engineers should check four things. First, confirm that each exposed workflow has a narrow purpose and validates its inputs, because an agent can call it with values you did not expect. Second, confirm authentication on the MCP endpoint and that credentials are not returned in tool output. Third, confirm that the queue mode encryption key is shared with every worker and webhook processor, so credentials resolve on each node that runs the call. Fourth, test the tool list and each call from the test client, including failure paths, before any agent is connected to production data.
How do the encryption key and queue mode affect MCP credentials?
In queue mode, the main instance's encryption key must be shared with all worker and webhook processor nodes, because they need it to read credentials stored in the database. If a worker runs with a different key, a tool call that uses a stored credential fails at execution time, which can look like an MCP fault. Record where the key is stored, rotate it through a planned change, and test one credentialed MCP call on every node type after any deployment change. This check takes little effort compared with diagnosing an intermittent failure later.
How DeployOpen scopes and delivers n8n MCP work
DeployOpen plans, implements, hardens, documents and supports self-hosted open-source platforms inside your own infrastructure, and n8n MCP server and client setup follows the same written-scope method. Engagements are usually fixed-scope, with the scope, deliverables and timeline agreed in writing before work starts.
How we scope
- Map which n8n workflows will be exposed as MCP tools and which external MCP servers agents must call.
- Document the authentication method, credential owners and the users or agents allowed to reach each tool.
- Confirm your n8n edition and whether queue mode is in use, since that decides where MCP triggers may run.
How we build
- Configure the MCP Server Trigger workflows and client nodes in your environment with the agreed authentication.
- Pin MCP-enabled workflows to a single replica in queue mode and document the routing rule in the runbook.
- Test tool discovery, permissions and error handling, and run a security review of tool exposure and credential handling.
How we hand over
- Deliver written configuration records, workflow inventories, credential ownership and the tested permission model.
- Walk your platform and security teams through the build, the test results and the open findings.
- Provide a runbook covering changes to MCP tools, rotation of credentials and checks after each n8n upgrade.
How we support
- Ongoing support, upgrades and continuous testing for MCP connections are available as a retainer.
- Retesting after n8n version upgrades or changes to exposed workflows can be included in the agreed scope.
- Ask any quote to state which items are one-time work and which recur under a retainer.

