Skip to main content

MCP server for n8n workflow management

Project description

n8n Advisor

MCP server for n8n workflow management. Provides AI assistants with the ability to review workflow status in n8n instances.

Features

  • check_workflows: Reviews all workflows and reports their status, including active/inactive counts and workflows with recent errors.

Installation

pip install m2ai-mcp-n8n-advisor

Configuration

Create a .env file or set environment variables:

# Base URL of your n8n instance (no trailing slash)
N8N_BASE_URL=https://your-n8n-instance.app.n8n.cloud

# API key from n8n Settings > API
N8N_API_KEY=your_api_key_here

Getting Your n8n API Key

  1. Open your n8n instance
  2. Go to Settings > API
  3. Create a new API key or copy an existing one
  4. Use the full URL of your n8n instance for N8N_BASE_URL

Usage

Claude Desktop Configuration

Add to your claude_desktop_config.json:

{
  "mcpServers": {
    "n8n": {
      "command": "n8n-advisor",
      "env": {
        "N8N_BASE_URL": "https://your-n8n-instance.app.n8n.cloud",
        "N8N_API_KEY": "your_api_key_here"
      }
    }
  }
}

Or run directly with Python:

{
  "mcpServers": {
    "n8n": {
      "command": "python",
      "args": ["-m", "n8n_mcp.server"],
      "env": {
        "N8N_BASE_URL": "https://your-n8n-instance.app.n8n.cloud",
        "N8N_API_KEY": "your_api_key_here"
      }
    }
  }
}

Available Tools

check_workflows

Reviews all workflows and reports their status.

Parameters: None

Returns:

  • total_workflows: Total number of workflows
  • active_workflows: Number of active workflows
  • inactive_workflows: Number of inactive workflows
  • workflows_with_errors: Count of workflows with recent errors
  • error_workflows: List of workflows with errors (id, name, error count)
  • workflows: Detailed list of all workflows with execution stats

Example Response:

{
  "total_workflows": 5,
  "active_workflows": 3,
  "inactive_workflows": 2,
  "workflows_with_errors": 1,
  "error_workflows": [
    {"id": "2", "name": "Data Sync", "errors": 3}
  ],
  "workflows": [
    {
      "id": "1",
      "name": "Email Notifications",
      "active": true,
      "recent_executions": {
        "success": 10,
        "error": 0,
        "waiting": 0,
        "running": 0
      }
    }
  ]
}

Development

# Install dev dependencies
pip install -e ".[dev]"

# Run tests
pytest

# Run tests with coverage
pytest --cov=n8n_mcp

# Type checking
mypy src/

# Linting
ruff check src/

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

m2ai_mcp_n8n_advisor-1.0.0.tar.gz (9.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

m2ai_mcp_n8n_advisor-1.0.0-py3-none-any.whl (8.1 kB view details)

Uploaded Python 3

File details

Details for the file m2ai_mcp_n8n_advisor-1.0.0.tar.gz.

File metadata

  • Download URL: m2ai_mcp_n8n_advisor-1.0.0.tar.gz
  • Upload date:
  • Size: 9.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for m2ai_mcp_n8n_advisor-1.0.0.tar.gz
Algorithm Hash digest
SHA256 7ff1c4f986e9c4e3ee2de7dd30a909f49b9e3a87a573cded9678db4302b87c72
MD5 1114bdd66ac4810bb5b0adb45cc30c47
BLAKE2b-256 3d60a12ef36d060acb3666e00dc87f010ca092afcb1a3fa3a75b4b3baf8a93a9

See more details on using hashes here.

File details

Details for the file m2ai_mcp_n8n_advisor-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for m2ai_mcp_n8n_advisor-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9c807ca7d74f4416df18b5b70a520a700c129d1317a560033f1c0a031c7a42a8
MD5 195ff1c945800ce0de095094070619ca
BLAKE2b-256 4d94df49528a646bfabf432260e4befb9f2e012a82129a0f6c0129d766db4887

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page