n8n-workflow-tester-safe

n8n-workflow-tester-safe

Safe MCP server and CLI tool for testing, scoring, and inspecting n8n workflows. Features 19 tools for workflow testing, execution traces, tiered scoring, and a built-in node catalog with 800+ node types. Designed with safety-first approach: no credential management, no secrets lifecycle, no auto-fix loops.

Category
访问服务器

README

<p align="center"> <img src="assets/banner.svg" alt="n8n-workflow-tester-safe" width="100%"/> </p>

<p align="center"> <a href="https://opensource.org/licenses/MIT"><img src="https://img.shields.io/badge/License-MIT-E8784A.svg" alt="License: MIT"/></a> <a href="https://modelcontextprotocol.io"><img src="https://img.shields.io/badge/MCP-Compatible-D4A574.svg" alt="MCP Compatible"/></a> <a href="https://www.typescriptlang.org"><img src="https://img.shields.io/badge/TypeScript-5.7-blue.svg" alt="TypeScript"/></a> <a href="https://n8n.io"><img src="https://img.shields.io/badge/n8n-2.12+-FF6D5A.svg" alt="n8n"/></a> </p>

<p align="center"> <strong>Safe MCP server + CLI for testing, scoring, and inspecting n8n workflows</strong><br/> <em>Config-driven test suites with tiered scoring, execution traces, and a built-in node catalog.</em> </p>

<a href="https://glama.ai/mcp/servers/Souzix76/n8n-workflow-tester-safe"> <img width="380" height="200" src="https://glama.ai/mcp/servers/Souzix76/n8n-workflow-tester-safe/badge" alt="n8n-workflow-tester-safe MCP server" /> </a>


Why?

Most n8n MCP integrations give you full admin access — credentials, destructive operations, auto-fix loops. That's fine for development, but risky for CI, shared environments, or autonomous agents.

n8n-workflow-tester-safe takes a different approach:

Feature This MCP Full admin MCPs
Test workflows with scoring Yes No
Execution traces (lightweight) Yes No
Node catalog with suggestions Yes No
Credential management Excluded Yes
Secret lifecycle Excluded Yes
Auto-fix loops Excluded Some

Result: A focused tool that does testing and inspection really well, without the risk surface of a full admin wrapper.


Quick Start

1. Install

git clone https://github.com/souzix76/n8n-workflow-tester-safe.git
cd n8n-workflow-tester-safe
npm install && npm run build

2. Configure

cp .env.example .env
# Edit .env with your n8n URL and API key
N8N_BASE_URL=http://127.0.0.1:5678
N8N_API_KEY=your_n8n_api_key_here
DEFAULT_TIMEOUT_MS=30000

3. Run

As MCP server (for Claude, OpenClaw, or any MCP client):

node dist/index.js

As CLI (for scripts and CI):

node dist/cli.js --config ./workflows/example.json

MCP Client Configuration

Claude Code (~/.claude.json)

{
  "mcpServers": {
    "n8n-workflow-tester": {
      "type": "stdio",
      "command": "node",
      "args": ["/path/to/n8n-workflow-tester-safe/dist/index.js"],
      "env": {
        "N8N_BASE_URL": "http://localhost:5678",
        "N8N_API_KEY": "your_api_key"
      }
    }
  }
}

OpenClaw / Any MCP client

The server uses stdio transport — compatible with any MCP client that supports stdio.


How It Works

Test Config

Define your tests in a JSON file:

{
  "workflowId": "abc123",
  "workflowName": "my-webhook-handler",
  "triggerMode": "webhook",
  "webhookPath": "/webhook/my-handler",
  "timeoutMs": 15000,
  "qualityThreshold": 85,
  "testPayloads": [
    {
      "name": "happy-path",
      "data": { "message": "Hello", "userId": "user_001" }
    },
    {
      "name": "empty-input",
      "data": { "message": "" }
    },
    {
      "name": "large-payload",
      "data": { "items": ["a","b","c","d","e","f","g","h","i","j"] }
    }
  ],
  "tier3Checks": [
    {
      "name": "has-response",
      "field": "output",
      "check": "not_empty",
      "severity": "error"
    },
    {
      "name": "response-length",
      "field": "output.message",
      "check": "min_length",
      "value": 5,
      "severity": "warning",
      "message": "Response too short"
    }
  ]
}

Scoring System

Every test run produces a two-tier score:

Final Score = (Tier 1 x 70%) + (Tier 3 x 30%)
Tier Weight What it checks
Tier 1 (Infrastructure) 70% HTTP success, timeout compliance, non-empty output
Tier 3 (Quality) 30% Custom field checks: contains, equals, min/max length, not_empty

A test passes when:

  • Tier 1 score = 100 (all infrastructure checks pass)
  • Final score >= quality threshold (default 85)
  • No issues with severity error

Example Output

{
  "passed": true,
  "score": 93,
  "tier1Score": 100,
  "tier3Score": 80,
  "issues": [
    {
      "tier": "tier3",
      "severity": "warning",
      "check": "response-length",
      "message": "Response too short"
    }
  ]
}

Tools Reference

Testing (3 tools)

Tool Description
test_workflow Run a single payload test from a config file
evaluate_workflow_result Run a test and return evaluation score + issues
run_workflow_suite Run all payloads in a config, return per-payload scores

Workflow Operations (5 tools)

Tool Description
create_workflow Create a new workflow from JSON
update_workflow Replace an existing workflow by ID
delete_workflow Delete a workflow by ID
add_node_to_workflow Append a node to an existing workflow
connect_nodes Create a connection between two nodes

Introspection (5 tools)

Tool Description
get_workflow_summary Compact summary: node count, names, types, disabled status
list_node_types List all available node types from the n8n instance
get_node_type Full schema/metadata for a specific node type
list_executions Recent executions, filterable by workflow and status
get_execution Full execution data by ID
get_execution_trace Lightweight per-node trace — timing, errors, item counts

Catalog (5 tools)

Tool Description
get_catalog_stats Node/trigger/credential counts from imported catalog
search_nodes Fuzzy search by name, optional trigger-only filter
list_triggers All trigger nodes from the catalog
validate_node_type Check if a node type exists, get close matches
suggest_nodes_for_task Natural-language task in, relevant nodes out

Example Configs

The workflows/ directory includes ready-to-use test configs:

File Trigger Mode Payloads Description
example.json webhook 2 Basic webhook echo test
telegram-bot.json webhook 3 Telegram bot command handler
api-pipeline.json execute 3 Multi-step API data pipeline

Architecture

src/
  index.ts        MCP server (stdio) + tool registration
  cli.ts          CLI runner for config-driven tests
  n8n-client.ts   REST client for n8n API v1
  evaluator.ts    Two-tier scoring engine
  catalog.ts      Node catalog parser + fuzzy search
  config.ts       JSON config reader + Zod validation
  types.ts        TypeScript interfaces

catalog/          Imported n8n node catalog (436 nodes, 389 credentials)
workflows/        Example test suite configs

Design Constraints

  • stdio-only transport — no HTTP server, no auth to manage
  • Explicit tool surface — 19 tools, each with a clear purpose
  • Small dependency footprint — only @modelcontextprotocol/sdk and zod
  • No credential lifecycle — won't read, create, or delete credentials
  • No agentic auto-repair — reports issues, doesn't auto-fix them

Safety Posture

Included

  • Workflow test execution (webhook + API)
  • Output evaluation with tiered scoring
  • Workflow CRUD (create, read, update, delete)
  • Graph editing (add nodes, connect)
  • Execution inspection and tracing
  • Node catalog lookup and validation

Deliberately Excluded

  • Credentials management
  • Secrets lifecycle
  • Destructive restore flows
  • Autonomous LLM auto-fix loops
  • Production deployment operations

Roadmap

  • [ ] Read-only mode flag (disable all mutation tools)
  • [ ] Workflow diff summaries (before/after comparison)
  • [ ] Reusable evaluation presets for common patterns
  • [ ] Richer trace visualization
  • [ ] Fixture libraries for test payloads
  • [ ] npm package for npx usage

Contributing

  1. Fork the repo
  2. Create a feature branch (git checkout -b feat/my-feature)
  3. Commit changes (git commit -m 'feat: add my feature')
  4. Push to branch (git push origin feat/my-feature)
  5. Open a Pull Request

License

MIT


<p align="center"> Originally created by James (<a href="https://openclaw.org">OpenClaw</a>). Enhanced and maintained by <a href="https://github.com/Souzix76">Souzix76</a>.<br/> Built for <a href="https://n8n.io">n8n</a> operators who want testing without the risk surface.<br/> Compatible with <a href="https://claude.ai">Claude</a>, <a href="https://openclaw.org">OpenClaw</a>, and any MCP client. </p>

推荐服务器

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 模型以安全和受控的方式获取实时的网络信息。

官方
精选