n8n-workflow-tester-safe
This server provides a safe, focused environment for testing, scoring, and inspecting n8n workflows via an MCP-compatible interface, while deliberately excluding credential management, secret lifecycle operations, and destructive/autonomous operations.
Testing & Evaluation
Run single payload tests (
test_workflow), full test suites (run_workflow_suite), and scored evaluations (evaluate_workflow_result) using a two-tier scoring system (70% infrastructure, 30% quality) with config-driven JSON test definitions
Workflow Management
Create, update, and delete workflows; retrieve compact workflow summaries (node count, names, types, disabled status)
Graph Editing
Add nodes to existing workflows and connect nodes to build workflow graphs
Execution Inspection
List recent executions (filterable by workflow/status), fetch full execution data by ID, and get lightweight per-node traces with timing, errors, and item counts
Node Type Introspection
List all node types from the connected n8n instance and retrieve full schemas/metadata for specific node types
Node Catalog (436 nodes)
Get catalog statistics, fuzzy-search nodes by name, list trigger nodes, validate node types with close-match suggestions, and get node recommendations from natural-language task descriptions
Dual Usage: Works as both an MCP server (for Claude/OpenClaw clients) and a CLI tool for scripts and CI pipelines.
Provides tools for testing, scoring, and inspecting n8n workflows, including workflow lifecycle management (CRUD), graph editing, execution tracing, and node catalog exploration without exposing sensitive credentials.
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.
Related MCP server: mcp-n8n
Quick Start
1. Install
git clone https://github.com/souzix76/n8n-workflow-tester-safe.git
cd n8n-workflow-tester-safe
npm install && npm run build2. Configure
cp .env.example .env
# Edit .env with your n8n URL and API keyN8N_BASE_URL=http://127.0.0.1:5678
N8N_API_KEY=your_n8n_api_key_here
DEFAULT_TIMEOUT_MS=300003. Run
As MCP server (for Claude, OpenClaw, or any MCP client):
node dist/index.jsAs CLI (for scripts and CI):
node dist/cli.js --config ./workflows/example.jsonMCP 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 |
| Run a single payload test from a config file |
| Run a test and return evaluation score + issues |
| Run all payloads in a config, return per-payload scores |
Workflow Operations (5 tools)
Tool | Description |
| Create a new workflow from JSON |
| Replace an existing workflow by ID |
| Delete a workflow by ID |
| Append a node to an existing workflow |
| Create a connection between two nodes |
Introspection (5 tools)
Tool | Description |
| Compact summary: node count, names, types, disabled status |
| List all available node types from the n8n instance |
| Full schema/metadata for a specific node type |
| Recent executions, filterable by workflow and status |
| Full execution data by ID |
| Lightweight per-node trace — timing, errors, item counts |
Catalog (5 tools)
Tool | Description |
| Node/trigger/credential counts from imported catalog |
| Fuzzy search by name, optional trigger-only filter |
| All trigger nodes from the catalog |
| Check if a node type exists, get close matches |
| Natural-language task in, relevant nodes out |
Example Configs
The workflows/ directory includes ready-to-use test configs:
File | Trigger Mode | Payloads | Description |
| webhook | 2 | Basic webhook echo test |
| webhook | 3 | Telegram bot command handler |
| 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 configsDesign 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/sdkandzodNo 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
npxusage
Contributing
Fork the repo
Create a feature branch (
git checkout -b feat/my-feature)Commit changes (
git commit -m 'feat: add my feature')Push to branch (
git push origin feat/my-feature)Open a Pull Request
License
Available Tools
19 toolsadd_node_to_workflowC
Append a node JSON object to an existing workflow.
Inputs: workflowId (required), node (required).
connect_nodesC
Create a main connection between two nodes in an existing workflow.
Inputs: workflowId (required), source (required), target (required), sourceIndex, +1 more.
create_workflowC
Create a new n8n workflow from JSON.
Inputs: workflow (required).
delete_workflowC
Delete an n8n workflow by ID.
Inputs: workflowId (required).
evaluate_workflow_resultC
Run a single payload test and return evaluation score + issues.
Inputs: configPath (required), payloadName (required).
get_catalog_statsB
Return counts of catalogued nodes, triggers, and credentials from the imported n8n catalog.
Inputs: no named parameters.
get_executionC
Fetch full execution details by execution ID.
Inputs: executionId (required).
get_execution_traceC
Return a lightweight per-node trace summary for an execution.
Inputs: executionId (required).
get_node_typeC
Get full schema/details for a specific node type.
Inputs: nodeType (required).
get_workflow_summaryC
Fetch a workflow summary from n8n by workflow ID.
Inputs: workflowId (required).
list_executionsC
List recent executions, optionally filtered by workflowId and status.
Inputs: workflowId, limit, status.
list_node_typesB
List available node types from the connected n8n instance.
Inputs: no named parameters.
list_triggersB
List trigger nodes from the imported n8n catalog.
Inputs: no named parameters.
run_workflow_suiteC
Run all payloads in a workflow config and return per-payload results and scores.
Inputs: configPath (required).
search_nodesC
Search nodes from the imported n8n catalog by name.
Inputs: query (required), onlyTriggers.
suggest_nodes_for_taskC
Suggest relevant n8n nodes from the imported catalog for a natural-language task.
Inputs: task (required).
test_workflowC
Run a single payload test from a workflow config JSON file.
Inputs: configPath (required), payloadName (required).
update_workflowC
Replace an existing n8n workflow by ID with JSON.
Inputs: workflowId (required), workflow (required).
validate_node_typeC
Validate a node type against the imported n8n catalog and suggest close matches.
Inputs: nodeType (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 19 tools
Most tools have clear distinct purposes (e.g., list_* vs get_* vs create_*), but some overlap exists: list_triggers and list_node_types both list node-like entities; get_execution and get_execution_trace both fetch execution data though with different levels of detail; evaluate_workflow_result and test_workflow are similar, with the former adding evaluation. This could cause occasional misselection.
The naming follows a consistent pattern of verb_noun (e.g., list_triggers, connect_nodes, get_workflow_summary, create_workflow), with almost all using snake_case and standard CRUD verbs. The only minor deviation is the presence of both 'list_triggers' and 'list_node_types' which are similar but still follow the pattern, and 'connect_nodes' is descriptive. Overall, very consistent.
The server has 19 tools, which is at the upper edge of the 'well-scoped' range (3-15) but not excessive given the breadth of workflow management, catalog exploration, testing, and execution retrieval functionality. It feels slightly heavy but each tool addresses a specific need in the workflow lifecycle.
The tool set covers major workflow lifecycle operations (create, read, update, delete) along with comprehensive testing and execution analysis, and catalog exploration. Minor gaps exist: there is no explicit tool for 'disconnect_nodes' or 'remove_node', and no tool for listing all workflows (only get by ID), which could be a dead end for agents needing overview. But the core domain is well-covered.
Maintenance
Related MCP Connectors
Security scanner for n8n workflows + live MCP Trust-Check. 18 rules, OWASP mapped. Paid x402 API.
Open-source Zapier/n8n alternative as an MCP server: agents build, run and debug your workflows.
Static n8n workflow validator: workflow errors and repair suggestions. No execution.
n8n MCP — query your own n8n instance (BYO).
Related MCP Servers
- AlicenseBqualityDmaintenanceA comprehensive MCP server that provides full control over n8n automation workflows through natural language. It offers 43 tools for managing workflows, executions, credentials, and data tables, with safety features like write-mode protection and double-validated workflow creation.431MIT
- AlicenseNot gradedqualityDmaintenanceMCP server for n8n workflow automation, enabling management of workflows, executions, credentials, tags, users, and webhooks via an MCP-compatible client.MIT
- FlicenseBqualityDmaintenanceA full-power MCP server for n8n that enables AI agents to create, read, update, delete, and test workflows and credentials, including webhook testing, validation, and backup/versioning.319-
- AlicenseAqualityCmaintenanceA security-focused MCP server for self-hosted n8n Community Edition, providing 44 bounded tools to manage workflows, nodes, executions, credentials, tags, and more via the n8n Public API.4476 npm2MIT