mbbill/n8n-api-mcp
If you are the rightful owner of n8n-api-mcp and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
A Model Context Protocol (MCP) server that enables AI chatbots to interact with the n8n workflow automation platform.
n8n MCP Server
A Model Context Protocol (MCP) server that enables AI chatbots to interact with n8n workflow automation platform.
๐ฏ Overview
This MCP server provides comprehensive tools for managing, editing, and executing n8n workflows through natural language commands. It can be integrated with Claude Desktop and other MCP-compatible AI tools to give you AI-powered workflow management capabilities.
โจ Features
- ๐ Workflow Management: List, create, update, and delete workflows
- ๐ ๏ธ Workflow Editing: Add nodes, modify configurations, and handle connections
- โถ๏ธ Execution Management: Trigger executions and monitor results
- ๐ Credential Management: Manage API keys and authentication credentials
- ๐ Resource Access: Get real-time status and data through MCP resources
- ๐ก๏ธ Security: Secure API key authentication and validation
๐ Available AI Tools
Workflow Tools
list_workflows
- List workflows with filtering optionsget_workflow
- Get detailed workflow informationcreate_workflow
- Create workflows from natural language descriptionsupdate_workflow
- Update workflows and add new nodesdelete_workflow
- Delete workflows with confirmationactivate_workflow
/deactivate_workflow
- Control workflow execution
Execution Tools
list_executions
- List executions with status filteringget_execution
- Get detailed execution informationget_workflow_executions
- Get executions for specific workflowsget_execution_summary
- Get execution statisticsdelete_execution
- Delete execution records
Credential Tools
list_credentials
- List configured credentialscreate_credential
- Create new credentialsupdate_credential
- Update existing credentialsdelete_credential
- Delete credentialsget_credential_types
- List available credential types
๐ง Setup
Prerequisites
- Node.js 18+
- n8n instance with API access
- n8n API key
Installation
-
Clone the repository
-
Install dependencies:
npm install
-
Create a
.env
file from the template:Copy-Item .env.example .env
-
Edit
.env
and set your n8n details:N8N_API_URL=http://localhost:5678/api/v1 N8N_API_KEY=your_api_key_here
-
Build the project:
npm run build
-
Test the server:
.\test-server.ps1
Claude Desktop Integration
Add this configuration to your Claude Desktop config file:
(%APPDATA%\Claude\claude_desktop_config.json
on Windows)
{
"mcpServers": {
"n8n": {
"command": "node",
"args": ["D:\\path\\to\\n8n-api-mcp\\dist\\index.js"],
"env": {
"N8N_API_URL": "http://localhost:5678/api/v1",
"N8N_API_KEY": "your_api_key_here"
}
}
}
}
After updating the config, restart Claude Desktop.
๐ฌ Usage Examples
Once configured, you can use natural language commands in Claude Desktop:
- "List my n8n workflows"
- "Create a workflow that sends an email when I get a webhook"
- "Show me recent executions for my data sync workflow"
- "Add a Slack notification to workflow ID abc123"
- "What credentials are configured?"
- "Activate the Daily Reports workflow"
๐งช Development
npm run dev
- Start development server with watch modenpm run test
- Run testsnpm run lint
- Lint codenpm run type-check
- Type check without emitting
๐ Documentation
docs/claude-desktop-setup.md
- Detailed setup instructionsPROJECT-SUMMARY.md
- Complete project overviewtest-server.ps1
- PowerShell setup verification script
๐ ๏ธ Built With
- TypeScript - Type-safe development
- MCP SDK - Model Context Protocol implementation
- Axios - HTTP client for n8n API
- Zod - Runtime type validation
- Vitest - Fast unit testing
๐ Requirements
- Node.js 18+
- n8n instance with API access
- n8n API key (generate in n8n Settings > API Keys)
License
MIT