n8n MCP Server for Claude Code: Setup & Config
n8n MCP Server lets Claude Code manage workflows and inspect or control executions in an n8n instance.
What you can do with n8n in Claude Code
Pick it for workflow lifecycle controls, execution inspection, and webhook triggers against your n8n instance.
- Create and update n8n workflows from an AI assistant.
- Trigger a Basic-Auth-protected n8n webhook by workflow name.
Before you start: n8n in Claude Code
- Node.js 20 or newer
- An n8n instance with API access enabled
- The globally installed @leonardsellem/n8n-mcp-server package
- An n8n API key
Install with npm install -g @leonardsellem/n8n-mcp-server before using this executable. N8N_WEBHOOK_USERNAME and N8N_WEBHOOK_PASSWORD are needed only for webhook tools. Source builds and Docker are documented alternatives.
n8n Claude Code configuration
Choose Claude Code configuration scope
For n8n MCP Server, open Project scope: .mcp.json at the repository root. Project JSON: merge into mcpServers; user scope: use the CLI.
Add n8n MCP Server to Claude Code
Use the n8n-mcp-server entry below in mcpServers. Keep n8n MCP Server's documented stdio connection fields and your other Claude Code entries.
Check n8n MCP Server in Claude Code
n8n MCP Server: Inspect claude mcp list and /mcp status.
Config file · Project scope: .mcp.json at the repository root
{
"mcpServers": {
"n8n-mcp-server": {
"type": "stdio",
"command": "n8n-mcp-server",
"args": [],
"env": {
"N8N_API_URL": "<Full n8n API URL including /api/v1>",
"N8N_API_KEY": "<n8n API key with appropriate permissions>"
}
}
}
}claude mcp add-json --scope project 'n8n-mcp-server' '{"type":"stdio","command":"n8n-mcp-server","args":[],"env":{"N8N_API_URL":"<Full n8n API URL including /api/v1>","N8N_API_KEY":"<n8n API key with appropriate permissions>"}}'n8n tools available to Claude Code
n8n's stored tool list documents 12 tools; compare it with Claude Code's connected tool list, because the stored list is not a live check.
- workflow_list
For n8n's workflow_list, review the permission request and arguments in Claude Code before approval.
Enumerate workflows in the connected n8n instance.
- workflow_get
For n8n's workflow_get, review the permission request and arguments in Claude Code before approval.
Read one workflow’s configuration and details.
- workflow_create
For n8n's workflow_create, review the permission request and arguments in Claude Code before approval.
Create a workflow definition.
- workflow_update
For n8n's workflow_update, review the permission request and arguments in Claude Code before approval.
- workflow_delete
For n8n's workflow_delete, review the permission request and arguments in Claude Code before approval.
- workflow_activate
For n8n's workflow_activate, review the permission request and arguments in Claude Code before approval.
- workflow_deactivate
For n8n's workflow_deactivate, review the permission request and arguments in Claude Code before approval.
- execution_run
For n8n's execution_run, review the permission request and arguments in Claude Code before approval.
- run_webhook
For n8n's run_webhook, review the permission request and arguments in Claude Code before approval.
- execution_get
For n8n's execution_get, review the permission request and arguments in Claude Code before approval.
Inspect details for a specific workflow run.
- execution_list
For n8n's execution_list, review the permission request and arguments in Claude Code before approval.
List runs associated with a workflow.
- execution_stop
For n8n's execution_stop, review the permission request and arguments in Claude Code before approval.
Stop an execution that is currently running.
Troubleshooting n8n in Claude Code
- If n8n MCP Server fails to start, check n8n-mcp-server, the working directory, and Claude Code's selected scope; inspect claude mcp list and /mcp.
- n8n MCP Server: check N8N_API_KEY, N8N_API_URL; keep credentials out of shared .mcp.json.
- n8n MCP Server uses stdio here: Claude Code must keep the configured process running; protocol output belongs on stdout and diagnostics on stderr.
- Known limitation: Requires an API-enabled n8n instance and suitable API credentials.
- Known limitation: Webhook use needs a configured workflow and Basic Authentication credentials.
- Known limitation: The README describes part-time maintenance and a search for co-maintainers.
- General Claude Code troubleshooting lives in the /clients/claude-code guide.
n8n MCP Server — details. Claude Code guide