Connect n8n-MCP to Claude Code CLI for enhanced n8n workflow development from the command line.
claude mcp add n8n-mcp \
-e MCP_MODE=stdio \
-e LOG_LEVEL=error \
-e DISABLE_CONSOLE_OUTPUT=true \
-- npx n8n-mcpclaude mcp add n8n-mcp \
-e MCP_MODE=stdio \
-e LOG_LEVEL=error \
-e DISABLE_CONSOLE_OUTPUT=true \
-e N8N_API_URL=https://your-n8n-instance.com \
-e N8N_API_KEY=your-api-key \
-- npx n8n-mcpMake sure to replace https://your-n8n-instance.com with your actual n8n URL and your-api-key with your n8n API key.
If you already have n8n-MCP configured in Claude Desktop:
claude mcp add-from-claude-desktopFor team sharing, add to .mcp.json in your project root:
{
"mcpServers": {
"n8n-mcp": {
"command": "npx",
"args": ["n8n-mcp"],
"env": {
"MCP_MODE": "stdio",
"LOG_LEVEL": "error",
"DISABLE_CONSOLE_OUTPUT": "true",
"N8N_API_URL": "https://your-n8n-instance.com",
"N8N_API_KEY": "your-api-key"
}
}
}
}Then use with scope flag:
claude mcp add n8n-mcp --scope projectCheck server status:
claude mcp list
claude mcp get n8n-mcpDuring a conversation, use the /mcp command to see server status and available tools.
Remove the server:
claude mcp remove n8n-mcpFor optimal results, create a CLAUDE.md file in your project root with the instructions from the main README's Claude Project Setup section.
- If you're running n8n locally, use
http://localhost:5678as the N8N_API_URL - The n8n API credentials are optional - without them, you'll have documentation and validation tools only
- With API credentials, you'll get full workflow management capabilities
- Use
--scope local(default) to keep your API credentials private - Use
--scope projectto share configuration with your team (put credentials in environment variables) - Claude Code will automatically start the MCP server when you begin a conversation

