n8n-api-mcp

mbbill/n8n-api-mcp

3.2

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.

Tools
5
Resources
0
Prompts
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 options
  • get_workflow - Get detailed workflow information
  • create_workflow - Create workflows from natural language descriptions
  • update_workflow - Update workflows and add new nodes
  • delete_workflow - Delete workflows with confirmation
  • activate_workflow / deactivate_workflow - Control workflow execution

Execution Tools

  • list_executions - List executions with status filtering
  • get_execution - Get detailed execution information
  • get_workflow_executions - Get executions for specific workflows
  • get_execution_summary - Get execution statistics
  • delete_execution - Delete execution records

Credential Tools

  • list_credentials - List configured credentials
  • create_credential - Create new credentials
  • update_credential - Update existing credentials
  • delete_credential - Delete credentials
  • get_credential_types - List available credential types

๐Ÿ”ง Setup

Prerequisites

  • Node.js 18+
  • n8n instance with API access
  • n8n API key

Installation

  1. Clone the repository

  2. Install dependencies:

    npm install
    
  3. Create a .env file from the template:

    Copy-Item .env.example .env
    
  4. Edit .env and set your n8n details:

    N8N_API_URL=http://localhost:5678/api/v1
    N8N_API_KEY=your_api_key_here
    
  5. Build the project:

    npm run build
    
  6. 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 mode
  • npm run test - Run tests
  • npm run lint - Lint code
  • npm run type-check - Type check without emitting

๐Ÿ“š Documentation

  • docs/claude-desktop-setup.md - Detailed setup instructions
  • PROJECT-SUMMARY.md - Complete project overview
  • test-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