n8n Manager for AI Agents

n8n Manager for AI Agents

Enables AI agents to manage n8n workflow automation instances through tools for workflow CRUD operations, execution monitoring, and webhook triggering. It facilitates programmatic interaction with n8n instances via the n8n API with AI-optimized descriptions and error handling.

Category
Visit Server

README

n8n Manager for AI Agents

[!IMPORTANT] This repository is no longer being actively developed. The n8n instance management tools have been integrated into the more comprehensive n8n-mcp project, which provides a complete solution for n8n automation with AI agents.

Please use n8n-mcp for the latest features and updates.

License: MIT Node.js Version TypeScript MCP SDK n8n API

A Model Context Protocol (MCP) server that enables Claude Desktop and other AI agents to manage n8n workflow automation instances through the n8n API.

๐ŸŽฏ Project Overview

This MCP server provides AI agents with tools to manage n8n workflows programmatically. It implements the core n8n API operations with intelligent workarounds for API limitations.

โœ… What's Working

  • Workflow Management: Create, read, update, and delete workflows
  • Execution Monitoring: List and view execution details, delete execution records
  • Webhook Triggers: Execute workflows via webhook endpoints
  • Health Monitoring: Check n8n instance connectivity and configuration

๐Ÿšง Current Limitations

  • Workflow Activation: Cannot activate/deactivate workflows via API (manual UI activation required)
  • Direct Execution: Not available - must use webhook triggers
  • Tags & Credentials: Read-only fields, cannot be set via API

๐Ÿš€ Implemented Features

  • Workflow Operations: Full CRUD operations for n8n workflows
  • Execution Management: View, list, and delete execution records
  • Webhook-Based Execution: Trigger workflows via webhook URLs
  • Smart Error Handling: Automatic removal of read-only fields, method fallbacks
  • AI-Friendly Descriptions: Enhanced tool descriptions with examples and clear limitations
  • Cursor-Based Pagination: Efficient handling of large result sets
  • Health Monitoring: Built-in connectivity and configuration checks

โš ๏ธ API Limitations & Workarounds

Discovered Limitations

  • Workflow Activation: The active field is read-only - workflows must be activated manually in the UI
  • Tags Field: Read-only during creation and updates
  • PATCH Method: Some n8n instances don't support PATCH for workflow updates
  • Direct Execution: Must use webhook triggers (no direct execution API)
  • Settings Field: Required but undocumented - we provide sensible defaults

Not Implemented (API Unavailable)

  • User Management: No public API endpoints
  • Credential Management: Limited API, schemas not exposed
  • Stop Execution: Cannot stop running executions via API
  • Variables: Only available through source control API
  • Import/Export: Planned but not yet implemented

๐Ÿ“ฆ Available MCP Tools

Workflow Management

  • n8n_create_workflow - Create new workflows with nodes and connections
  • n8n_get_workflow - Retrieve workflow details by ID
  • n8n_update_workflow - Update existing workflows (requires full node list)
  • n8n_delete_workflow - Delete workflows permanently
  • n8n_list_workflows - List workflows with filtering and pagination

Execution Management

  • n8n_trigger_webhook_workflow - Trigger workflows via webhook URL
  • n8n_get_execution - Get detailed execution information
  • n8n_list_executions - List executions with status filtering
  • n8n_delete_execution - Delete execution records

System Tools

  • n8n_health_check - Check API connectivity and configuration

๐Ÿ› ๏ธ Technology Stack

  • Runtime: Node.js 20+
  • Language: TypeScript 5.0
  • MCP SDK: @modelcontextprotocol/sdk v1.13.1
  • HTTP Client: Axios with retry logic
  • Validation: Zod schemas
  • Logging: Winston (file-based in MCP mode)
  • Build: TypeScript with ES modules

๐Ÿ“‹ Prerequisites

  • Node.js 20 or higher
  • n8n instance with API access enabled
  • n8n API key
  • Claude Desktop (for MCP integration)

๐Ÿš€ Quick Start

  1. Clone the repository

    git clone https://github.com/czlonkowski/n8n-manager-for-ai-agents
    cd n8n-manager-for-ai-agents
    
  2. Install dependencies

    npm install
    
  3. Configure environment

    cp .env.example .env
    # Edit .env with your n8n instance details
    
  4. Build the project

    npm run build
    
  5. Configure Claude Desktop Add to your Claude Desktop configuration (~/Library/Application Support/Claude/claude_desktop_config.json on macOS):

    {
      "mcpServers": {
        "n8n-manager": {
          "command": "node",
          "args": ["/absolute/path/to/n8n-manager-for-ai-agents/build/index.js"],
          "env": {
            "N8N_API_URL": "https://your-n8n-instance.com",
            "N8N_API_KEY": "your-api-key",
            "LOG_LEVEL": "info",
            "NODE_ENV": "production",
            "MCP_MODE": "stdio"
          }
        }
      }
    }
    
  6. Restart Claude Desktop and verify the n8n-manager appears in the MCP tools list

๐Ÿ“ Log Files

Logs are written to ~/.n8n-manager/logs/n8n-manager.log to avoid interfering with MCP protocol communication.

๐Ÿ’ก Usage Examples

Creating a Simple Workflow

"Create a workflow named 'Test API' with a manual trigger"

Listing Workflows

"Show me all active workflows"
"List workflows with tag 'production'"

Checking Executions

"Show recent executions for workflow ID abc123"
"Get details of execution xyz789"

Webhook Execution

"Trigger the webhook at https://n8n.example.com/webhook/abc-def-ghi"

๐Ÿ“– Documentation

๐Ÿงช Development

# Run tests
npm test

# Run in development mode
npm run dev

# Type checking
npm run typecheck

# Linting
npm run lint

# Build for production
npm run build

๐Ÿค Contributing

Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.

๐Ÿ” Security

  • API keys are stored in environment variables
  • No sensitive data is logged
  • All communications use HTTPS
  • Implements rate limiting and request validation

๐Ÿ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

Copyright (c) 2024 Romuald Czlonkowski @ aiadvisors.pl

๐Ÿ™ Acknowledgments

๐Ÿ“ž Contact

Romuald Czlonkowski
aiadvisors.pl


Phase 1 Complete: Core workflow and execution management tools are fully functional. See CLAUDE.md for detailed usage guidance and common error solutions.

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured