n8n-api-mcp
A Model Context Protocol (MCP) server that enables AI chatbots to interact with n8n workflow automation platform.
GitHubスター
0
ユーザー評価
未評価
フォーク
0
イシュー
0
閲覧数
0
お気に入り
0
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