n8n MCP Server
Overview
- List, create, update, and delete workflows
- Activate and deactivate workflows
- Execute workflows and monitor their status
- Access workflow information and execution statistics
Installation
Prerequisites
- Node.js 18 or later
- n8n instance with API access enabled
Install from npm
Install from source
Configuration
.env file in the directory where you'll run the server, using .env.example as a template:[object Object] | [object Object] | [object Object] |
[object Object] | [object Object] | [object Object] |
[object Object] | [object Object] | [object Object] |
[object Object] | [object Object] | [object Object] |
[object Object] | [object Object] | [object Object] |
[object Object] | [object Object] | [object Object] |
Generating an n8n API Key
- Open your n8n instance in a browser
- Go to Settings > API > API Keys
- Create a new API key with appropriate permissions
- Copy the key to your
.envfile
Usage
Running the Server
Integrating with AI Assistants
npm run build), you need to configure your AI assistant (like VS Code with the Claude extension or the Claude Desktop app) to run it. This typically involves editing a JSON configuration file.- Replace
/path/to/your/cloned/n8n-mcp-server/with the actual absolute path where you cloned and built the repository.
- Use the correct path separator for your operating system (forward slashes
/for macOS/Linux, double backslashes\\for Windows).
- Ensure you provide the correct
N8N_API_URL(including/api/v1) andN8N_API_KEY.
- The server needs to be built (
npm run build) before the assistant can run thebuild/index.jsfile.
Available Tools
Using Webhooks
- Create a webhook-triggered workflow in n8n.
- Set up Basic Authentication on your webhook node.
- Use the
run_webhooktool to trigger the workflow, passing just the workflow name.
N8N_WEBHOOK_USERNAME and N8N_WEBHOOK_PASSWORD environment variables.Workflow Management
workflow_list: List all workflows
workflow_get: Get details of a specific workflow
workflow_create: Create a new workflow
workflow_update: Update an existing workflow
workflow_delete: Delete a workflow
workflow_activate: Activate a workflow
workflow_deactivate: Deactivate a workflow
Execution Management
execution_run: Execute a workflow via the API
run_webhook: Execute a workflow via a webhook
execution_get: Get details of a specific execution
execution_list: List executions for a workflow
execution_stop: Stop a running execution
Resources
n8n://workflows/list: List of all workflows
n8n://workflow/{id}: Details of a specific workflow
n8n://executions/{workflowId}: List of executions for a workflow
n8n://execution/{id}: Details of a specific execution
Development
Building
Running in Development Mode
Testing
Linting
License
n8n MCP Server
Overview
- List, create, update, and delete workflows
- Activate and deactivate workflows
- Execute workflows and monitor their status
- Access workflow information and execution statistics
Installation
Prerequisites
- Node.js 18 or later
- n8n instance with API access enabled
Install from npm
Install from source
Configuration
.env file in the directory where you'll run the server, using .env.example as a template:[object Object] | [object Object] | [object Object] |
[object Object] | [object Object] | [object Object] |
[object Object] | [object Object] | [object Object] |
[object Object] | [object Object] | [object Object] |
[object Object] | [object Object] | [object Object] |
[object Object] | [object Object] | [object Object] |
Generating an n8n API Key
- Open your n8n instance in a browser
- Go to Settings > API > API Keys
- Create a new API key with appropriate permissions
- Copy the key to your
.envfile
Usage
Running the Server
Integrating with AI Assistants
npm run build), you need to configure your AI assistant (like VS Code with the Claude extension or the Claude Desktop app) to run it. This typically involves editing a JSON configuration file.- Replace
/path/to/your/cloned/n8n-mcp-server/with the actual absolute path where you cloned and built the repository.
- Use the correct path separator for your operating system (forward slashes
/for macOS/Linux, double backslashes\\for Windows).
- Ensure you provide the correct
N8N_API_URL(including/api/v1) andN8N_API_KEY.
- The server needs to be built (
npm run build) before the assistant can run thebuild/index.jsfile.
Available Tools
Using Webhooks
- Create a webhook-triggered workflow in n8n.
- Set up Basic Authentication on your webhook node.
- Use the
run_webhooktool to trigger the workflow, passing just the workflow name.
N8N_WEBHOOK_USERNAME and N8N_WEBHOOK_PASSWORD environment variables.Workflow Management
workflow_list: List all workflows
workflow_get: Get details of a specific workflow
workflow_create: Create a new workflow
workflow_update: Update an existing workflow
workflow_delete: Delete a workflow
workflow_activate: Activate a workflow
workflow_deactivate: Deactivate a workflow
Execution Management
execution_run: Execute a workflow via the API
run_webhook: Execute a workflow via a webhook
execution_get: Get details of a specific execution
execution_list: List executions for a workflow
execution_stop: Stop a running execution
Resources
n8n://workflows/list: List of all workflows
n8n://workflow/{id}: Details of a specific workflow
n8n://executions/{workflowId}: List of executions for a workflow
n8n://execution/{id}: Details of a specific execution