N8N MCP Server
Manages n8n workflows, including listing, creating, updating, deleting, executing, and activating/deactivating workflows, as well as viewing execution history.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@N8N MCP Servercreate a workflow that sends a Slack notification on webhook"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
N8N MCP Server
Model Context Protocol (MCP) server for managing n8n workflows. This allows Claude and other MCP-compatible tools to create, read, update, and delete workflows in your n8n instance.
Features
📋 List all workflows
📖 Get workflow details
✏️ Create new workflows
🔄 Update existing workflows
🗑️ Delete workflows
▶️ Execute workflows
📊 View execution history
🔄 Activate/deactivate workflows
Related MCP server: n8n Workflow Builder MCP Server
Setup
Clone this repository:
git clone https://github.com/chinmaybhatk/n8n-mcp-server.git cd n8n-mcp-serverInstall dependencies:
npm installCreate environment file:
cp .env.example .envEdit
.envwith your n8n credentials:N8N_URL=https://your-n8n-instance.com N8N_API_KEY=your_api_key_hereBuild the project:
npm run build
Getting n8n API Key
In your n8n instance, go to Settings > API
Create a new API key with the following permissions:
workflow:createworkflow:readworkflow:updateworkflow:deleteworkflow:executeexecution:read
Usage
With Claude Desktop
Add to your Claude Desktop MCP configuration:
{
"mcpServers": {
"n8n": {
"command": "node",
"args": ["/path/to/n8n-mcp-server/build/index.js"],
"env": {
"N8N_URL": "https://your-n8n-instance.com",
"N8N_API_KEY": "your_api_key_here"
}
}
}
}Development
Run in development mode:
npm run devAvailable Tools
list_workflows- List all workflows with optional active filterget_workflow- Get detailed workflow information by IDcreate_workflow- Create a new workflow with nodes and connectionsupdate_workflow- Update an existing workflowdelete_workflow- Delete a workflow by IDactivate_workflow- Activate or deactivate a workflowexecute_workflow- Manually execute a workflowget_executions- Get workflow execution history
Troubleshooting
Common Issues
400 Bad Request when creating workflows:
The server now automatically generates node IDs if not provided
Default positions are set for nodes without positions
Default typeVersion is set to 1 if not specified
Ensure node names and types are provided
Authentication Errors:
Verify your N8N_API_KEY is correct and has proper permissions
Ensure your N8N_URL is accessible and includes the protocol (https://)
Check that the API key hasn't expired
Network Timeouts:
The server includes a 30-second timeout for API requests
For large workflows, consider breaking them into smaller parts
405 Method Not Allowed:
The server includes fallback methods for activation and execution
For activation, it will try updating the entire workflow if PATCH fails
Debug Mode
Enable debug mode by setting DEBUG=true in your .env file:
DEBUG=trueThis will log request/response data for troubleshooting.
Testing API Connection
You can test your n8n API connection manually:
curl -H "X-N8N-API-KEY: your_api_key" https://your-n8n-instance.com/api/v1/workflowsRecent Updates (v1.0.2)
✅ Auto-generate node IDs when not provided
✅ Set intelligent default positions for nodes
✅ Auto-set typeVersion to 1 if not specified
✅ Enhanced workflow settings with proper defaults
✅ Improved activation endpoint with fallback method
✅ Added debug mode for request/response logging
✅ Better error messages with full response data
Recent Updates (v1.0.1)
✅ Fixed workflow creation payload structure
✅ Added comprehensive error handling and logging
✅ Improved node validation before creation
✅ Added fallback endpoints for different n8n versions
✅ Better error messages for troubleshooting
✅ Preserved existing workflow data during updates
✅ Increased API timeout to 30 seconds
Example Usage
Once configured, you can interact with Claude like this:
You: "Create a workflow that monitors a webhook, processes the data with a Code node to extract email addresses, and sends notifications via Slack."
Claude will:
Design the workflow structure
Create the appropriate nodes (Webhook, Code, Slack)
Configure the connections
Use the MCP server to create it in your n8n instance
Note: You don't need to specify node IDs or positions - the server handles these automatically!
Security
Never commit your
.envfileStore API keys securely
Use environment variables for sensitive configuration
Ensure your n8n instance is properly secured
Contributing
Fork the repository
Create a feature branch
Make your changes
Add tests if applicable
Submit a pull request
License
ISC
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/chinmaybhatk/n8n-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server