n8n Monitoring MCP Server

n8n Monitoring MCP Server

Provides Claude AI assistants with focused monitoring tools for n8n workflow execution analysis, including active workflow listing, execution history with KPIs, and detailed failure information.

Category
访问服务器

README

n8n Monitoring MCP Server

Specialized MCP server for n8n workflow monitoring with KPI analysis

Provides Claude AI assistants with 3 focused monitoring tools for n8n workflow execution analysis. Deployed on Cloudflare Workers for global edge performance.

Features

  • 3 Monitoring Tools:

    • n8n_get_active_workflows - List all active workflows
    • n8n_get_workflow_executions - Get execution history with comprehensive KPI analysis
    • n8n_get_execution_details - Get detailed failure information with error messages
  • Multi-tenant Support: Use different n8n instances via request headers (X-N8N-URL, X-N8N-API-KEY)

  • Comprehensive KPI Analysis:

    • Execution summary (total, success, failed, failure rate)
    • Execution modes distribution (manual, trigger, webhook, etc.)
    • Per-workflow metrics and failure rates
    • Timing analysis (avg/max/min execution time)
    • Recent failure analysis
    • Automated alerts for high failure rates
  • Rate Limiting: 100 requests/minute per tenant

  • Serverless & Global: Deployed on Cloudflare Workers for low latency worldwide

Quick Start

Prerequisites

  • Node.js 18+ and npm
  • Cloudflare account (free tier works)
  • n8n instance with API access
  • n8n API key (create one)

Installation

# Clone repository
git clone https://github.com/YOUR_USERNAME/n8n-monitoring-mcp.git
cd n8n-monitoring-mcp

# Install dependencies
npm install

# Login to Cloudflare
npx wrangler login

Local Development

# Start local dev server
npm run dev

# Test with curl
curl -X POST http://localhost:8787 \
  -H "Content-Type: application/json" \
  -H "X-N8N-URL: https://your-n8n-instance.com" \
  -H "X-N8N-API-KEY: your_api_key" \
  -d '{"method":"tools/list"}'

Deploy to Cloudflare Workers

# Deploy to production
npm run deploy

# Get your Worker URL
# https://n8n-monitoring-mcp.YOUR_SUBDOMAIN.workers.dev

Tool Reference

1. n8n_get_active_workflows

List all active workflows in your n8n instance.

Parameters: None

Example Request:

{
  "method": "tools/call",
  "params": {
    "name": "n8n_get_active_workflows",
    "arguments": {}
  }
}

Example Response:

[
  {
    "id": "f8exh14YagxEj1To",
    "name": "Workflow Execution Audit",
    "active": true,
    "createdAt": "2025-01-15T10:30:00.000Z",
    "updatedAt": "2025-01-20T14:22:00.000Z"
  }
]

2. n8n_get_workflow_executions

Get workflow execution history with comprehensive KPI analysis.

Parameters:

  • limit (number, optional): Maximum executions to retrieve (default: 100)
  • workflowId (string, optional): Filter by specific workflow ID

Example Request:

{
  "method": "tools/call",
  "params": {
    "name": "n8n_get_workflow_executions",
    "arguments": {
      "limit": 50
    }
  }
}

Example Response:

{
  "executionCount": 50,
  "kpis": {
    "summary": {
      "total": 50,
      "success": 42,
      "failed": 8,
      "waiting": 0,
      "running": 0,
      "failureRate": 16.0
    },
    "modes": {
      "trigger": 35,
      "webhook": 10,
      "manual": 5
    },
    "workflowMetrics": [
      {
        "workflowId": "abc123",
        "workflowName": "Data Sync Workflow",
        "total": 25,
        "success": 20,
        "failed": 5,
        "failureRate": 20.0
      }
    ],
    "timeMetrics": {
      "avgExecutionTime": 3500,
      "maxExecutionTime": 12000,
      "minExecutionTime": 500
    },
    "failureAnalysis": {
      "recentFailures": [...],
      "workflowsWithFailures": ["abc123", "def456"],
      "totalFailedWorkflows": 2
    },
    "alerts": [
      "⚡ Moderate failure rate: 16% of executions failed"
    ]
  }
}

3. n8n_get_execution_details

Get detailed information about failed executions, including error messages.

Parameters:

  • limit (number, optional): Maximum failed executions to retrieve (default: 20)
  • workflowId (string, optional): Filter by specific workflow ID

Example Request:

{
  "method": "tools/call",
  "params": {
    "name": "n8n_get_execution_details",
    "arguments": {
      "limit": 10,
      "workflowId": "abc123"
    }
  }
}

Example Response:

{
  "failedExecutionCount": 5,
  "failures": [
    {
      "executionId": "exec123",
      "workflowId": "abc123",
      "workflowName": "Data Sync Workflow",
      "mode": "trigger",
      "startedAt": "2025-01-26T10:30:00.000Z",
      "errorMessage": "Connection timeout",
      "errorDescription": "Failed to connect to external API after 30 seconds",
      "lastNodeExecuted": "HTTP Request"
    }
  ]
}

Claude Desktop Integration

Add to your claude_desktop_config.json:

{
  "mcpServers": {
    "n8n-monitoring": {
      "url": "https://n8n-monitoring-mcp.YOUR_SUBDOMAIN.workers.dev",
      "transport": {
        "type": "http"
      },
      "headers": {
        "X-N8N-URL": "https://your-n8n-instance.com",
        "X-N8N-API-KEY": "your_n8n_api_key"
      }
    }
  }
}

Restart Claude Desktop and try these prompts:

  • "List all active n8n workflows"
  • "Show me workflow execution KPIs for the last 50 executions"
  • "Get details of recent failed workflow executions"

Rate Limiting

  • Default: 100 requests per minute per tenant
  • Tenant ID: Based on combination of X-N8N-URL and X-N8N-API-KEY
  • Response Headers:
    • X-RateLimit-Remaining: Remaining requests in current window
    • X-RateLimit-Reset: Seconds until rate limit resets
  • Rate Limit Exceeded: HTTP 429 response

Architecture

┌─────────────────────────┐
│  Client (Claude Desktop)│
│  + Request Headers:     │
│    X-N8N-URL           │
│    X-N8N-API-KEY       │
└───────────┬─────────────┘
            │
            ▼
┌─────────────────────────┐
│  Cloudflare Worker      │
│  - Rate limiting        │
│  - Multi-tenant routing │
│  - KPI processing       │
└───────────┬─────────────┘
            │
    ┌───────┴───────┐
    ▼               ▼
┌─────────┐   ┌─────────┐
│ Tenant 1│   │ Tenant 2│
│ n8n-no1 │   │ n8n-no2 │
└─────────┘   └─────────┘

Development

# Run type checking
npm run typecheck

# View live logs
npm run tail

# Test locally
npm run dev

Key Differences from n8n-mcp-workers

Aspect n8n-mcp-workers n8n-monitoring-mcp
Purpose General n8n automation Workflow monitoring
Tools 32 tools (full API) 3 tools (monitoring)
Logic Simple API forwarding Custom KPI processing
Use Case Any n8n operation Claude AI monitoring assistant
Response Raw API data Processed metrics + alerts

Contributing

Contributions welcome! Please open an issue or PR.

License

MIT License - see LICENSE file

Credits

Support

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选