MCP client connection examples
These examples show the exact commands and configuration for connecting specific clients to n8n's MCP server. Before using them, enable MCP access on your instance and choose an authentication method, see Connecting MCP clients.
The examples below all use https://. If your instance serves plain HTTP, such as a local install at http://localhost:5678, use http:// instead. Copying the full Server URL from n8n gives you the right prefix either way.
Connecting Lovable to n8n MCP server
Configure MCP Server in Lovable (OAuth).
Navigate to your workspace Settings > Integrations.
In the MCP Servers section, find n8n and click Connect.
Enter your n8n server URL: the Server URL value shown in the Connect a client dialog.
Save the connection. If successful, n8n redirects you to approve access for Lovable.
Verify connectivity.
Once connected, Lovable can query for workflows with MCP access enabled.
Example: Asking Lovable to build a workflow UI that lists users and allows deleting them.
Connecting Claude Desktop to n8n MCP server
Using OAuth (recommended)
Navigate to Settings > Connectors in Claude Desktop.
Click on Add custom connector.
Enter the following details:
Name: n8n MCP
Remote MCP Server URL: the Server URL value shown in the Connect a client dialog. It ends in
/mcp-server/http, so it looks likehttps://<your-n8n-domain>/mcp-server/http. This isn't the address of your n8n editor. Don't paste the URL from your browser's address bar.
Save the connector.
When prompted, approve access for Claude Desktop.
Using API key
Add the following entry to your claude_desktop_config.json file:
Here, replace:
<your-n8n-domain>: Your n8n domain, without thehttps://prefix. On n8n Cloud this isyour-instance.app.n8n.cloud. When self-hosted, it's the domain that serves your n8n editor, for examplen8n.example.com. You can find your full server URL in n8n under Settings > Instance-level MCP > Connect a client > Server URL.
Connecting Claude Code to n8n MCP server
Option 1: Authenticate using OAuth (recommended)
Use the following CLI command:
Or add the following entry to your claude.json file:
Here, replace:
<your-n8n-domain>: Your n8n domain, without thehttps://prefix. On n8n Cloud this isyour-instance.app.n8n.cloud. When self-hosted, it's the domain that serves your n8n editor, for examplen8n.example.com. You can find your full server URL in n8n under Settings > Instance-level MCP > Connect a client > Server URL.
Run /mcp in Claude Code and select n8n to complete the OAuth authorization.
Option 2: Authenticate using API key
Use the following CLI command:
Or add the following entry to your claude.json file:
Here, replace:
<your-n8n-domain>: Your n8n domain, without thehttps://prefix. On n8n Cloud this isyour-instance.app.n8n.cloud. When self-hosted, it's the domain that serves your n8n editor, for examplen8n.example.com. You can find your full server URL in n8n under Settings > Instance-level MCP > Connect a client > Server URL.<YOUR_N8N_MCP_TOKEN>: Your generated token
Connecting Codex CLI to n8n MCP server
Option 1: Authenticate using OAuth (recommended)
Use the following CLI command:
Or add the following entry to your ~/.codex/config.toml file:
Here, replace:
<your-n8n-domain>: Your n8n domain, without thehttps://prefix. On n8n Cloud this isyour-instance.app.n8n.cloud. When self-hosted, it's the domain that serves your n8n editor, for examplen8n.example.com. You can find your full server URL in n8n under Settings > Instance-level MCP > Connect a client > Server URL.
Run codex mcp login n8n to complete the OAuth authorization.
Option 2: Authenticate using API key
Add the following entry to your ~/.codex/config.toml file:
Here, replace:
<your-n8n-domain>: Your n8n domain, without thehttps://prefix. On n8n Cloud this isyour-instance.app.n8n.cloud. When self-hosted, it's the domain that serves your n8n editor, for examplen8n.example.com. You can find your full server URL in n8n under Settings > Instance-level MCP > Connect a client > Server URL.<YOUR_N8N_MCP_TOKEN>: Your generated token
Connecting Gemini CLI to n8n MCP server
Use the following CLI command:
Or add the following entry to your ~/.gemini/settings.json file:
Here, replace:
<your-n8n-domain>: Your n8n domain, without thehttps://prefix. On n8n Cloud this isyour-instance.app.n8n.cloud. When self-hosted, it's the domain that serves your n8n editor, for examplen8n.example.com. You can find your full server URL in n8n under Settings > Instance-level MCP > Connect a client > Server URL.
Run /mcp in Gemini CLI and select n8n to complete the OAuth authorization.
Connecting Cursor to n8n MCP server
In the Connect a client dialog, select Cursor from Your client, then select One-click setup to open Cursor and add the n8n server automatically. Approve access when Cursor redirects you back to n8n.
Or add the following entry to your ~/.cursor/mcp.json file (or the project's .cursor/mcp.json):
Here, replace:
<your-n8n-domain>: Your n8n domain, without thehttps://prefix. On n8n Cloud this isyour-instance.app.n8n.cloud. When self-hosted, it's the domain that serves your n8n editor, for examplen8n.example.com. You can find your full server URL in n8n under Settings > Instance-level MCP > Connect a client > Server URL.
Connecting VS Code to n8n MCP server
In the Connect a client dialog, select VS Code from Your client, then select One-click setup to open VS Code and add the n8n server automatically. Approve access when VS Code redirects you back to n8n.
Or add the following entry to your workspace's .vscode/mcp.json file:
Here, replace:
<your-n8n-domain>: Your n8n domain, without thehttps://prefix. On n8n Cloud this isyour-instance.app.n8n.cloud. When self-hosted, it's the domain that serves your n8n editor, for examplen8n.example.com. You can find your full server URL in n8n under Settings > Instance-level MCP > Connect a client > Server URL.
Connecting Windsurf to n8n MCP server
Add the following entry to your ~/.codeium/windsurf/mcp_config.json file:
Here, replace:
<your-n8n-domain>: Your n8n domain, without thehttps://prefix. On n8n Cloud this isyour-instance.app.n8n.cloud. When self-hosted, it's the domain that serves your n8n editor, for examplen8n.example.com. You can find your full server URL in n8n under Settings > Instance-level MCP > Connect a client > Server URL.
Approve access when Windsurf redirects you to n8n on its first connection attempt.
Connecting Google ADK agent to n8n MCP server
Here's sample code to create an agent that connects to a remote n8n MCP server:
Here, replace:
N8N_INSTANCE_URL: The base URL of your n8n instance. On n8n Cloud this ishttps://your-instance.app.n8n.cloud. When self-hosted, it's your own URL, for examplehttps://n8n.example.com. You can find your full server URL in n8n under Settings > Instance-level MCP > Connect a client > Server URL.YOUR_N8N_MCP_TOKEN: Your generated access token
For more details, see Connect ADK agent to n8n.
Troubleshooting
If a client doesn't connect using the steps above, see Troubleshooting on the main MCP server page.
Last updated
Was this helpful?