n8n Preflight
Statically analyzes exported n8n workflow JSON for runtime reliability issues, accidental secret or credential exposure, and Creator Hub template guidelines; also summarizes workflows, lists lint rules, and can write a sanitized copy.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@n8n Preflight lint my-workflow.json for secrets and runtime errors before I share it"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
n8n Preflight (MCP server)
Check an exported n8n workflow before you import it, share it, or submit it as a template. Ask Claude "is this workflow safe to share?" or "why does this workflow fail?" and it can read the JSON file and get a list of concrete problems, each with a fix.
Offline and read-only by default. It reads
.jsonfiles from one folder. It never runs a workflow, never connects to your n8n instance, and makes no network requests. No API key needed.Finds failures that only show up at run time:
$('node name')typos, a webhook waiting for a Respond node that is missing,{{ }}in a field that is not in expression mode, an unconnected Loop Over Items output, HTTP calls with no retry.Finds what you should not share: literal API keys and Bearer tokens, credential names and IDs, pinned execution data, email addresses, spreadsheet and channel IDs, the instance ID.
Checks n8n Creator Hub template basics: overview sticky note with
### How it works/### Setup(100 to 300 words), section notes, default node names (n8n guideline).
Not affiliated with n8n GmbH. "n8n" is used only to say which file format this tool reads.
Tools
Tool | Type | What it does |
| read | Findings for one workflow file or inline JSON. |
| read | Triggers, node count, outside systems the workflow calls, AI nodes, credential types (types only), disabled nodes |
| read | Every rule with why it matters and how to fix it |
| write | Not registered unless |
Related MCP server: workflow-lint
Rules
ID | Severity | Checks |
N8P001 | error | Expression points at a node that does not exist (suggests the right case) |
N8P002 | error | Webhook set to respond "Using Respond to Webhook Node" but there is none |
N8P003 | warning | Respond to Webhook node but no webhook uses that mode |
N8P004 | warning |
|
N8P005 | warning | HTTP Request with Retry On Fail off and On Error = stop |
N8P006 | info | No error workflow set |
N8P007 | warning | Node with no incoming connection (not a trigger or AI sub-node) |
N8P008 | warning | Loop Over Items (v3) with the |
N8P009 | info | Disabled node |
N8P101 | error | Literal secret in a parameter, code or note (OpenAI, Anthropic, Google, Slack, GitHub, Stripe, AWS keys, JWT, Bearer, basic-auth URL, key in URL, Authorization header) |
N8P102 | warning | Credential name and ID included |
N8P103 | warning | Pinned execution data included |
N8P104 | warning | Email address or fixed spreadsheet / chat / channel / folder ID |
N8P105 | info |
|
N8P201 | warning | No overview sticky note ( |
N8P202 | warning | Four or more nodes and no section notes |
N8P203 | info | Default node name such as |
N8P204 | warning | Overview note outside 100 to 300 words |
These are static checks. A clean result does not prove a workflow works; only running it with real input does.
Install
Requires Python 3.10+ and uv (or pip).
uvx mcp-n8n-preflight # from PyPI
docker run -i --rm -v "$PWD:/work:ro" ghcr.io/haechiwood/mcp-n8n-preflight:0.1.1 # Docker, reads /workOr pip install mcp-n8n-preflight.
Claude Desktop
Settings > Developer > Edit Config, then add to claude_desktop_config.json:
{
"mcpServers": {
"n8n-preflight": {
"command": "uvx",
"args": ["mcp-n8n-preflight"],
"env": {
"N8N_PREFLIGHT_ROOT": "/path/to/your/n8n-exports"
}
}
}
}Restart Claude Desktop. Use an absolute path for N8N_PREFLIGHT_ROOT. Claude Desktop may not find uvx
if it is not on its PATH; then put the full path from which uvx in command.
Claude Code
claude mcp add n8n-preflight -e N8N_PREFLIGHT_ROOT="$PWD" -- uvx mcp-n8n-preflight
claude mcp list # should show: n8n-preflight ... ConnectedTo allow the write tool, add -e N8N_PREFLIGHT_ENABLE_WRITE=true.
Without an MCP client (CI, pre-commit)
uvx --from mcp-n8n-preflight n8n-preflight lint my-workflow.json --profile share
# exit 0 = no errors, 1 = errors found, 2 = could not read the fileExample prompts
"Lint
invoice-sync.jsonand explain the errors in plain English.""Is
lead-intake.jsonsafe to post in the n8n forum? Use the share profile.""Check
my-template.jsonagainst the template profile before I submit it to the Creator Hub."
Configuration
Variable | Default | Notes |
| current working directory | The only folder the server reads from and writes copies into. Paths outside it (including |
| off |
|
No API keys are used. If you fork this to call the n8n API, read keys from environment variables only, never from tool arguments, and keep them out of logs and error messages.
Security notes
Read-only by default. The write tool does not exist unless you turn it on, and even then it needs a preview call and a second call with
confirm=true. The server enforces this; client-side approval prompts are a second layer, not a replacement. It never overwrites a file.Folder sandbox. Every path is resolved and must stay inside
N8N_PREFLIGHT_ROOT.No network, no execution. The server only parses JSON. It does not run Code node JavaScript.
Secrets are masked. Findings show at most the first 4 characters of a matched secret or email.
Prompt injection. Node names, sticky notes and parameter text come from whoever built the workflow. The server tells the client to treat them as data, but a model can still be misled by a crafted file. Review findings before acting on them, and keep the write tool off unless you need it.
write_sanitized_copydoes not remove emails or IDs inside text. Runlint_workflowon the copy and replace what is left by hand.
Tests
uv venv && uv pip install -e ".[test]"
pytest -q # 9 unit tests (rules, masking, sanitizer)
python tests/run_inspector.py # 20 end-to-end cases through the official MCP Inspector CLILatest run (2026-11-25, Python 3.11, mcp 2.3.0, MCP Inspector CLI 2.16.0): 9/9 pytest, 20/20 Inspector cases
(tool list with and without the write tool, planted failures found, secrets masked, path traversal refused,
preview-then-confirm, no overwrite). Logs: tests/logs/summary.md.txt,
tests/logs/inspector-stdio.txt. Claude Code 2.1.332 connected over stdio
(local path and uvx --from), see tests/logs/claude-code-connect.txt.
Not tested: Claude Desktop, Windows.
Test fixtures build their fake secrets at run time, so this repository holds no secret-looking strings.
How this was built
AI coding agents wrote the code, tests and this README. Every release must pass the test suite above before it is published, and the maintainer is accountable for it.
License
MIT. See LICENSE.
Need a custom MCP server for your API? Hire me on Fiverr: https://www.fiverr.com/haechiwood/build-a-custom-mcp-server-that-connects-your-api-to-claude-and-ai-agents?utm_source=github&utm_medium=readme&utm_campaign=mcp-n8n-preflight
Available Tools
3 toolslint_workflowARead-only
Check an exported n8n workflow for run-time failure patterns and things to remove before sharing.
profile: 'run' = reliability only; 'share' = reliability + secrets/personal data (default);
'template' = share + n8n Creator Hub template checks (sticky notes, node names).
Secret values are masked in the output.
Inputs: path, profile, workflow_json. Returns: object
list_rulesBRead-only
List the checks this server runs, with why each matters and how to fix it.
Inputs: category. Returns: object
summarize_workflowBRead-only
Describe an n8n workflow: triggers, node count, outside systems it calls, AI nodes, credential types.
Inputs: path, workflow_json. Returns: object
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 3 tools
lint_workflow, list_rules, and summarize_workflow have clearly distinct roles: checking a workflow, documenting the checks, and describing workflow structure. Lint and summarize both inspect the same workflow, but their outputs and purposes are sufficiently separated.
All tool names use a consistent snake_case verb_noun pattern: lint_workflow, list_rules, summarize_workflow. No mixed conventions or vague naming.
Three tools are well matched to a narrow preflight server: check, explain rules, and summarize. Each tool earns its place, and lint_workflow's profiles cover multiple check modes without adding redundant tools.
The surface covers inspection, rule discovery, and workflow summarization, which fits the preflight purpose. A minor gap is the lack of a remediation/sanitization tool that produces a cleaned or share-safe workflow, though lint output identifies what to remove.
Maintenance
Related MCP Connectors
Static n8n workflow validator: workflow errors and repair suggestions. No execution.
Build, check and fix n8n workflows from Claude, Cursor or ChatGPT. Built on 1,100+ real n8n node definitions and curated templates, with a validator that repairs common mistakes (wrong node types, missing settings) and returns JSON ready to import into n8n. Sign in with a free gydmation.com account; nothing to install.
Audit GitHub Actions workflows for script injection, unpinned actions and missing permissions.
Security scanner for n8n workflows + live MCP Trust-Check. 18 rules, OWASP mapped. Paid x402 API.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceStatically analyzes exported n8n automation workflows for security issues and returns structured findings.MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to lint and format n8n workflow JSON over MCP, reporting issues with line-level detail and applying safe fixes.1MIT
- AlicenseAqualityCmaintenanceLints n8n workflow exports and returns machine-readable findings with per-rule fixes, helping agents and reviewers catch reliability gaps such as missing error workflows, retries that swallow errors, unauthenticated webhooks, and hardcoded secrets without sending data anywhere.3MIT
- AlicenseNot gradedqualityBmaintenanceEnables safe, credential-bounded inspection and diagnostics of n8n workflows through validation, health scoring, execution trace analysis, failure classification, regression detection, node suggestions, and version checks. Supports read-only and external modes so operators and agents can assess workflow health without credential management or destructive auto-repair.1MIT