
n8n mcp execution project
Enhanced n8n MCP Tool with Full Webhook Execution Support
Repository Info
About This Server
Enhanced n8n MCP Tool with Full Webhook Execution Support
Model Context Protocol (MCP) - This server can be integrated with AI applications to provide additional context and capabilities, enabling enhanced AI interactions and functionality.
Documentation
N8N MCP Execution Server
A Model Context Protocol (MCP) server that enables AI assistants to create and execute n8n workflows with automatic webhook triggers.
Features
✅ Automatic Webhook Triggers: Every created workflow includes webhook triggers by default
✅ Auto-Activation: Workflows are automatically activated for immediate execution
✅ Unique Webhook Paths: Auto-generated unique paths prevent conflicts
✅ Dual URL Support: Both production and test webhook URLs provided
✅ Real Execution: Actually executes workflows via webhooks (no simulation)
✅ Error Handling: Comprehensive error handling and response parsing
Installation
- Clone this repository:
git clone https://github.com/joelfuller2016/n8n-mcp-execution-project.git
cd n8n-mcp-execution-project
- Install dependencies:
npm install
- Set up environment variables:
# Set your n8n API key
export N8N_API_KEY="your-n8n-api-key-here"
- Run the server:
npm start
Configuration
The server is pre-configured for the n8n instance at https://joelfuller.app.n8n.cloud. Update the configuration in server.js if using a different n8n instance:
const N8N_BASE_URL = 'https://your-n8n-instance.com';
Usage
This MCP server provides the following tools:
create_workflow
Creates a new n8n workflow with automatic webhook triggers.
Parameters:
name(required): Workflow namedescription(optional): Workflow descriptionnodes(optional): Additional nodes beyond webhook triggerconnections(optional): Connections between additional nodes
Returns:
{
"success": true,
"workflow": {
"id": "workflow-id",
"name": "My Workflow",
"active": true,
"webhookPath": "auto-my-workflow-1234567890",
"productionUrl": "https://joelfuller.app.n8n.cloud/webhook/auto-my-workflow-1234567890",
"testUrl": "https://joelfuller.app.n8n.cloud/webhook-test/auto-my-workflow-1234567890"
}
}
execute_workflow_webhook
Executes a workflow via its webhook URL.
Parameters:
webhookUrl(required): The webhook URL to executepayload(optional): JSON payload to senduseTestUrl(optional): Force use of test URL
Returns:
{
"success": true,
"executionId": "execution-id",
"data": { /* workflow response */ },
"status": 200
}
Other Tools
list_workflows: List all workflowsget_workflow: Get workflow by IDactivate_workflow: Activate a workflowdeactivate_workflow: Deactivate a workflow
Webhook Configuration
URL Formats
- Production:
https://joelfuller.app.n8n.cloud/webhook/{path} - Test:
https://joelfuller.app.n8n.cloud/webhook-test/{path}
Webhook Path Generation
Paths are auto-generated using the format:
auto-{sanitized-workflow-name}-{timestamp}
Example: auto-my-workflow-1732833600000
Default Webhook Node Configuration
{
name: 'Webhook Trigger',
type: 'n8n-nodes-base.webhook',
parameters: {
path: 'auto-workflow-name-timestamp',
httpMethod: 'POST',
responseMode: 'responseNode'
}
}
Technical Implementation
Issue #1: Functional Webhook Execution ✅
- Real webhook execution via HTTP requests
- Automatic workflow activation for production webhooks
- Proper error handling and response parsing
- Support for both production and test URLs
Issue #2: Default Webhook Triggers ✅
- Every workflow gets a webhook trigger as the first node
- Unique webhook paths prevent conflicts
- Workflows are immediately executable after creation
- Both production and test URLs returned in creation response
Development
Run in development mode with auto-restart:
npm run dev
Run tests:
npm test
Environment Variables
N8N_API_KEY: Your n8n API key (required)N8N_BASE_URL: Base URL of your n8n instance (optional, defaults to joelfuller.app.n8n.cloud)
Error Handling
The server includes comprehensive error handling for:
- Invalid API keys
- Network connectivity issues
- Workflow creation failures
- Webhook execution timeouts
- Invalid webhook URLs
Contributing
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
License
MIT License - see LICENSE file for details.
Support
For issues and questions:
- Create an issue in this repository
- Check the n8n documentation for webhook configuration
- Verify your n8n API key has proper permissions
Status: ✅ Both Issue #1 and Issue #2 implemented and functional
Quick Start
Clone the repository
git clone https://github.com/joelfuller2016/n8n-mcp-execution-projectInstall dependencies
cd n8n-mcp-execution-project
npm installFollow the documentation
Check the repository's README.md file for specific installation and usage instructions.
Repository Details
Recommended MCP Servers
Discord MCP
Enable AI assistants to seamlessly interact with Discord servers, channels, and messages.
Knit MCP
Connect AI agents to 200+ SaaS applications and automate workflows.
Apify MCP Server
Deploy and interact with Apify actors for web scraping and data extraction.
BrowserStack MCP
BrowserStack MCP Server for automated testing across multiple browsers.
Zapier MCP
A Zapier server that provides automation capabilities for various apps.