← All connection guides

How to connect Claude Code to n8n

Connect Claude Code to n8n’s instance-level MCP server with OAuth and discover the workflows available to your account.

Free guide · Updated

Based on official documentation · Checked

Ask your agent

Copy the prompt and paste it into your assistant.

Quick answer

Enable n8n’s instance-level MCP server, add its HTTP endpoint to Claude Code and complete OAuth. Use the endpoint shown by n8n, which ends in /mcp-server/http; the editor homepage is a different URL.

1. Prepare the n8n instance

In n8n, open Settings → Instance-level MCP and enable access with an owner or admin account. In Connection details, select Connect and copy the Server URL. The newer Connect a client dialog is available from n8n 2.33.0; older installations may show a simpler screen.

2. Add the server

Replace YOUR_N8N_DOMAIN with the host serving your n8n instance. For n8n Cloud, this is normally your instance’s app.n8n.cloud host. Copying the exact Server URL from settings is the safest way to preserve the correct hostname and protocol.

claude mcp add --transport http n8n "https://YOUR_N8N_DOMAIN/mcp-server/http"

3. Complete OAuth

The server is configured outside the Claude conversation. In /mcp select n8n and complete authentication. Keep this connection separate from a Claude web custom connector.

Approve access to the intended n8n instance and review the requested permissions. This OAuth route does not require putting an MCP access token into a prompt.

claude /mcp

4. Make the intended workflow available

Workflow search may show previews for workflows your n8n account can access. Full workflow access and operations require explicitly enabling MCP for that workflow, plus the permissions granted to the client. In the workflow’s Settings, use Available in MCP, or manage it from the instance MCP settings.

Practice

Check the connection

  1. Ask Claude Code to inspect an explicitly named workflow and explain which inputs it expects, using the n8n tools without running it.

Output: The client returns details matching the workflow in your n8n instance. Discovery, full access and permission to execute are checked separately.

Troubleshooting

Wrong endpoint: use the full Server URL rather than the editor address. OAuth denied: check account permissions and allowed callback settings. A workflow found in search but unavailable for operations may need MCP access enabled. On self-hosted n8n, check that a reverse proxy forwards the MCP endpoint correctly.

Disconnect and execution limits

Remove the n8n entry from Claude Code and revoke that client’s access under n8n Connected clients. Avoid disabling instance-wide MCP just to disconnect one client. Before asking the assistant to execute a workflow, review its side effects; n8n documents production execution as the default for execute_workflow.

Sources

Read the primary material