n8n MCP Server
A Model Context Protocol (MCP) server that provides AI assistants with access to n8n workflow management capabilities.
🚀 Quick Start
Using the Deployed Server (Recommended)
The easiest way to use the n8n MCP Server is through our deployed Cloudflare Workers instance:
MCP Inspector URL:
https://n8n-mcp-proxy-fixed.boris-spiegl.workers.dev/mcp/sse?apiKey=mcp-n8n-8k2p9x4w7v5q3m6n1j8h5r2y9t4e6u3s
Direct API URL:
https://n8n-mcp-proxy-fixed.boris-spiegl.workers.dev/mcp/sse
Available Tools
The server provides 11 tools for n8n workflow management:
- list_workflows - Retrieve a list of all workflows
- get_workflow - Get a specific workflow by ID
- create_workflow - Create a new workflow
- update_workflow - Update an existing workflow
- delete_workflow - Delete a workflow
- activate_workflow - Activate a workflow
- deactivate_workflow - Deactivate a workflow
- list_executions - List workflow executions
- get_execution - Get execution details
- delete_execution - Delete an execution
- run_webhook - Execute a workflow via webhook
🔧 Local Development
Prerequisites
- Node.js 18+
- npm
- PowerShell (for Windows scripts)
Setup
Clone and install:
git clone <repository-url> cd n8n-mcp-server npm installSet environment variables:
npm run setup-envBuild the project:
npm run build
Running Locally
Option 1: Full Stack (HTTP Server + Proxy + Inspector)
npm run start:full
Option 2: Individual Components
# Start HTTP server
npm run start:http
# Start proxy (in another terminal)
npm run start:proxy
# Start MCP Inspector (in another terminal)
npm run inspector
Testing
# Test the deployed version
npm run test:deploy
# Test local HTTP server
npm run test:mcp
# Test with coverage
npm run test:coverage
🌐 Deployment
Cloudflare Workers
The project includes multiple deployment targets:
# Deploy main HTTP server
npm run deploy
# Deploy MCP proxy with SSE support
npm run deploy:mcp-proxy-fixed
# Deploy SSE bridge
npm run deploy:sse-bridge
Environment Variables
For deployment, set these environment variables:
N8N_BASE_URL- Your n8n instance URLN8N_API_KEY- Your n8n API keyMCP_API_KEY- API key for MCP access
📡 API Usage
Streamable HTTP
Send JSON-RPC requests to the /mcp endpoint:
const response = await fetch('https://n8n-mcp-proxy-fixed.boris-spiegl.workers.dev/mcp/sse?apiKey=YOUR_API_KEY', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
jsonrpc: '2.0',
method: 'tools/list',
id: 1
})
});
Server-Sent Events (SSE)
Connect to the SSE endpoint for real-time communication:
const eventSource = new EventSource('https://n8n-mcp-proxy-fixed.boris-spiegl.workers.dev/mcp/sse?apiKey=YOUR_API_KEY');
🛠 Architecture
The project uses a vertical slice architecture with the following structure:
src/
├── api/ # n8n API client
├── config/ # Configuration and environment
├── tools/ # MCP tool implementations
│ ├── workflow/ # Workflow management tools
│ └── execution/ # Execution management tools
├── types/ # TypeScript type definitions
├── utils/ # Utility functions
└── workers/ # Cloudflare Workers implementations
🔐 Authentication
The server supports multiple authentication methods:
- Query Parameter:
?apiKey=your-key - Header:
Authorization: Bearer your-key - Header:
X-API-Key: your-key
📋 Available Scripts
| Script | Description |
|---|---|
npm run build | Build the TypeScript project |
npm run start | Start the HTTP server |
npm run start:http | Start HTTP server with environment setup |
npm run start:proxy | Start MCP proxy |
npm run start:full | Start full stack (HTTP + Proxy + Inspector) |
npm run dev | Start development mode with watch |
npm run test | Run tests |
npm run test:coverage | Run tests with coverage |
npm run inspector | Start MCP Inspector |
npm run deploy | Deploy to Cloudflare Workers |
🐛 Troubleshooting
Common Issues
- Port conflicts: Use different ports with environment variables
- Authentication errors: Verify API keys are correct
- Connection issues: Check firewall and network settings
Debug Mode
Enable debug logging:
export DEBUG=true
npm run start
📄 License
MIT License - see LICENSE file for details.
🤝 Contributing
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests
- Submit a pull request
📞 Support
- GitHub Issues: [Report bugs and request features]
- Documentation: [Additional docs in /docs folder]
n8n Workflow Automation Server
Project Details
- SynapticSolutionsAI/n8n-mcp-server
- MIT License
- Last Updated: 6/9/2025
Recomended MCP Servers
A Model Context Protocol server starter template
CLI to set up and deploy MCP Servers to Cloudflare Workers in seconds. Just write TypeScript functions to...
本项目通过将 MCP 协议转换为 MQTT 协议,我们能够利用强大的大型语言模型(LLMs),就能轻松操控您的智能家居、机器人或其他硬件设备。
🤗 smolagents: a barebones library for agents. Agents write python code to call tools and orchestrate other agents.
"Data Engineering Tutor," providing personalized updates about Data Engineering concepts, patterns, and technologies to a connected AI client.
A lightweight, ready-to-use TypeScript template for building Model Context Protocol (MCP) servers. This template provides the essential scaffolding...
MCP server for Atlassian (Confluence & Jira)
Attio Model Context Protocol (MCP) server implementation





