Accessing n8n MCP server#
Connect supported MCP clients to your n8n workflows through n8n's built-in MCP server.
The server allows clients such as Lovable to connect securely to an n8n instance. Once connected, these clients can:
- Search within workflows marked as available in MCP
- Retrieve metadata and webhook information for workflows
- Trigger and run workflows using webhook endpoints
Enabling MCP access#
For Cloud and self-hosted instances#
- Navigate to Settings > MCP Access
- Toggle Enable MCP access (requires instance owner or admin permissions).
Once enabled, you'll see:
- Connection instructions
- List of workflows exposed to MCP clients
To disable: Toggle the switch off.
For self-hosted: Complete disablement#
To remove the feature entirely, set the environment variable:
N8N_DISABLED_MODULES=mcp
This removes MCP endpoints and hides all related UI elements.
Setting up MCP authentication#
The How to connect section on the MCP Access page provides two authentication methods for MCP clients:
- oAuth2
- Access Token
Using oAuth2#
Copy your instance server URL from the oAuth tab and use it to configure your MCP client. After connecting, the client will redirect you to n8n to authorize access.
Revoking client access#
To revoke access for connected MCP clients:
- Navigate to Settings > MCP Access.
- Make sure you are on the oAuth tab in the How to connect section.
- You should see a table of connected clients in the Connected oAuth clients section.
- Use the action menu to revoke access for specific clients.
Using Access Token#
Use your instance server URL and your personal MCP Access Token from the Access Token tab on the settings page.
When you first visit the MCP Access page, n8n automatically generates a personal MCP Access Token tied to your user account.
Info
Copy your token right away. On future visits, you'll only see a redacted value and the copy button will be disabled.
Rotating your token#
If you lose your token or need to rotate it:
- Navigate to Settings > MCP Access.
- Make sure you are on the Access Token tab in the How to connect section.
-
Generate a new token.
The previous token is revoked right away upon generation.
-
Update all connected MCP clients with the new value.
Connecting an MCP client using configuration files#
JSON configuration#
For MCP clients using JSON configuration files, copy the sample configuration from the MCP Access page:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | |
Here, replace:
<your-n8n-domain>: Your n8n base URL (shown on the MCP Access page)<YOUR_N8N_MCP_TOKEN>: Your generated token
TOML configuration#
For MCP clients using TOML configuration files (like Codex CLI), use the following configuration:
1 2 3 4 5 6 7 8 9 10 | |
Here, replace:
- <your-n8n-domain>: Your n8n base URL, which is shown on the MCP Access page
- <YOUR_N8N_MCP_TOKEN>: Your generated token
Exposing workflows to MCP clients#
Workflow eligibility#
Only active, webhook-triggered workflows can be exposed to MCP clients.
By default, no workflows are visible to MCP clients. You must explicitly enable access.
Enabling access#
Option 1: From the workflow editor
- Open the workflow.
- Go to Settings.
- Toggle Available in MCP.
Option 2: From the workflows list
- Go to Workflows.
- Open the menu on a workflow card.
- Select Enable MCP access.
Managing access#
The MCP Access settings page shows all workflows available to MCP clients. From this list you can:
- Open a workflow directly
- Revoke access using the action menu (or use Disable MCP access from the workflow card menu)
Workflow descriptions#
To help MCP clients identify workflows, you can add free-text descriptions as follows:
- Open the workflow.
- Click the pencil icon next to the workflow name.
-
Enter your description in the Description field.
Example: Connecting Lovable to n8n MCP server#
- Configure MCP Server in Lovable (oAuth).
- Navigate to Settings > Integrations.
- Add a new MCP server connection (Custom):
- Enter your desired connector name.
- Enter the Server URL (copy from n8n instance settings).
- Save the connection. Upon success, you will be redirected to n8n to authorize 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.
Info
A native n8n connector is coming soon to Lovable. You can use it to connect directly with your server URL.
Troubleshooting#
If you encounter issues connecting MCP clients to your n8n instance, consider the following:
- Ensure that your n8n instance is publicly accessible if you are using cloud-based MCP clients.
- Verify that the MCP access is enabled in n8n settings.
- Check that the workflows you want to access are marked as available in MCP.
- Confirm that the authentication method (oAuth2 or Access Token) is correctly configured in your MCP client.
- Review n8n server logs for any error messages related to MCP connections.
- If you are using desktop MCP clients, make sure you have latest Node.js version installed.

