{"type":"mcp_server","name":"n8n-mcp","description":"**n8n workflow builder MCP for Claude Desktop/Code/Windsurf/Cursor. Automates n8n workflow creation using AI.**","category":"AI","language":"TypeScript","stars":22409,"forks":205,"owner":"czlonkowski","github_url":"https://github.com/czlonkowski/n8n-mcp","homepage":"https://www.n8n-mcp.com/","setup":"## Setup\n\n### Option 1: npx (Fastest - No Installation!) 🚀\n\n**Prerequisites:** [Node.js](https://nodejs.org/) installed on your system\n\n1.  **Run n8n-MCP:**\n\n    ```bash\n    npx n8n-mcp\n    ```\n\n2.  **Configure Claude Desktop:**\n\n    Add the following configuration to your Claude Desktop config file. Choose either the basic or full configuration based on your needs.\n\n    **Basic configuration (documentation tools only):**\n\n    ```json\n    {\n      \"mcpServers\": {\n        \"n8n-mcp\": {\n          \"command\": \"npx\",\n          \"args\": [\"n8n-mcp\"],\n          \"env\": {\n            \"MCP_MODE\": \"stdio\",\n            \"LOG_LEVEL\": \"error\",\n            \"DISABLE_CONSOLE_OUTPUT\": \"true\"\n          }\n        }\n      }\n    }\n    ```\n\n    **Full configuration (with n8n management tools):**\n\n    ```json\n    {\n      \"mcpServers\": {\n        \"n8n-mcp\": {\n          \"command\": \"npx\",\n          \"args\": [\"n8n-mcp\"],\n          \"env\": {\n            \"MCP_MODE\": \"stdio\",\n            \"LOG_LEVEL\": \"error\",\n            \"DISABLE_CONSOLE_OUTPUT\": \"true\",\n            \"N8N_API_URL\": \"https://your-n8n-instance.com\",\n            \"N8N_API_KEY\": \"your-api-key\"\n          }\n        }\n      }\n    }\n    ```\n\n    *   Replace `https://your-n8n-instance.com` with the URL of your n8n instance.\n    *   Replace `your-api-key` with your n8n API key.\n\n    **Configuration file locations:**\n\n    *   **macOS**: `~/Library/Application Support/Claude/claude_desktop_config.json`\n    *   **Windows**: `%APPDATA%\\Claude\\claude_desktop_config.json`\n    *   **Linux**: `~/.config/Claude/claude_desktop_config.json`\n\n3.  **Restart Claude Desktop:**\n\n    Restart Claude Desktop after updating the configuration file.\n\n**Environment Variables:**\n\n*   `MCP_MODE`: Set to `stdio` for Claude Desktop integration.\n*   `LOG_LEVEL`: Set to `error` to minimize console output.\n*   `DISABLE_CONSOLE_OUTPUT`: Set to `true` to disable console output.\n*   `N8N_API_URL` (Optional): URL of your n8n instance. Required for workflow management tools.\n*   `N8N_API_KEY` (Optional): API key for your n8n instance. Required for workflow management tools.\n\n### Option 2: Docker (Easy & Isolated) 🐳\n\n**Prerequisites:** Docker installed on your system\n\n1.  **Pull the Docker image:**\n\n    ```bash\n    docker pull ghcr.io/czlonkowski/n8n-mcp:latest\n    ```\n\n2.  **Configure Claude Desktop:**\n\n    Add the following configuration to your Claude Desktop config file. Choose either the basic or full configuration based on your needs.\n\n    **Basic configuration (documentation tools only):**\n\n    ```json\n    {\n      \"mcpServers\": {\n        \"n8n-mcp\": {\n          \"command\": \"docker\",\n          \"args\": [\n            \"run\",\n            \"-i\",\n            \"--rm\",\n            \"-e\", \"MCP_MODE=stdio\",\n            \"-e\", \"LOG_LEVEL=error\",\n            \"-e\", \"DISABLE_CONSOLE_OUTPUT=true\",\n            \"ghcr.io/czlonkowski/n8n-mcp:latest\"\n          ]\n        }\n      }\n    }\n    ```\n\n    **Full configuration (with n8n management tools):**\n\n    ```json\n    {\n      \"mcpServers\": {\n        \"n8n-mcp\": {\n          \"command\": \"docker\",\n          \"args\": [\n            \"run\",\n            \"-i\",\n            \"--rm\",\n            \"-e\", \"MCP_MODE=stdio\",\n            \"-e\", \"LOG_LEVEL=error\",\n            \"-e\", \"DISABLE_CONSOLE_OUTPUT=true\",\n            \"-e\", \"N8N_API_URL=https://your-n8n-instance.com\",\n            \"-e\", \"N8N_API_KEY=your-api-key\",\n            \"ghcr.io/czlonkowski/n8n-mcp:latest\"\n          ]\n        }\n      }\n    }\n    ```\n\n    *   Replace `https://your-n8n-instance.com` with the URL of your n8n instance.\n    *   Replace `your-api-key` with your n8n API key.\n    *   If you’re running n8n locally on the same machine (e.g., via Docker), use `http://host.docker.internal:5678` as the `N8N_API_URL`.\n\n    **Configuration file locations:**\n\n    *   **macOS**: `~/Library/Application Support/Claude/claude_desktop_config.json`\n    *   **Windows**: `%APPDATA%\\Claude\\claude_desktop_config.json`\n    *   **Linux**: `~/.config/Claude/claude_desktop_config.json`\n\n3.  **Restart Claude Desktop:**\n\n    Restart Claude Desktop after updating the configuration file.\n\n**Important:** The `-i` flag is required for MCP stdio communication.\n\n**Environment Variables (Docker):**\n\n*   `MCP_MODE`: Set to `stdio` for Claude Desktop integration.\n*   `LOG_LEVEL`: Set to `error` to minimize console output.\n*   `DISABLE_CONSOLE_OUTPUT`: Set to `true` to disable console output.\n*   `N8N_API_URL` (Optional): URL of your n8n instance. Required for workflow management tools.\n*   `N8N_API_KEY` (Optional): API key for your n8n instance. Required for workflow management tools.\n\n### Option 3: Local Installation (For Development)\n\n**Prerequisites:** [Node.js](https://nodejs.org/) installed on your system\n\n1.  **Clone and setup:**\n\n    ```bash\n    git clone https://github.com/czlonkowski/n8n-mcp.git\n    cd n8n-mcp\n    npm install\n    npm run build\n    npm run rebuild\n    ```\n\n2.  **Test the installation:**\n\n    ```bash\n    npm start\n    ```\n\n3.  **Configure Claude Desktop:**\n\n    Add the following configuration to your Claude Desktop config file. Choose either the basic or full configuration based on your needs.  Replace `/absolute/path/to/n8n-mcp` with the actual absolute path to the cloned `n8n-mcp` directory.\n\n    **Basic configuration (documentation tools only):**\n\n    ```json\n    {\n      \"mcpServers\": {\n        \"n8n-mcp\": {\n          \"command\": \"node\",\n          \"args\": [\"/absolute/path/to/n8n-mcp/dist/mcp/index.js\"],\n          \"env\": {\n            \"MCP_MODE\": \"stdio\",\n            \"LOG_LEVEL\": \"error\",\n            \"DISABLE_CONSOLE_OUTPUT\": \"true\"\n          }\n        }\n      }\n    }\n    ```\n\n    **Full configuration (with n8n management tools):**\n\n    ```json\n    {\n      \"mcpServers\": {\n        \"n8n-mcp\": {\n          \"command\": \"node\",\n          \"args\": [\"/absolute/path/to/n8n-mcp/dist/mcp/index.js\"],\n          \"env\": {\n            \"MCP_MODE\": \"stdio\",\n            \"LOG_LEVEL\": \"error\",\n            \"DISABLE_CONSOLE_OUTPUT\": \"true\",\n            \"N8N_API_URL\": \"https://your-n8n-instance.com\",\n            \"N8N_API_KEY\": \"your-api-key\"\n          }\n        }\n      }\n    }\n    ```\n\n    *   Replace `https://your-n8n-instance.com` with the URL of your n8n instance.\n    *   Replace `your-api-key` with your n8n API key.\n    *   If you’re running n8n locally on the same machine (e.g., via Docker), use `http://host.docker.internal:5678` as the `N8N_API_URL`.\n\n    **Configuration file locations:**\n\n    *   **macOS**: `~/Library/Application Support/Claude/claude_desktop_config.json`\n    *   **Windows**: `%APPDATA%\\Claude\\claude_desktop_config.json`\n    *   **Linux**: `~/.config/","tools":"## Available Tools\n\n- **🔍 Smart Node Search**: Find nodes by name, category, or functionality.\n- **📖 Essential Properties**: Get only the 10-20 properties that matter.\n- **🎯 Task Templates**: Pre-configured settings for common automation tasks.\n- **✅ Config Validation**: Validate node configurations before deployment.\n- **🔗 Dependency Analysis**: Understand property relationships and conditions.\n- **💡 Working Examples**: Real-world examples for immediate use.\n- **⚡ Fast Response**: Average query time ~12ms with optimized SQLite.\n- **🌐 Universal Compatibility**: Works with any Node.js version.\n\n### Core Tools\n- **`tools_documentation`** - Get documentation for any MCP tool (START HERE!).\n- **`list_nodes`** - List all n8n nodes with filtering options.\n- **`get_node_info`** - Get comprehensive information about a specific node.\n- **`get_node_essentials`** - Get only essential properties with examples (10-20 properties instead of 200+).\n- **`search_nodes`** - Full-text search across all node documentation.\n- **`search_node_properties`** - Find specific properties within nodes.\n- **`list_ai_tools`** - List all AI-capable nodes (ANY node can be used as AI tool!).\n- **`get_node_as_tool_info`** - Get guidance on using any node as an AI tool.\n\n### Advanced Tools\n- **`get_node_for_task`** - Pre-configured node settings for common tasks.\n- **`list_tasks`** - Discover available task templates.\n- **`validate_node_operation`** - Validate node configurations (operation-aware, profiles support).\n- **`validate_node_minimal`** - Quick validation for just required fields.\n- **`validate_workflow`** - Complete workflow validation including AI tool connections.\n- **`validate_workflow_connections`** - Check workflow structure and AI tool connections.\n- **`validate_workflow_expressions`** - Validate n8n expressions including $fromAI().\n- **`get_property_dependencies`** - Analyze property visibility conditions.\n- **`get_node_documentation`** - Get parsed documentation from n8n-docs.\n- **`get_database_statistics`** - View database metrics and coverage.\n\n### n8n Management Tools (Optional - Requires API Configuration)\nThese powerful tools allow you to manage n8n workflows directly from Claude. They're only available when you provide `N8N_API_URL` and `N8N_API_KEY` in your configuration.\n\n#### Workflow Management\n- **`n8n_create_workflow`** - Create new workflows with nodes and connections.\n- **`n8n_get_workflow`** - Get complete workflow by ID.\n- **`n8n_get_workflow_details`** - Get workflow with execution statistics.\n- **`n8n_get_workflow_structure`** - Get simplified workflow structure.\n- **`n8n_get_workflow_minimal`** - Get minimal workflow info (ID, name, active status).\n- **`n8n_update_full_workflow`** - Update entire workflow (complete replacement).\n- **`n8n_update_partial_workflow`** - Update workflow using diff operations.\n- **`n8n_delete_workflow`** - Delete workflows permanently.\n- **`n8n_list_workflows`** - List workflows with filtering and pagination.\n- **`n8n_validate_workflow`** - Validate workflows already in n8n by ID.\n\n#### Execution Management\n- **`n8n_trigger_webhook_workflow`** - Trigger workflows via webhook URL.\n- **`n8n_get_execution`** - Get execution details by ID.\n- **`n8n_list_executions`** - List executions with status filtering.\n- **`n8n_delete_execution`** - Delete execution records.\n\n#### System Tools\n- **`n8n_health_check`** - Check n8n API connectivity and features.\n- **`n8n_diagnostic`** - Troubleshoot management tools visibility and configuration issues.\n- **`n8n_list_available_tools`** - List all available management tools.\n\n### Example Usage\n\n```typescript\n// Get essentials for quick configuration\nget_node_essentials(\"nodes-base.httpRequest\")\n\n// Find nodes for a specific task\nsearch_nodes({ query: \"send email gmail\" })\n\n// Get pre-configured settings\nget_node_for_task(\"send_email\")\n\n// Validate before deployment\nvalidate_node_operation({\n  nodeType: \"nodes-base.httpRequest\",\n  config: { method: \"POST\", url: \"...\" },\n  profile: \"runtime\" // or \"minimal\", \"ai-friendly\", \"strict\"\n})\n\n// Quick required field check\nvalidate_node_minimal({\n  nodeType: \"nodes-base.slack\",\n  config: { resource: \"message\", operation: \"send\" }\n})\n```","faq":null,"created_at":"2025-06-07T12:15:57+00:00","updated_at":"2025-07-07T16:55:50+00:00","source_url":"https://model-context-protocol.com/servers/n8n-mcp","related_articles":[]}