Cursor n8n Builder
Enables AI assistants in Cursor IDE to manage n8n workflows through the n8n REST API, including creating, updating, activating workflows, viewing execution history, and triggering webhooks.
README
Cursor n8n MCP Server
A Model Context Protocol (MCP) server that enables AI assistants in Cursor IDE to manage n8n workflows through the n8n REST API.
Features
- Workflow Management: Create, update, delete, and list workflows
- Workflow Activation: Activate and deactivate workflows
- Execution Management: View execution history and details
- Webhook Triggering: Trigger workflows via webhook URLs
- Self-Documentation: Built-in help system for AI assistants
- Node Information: Common n8n node types and configurations
- Error Handling: Automatic retry with exponential backoff
Quick Start
Installation
git clone https://github.com/alicankiraz1/cursor-n8n-mcp.git
cd cursor-n8n-mcp
npm install
npm run build
node dist/index.js setup
Or use the install script:
./install.sh
Manual Configuration
Create or edit ~/.cursor/mcp.json for global configuration:
{
"mcpServers": {
"cursor-n8n-mcp": {
"command": "node",
"args": ["/path/to/cursor-n8n-mcp/dist/index.js"],
"env": {
"MCP_MODE": "stdio",
"LOG_LEVEL": "error",
"N8N_API_URL": "https://your-n8n-instance.com",
"N8N_API_KEY": "your-api-key"
}
}
}
}
Getting n8n API Key
- Log in to your n8n instance
- Go to Settings > API
- Click Create API Key
- Copy the generated key
Available Tools
Documentation & Help
| Tool | Description |
|---|---|
n8n_tools_help |
Get usage guide and documentation |
n8n_get_node_info |
Get information about common n8n nodes |
Workflow Management
| Tool | Description |
|---|---|
n8n_list_workflows |
List all workflows |
n8n_get_workflow |
Get workflow details by ID |
n8n_create_workflow |
Create a new workflow |
n8n_update_workflow |
Update an existing workflow |
n8n_delete_workflow |
Delete a workflow |
n8n_activate_workflow |
Activate a workflow |
n8n_deactivate_workflow |
Deactivate a workflow |
Execution Management
| Tool | Description |
|---|---|
n8n_list_executions |
List execution history |
n8n_get_execution |
Get execution details |
n8n_delete_execution |
Delete an execution record |
n8n_trigger_webhook |
Trigger a workflow via webhook |
System
| Tool | Description |
|---|---|
n8n_health_check |
Check n8n API connectivity |
Usage Examples
Check Connection
"Check the n8n connection"
List Workflows
"List all workflows in n8n"
Create a Workflow
"Create a webhook workflow that responds with the received data"
Get Node Information
"Show me how to configure a webhook node"
CLI Commands
node dist/index.js --help # Show help
node dist/index.js setup # Interactive setup
node dist/index.js config # Show configuration template
Project Structure
cursor-n8n-mcp/
├── src/
│ ├── index.ts # Entry point with CLI
│ ├── server.ts # MCP Server implementation
│ ├── tools/
│ │ ├── index.ts # Tool exports
│ │ ├── workflow-tools.ts # Workflow CRUD operations
│ │ ├── execution-tools.ts# Execution management
│ │ └── documentation-tools.ts # Help and node info
│ ├── services/
│ │ └── n8n-api-client.ts # n8n REST API client
│ ├── types/
│ │ └── index.ts # TypeScript definitions
│ └── utils/
│ ├── logger.ts # Logging utility
│ └── errors.ts # Error handling
├── package.json
├── tsconfig.json
├── LICENSE
└── README.md
Supported Node Types
The n8n_get_node_info tool provides information about these common nodes:
- Triggers: webhook, scheduleTrigger, manualTrigger
- Actions: httpRequest, code, set, if, merge
- Utilities: splitInBatches, respondToWebhook
Error Handling
The server includes robust error handling:
- Automatic Retry: Failed requests are retried up to 3 times
- Exponential Backoff: Delays increase between retries
- Detailed Errors: Error messages include hints for resolution
- Timeout Management: 30-second timeout for API requests
Environment Variables
| Variable | Description | Required |
|---|---|---|
N8N_API_URL |
Your n8n instance URL | Yes |
N8N_API_KEY |
n8n API key | Yes |
LOG_LEVEL |
Log level (debug, info, warn, error) | No |
MCP_MODE |
MCP transport mode (stdio) | No |
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
License
This project is licensed under the MIT License - see the LICENSE file for details.
Acknowledgments
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases