n8n-mcp
Applicationczlonkowski/n8n-mcp
MCP server enabling AI assistants to build n8n workflows.
Overview
n8n-MCP is a Model Context Protocol server that bridges n8n's workflow automation platform with AI models, providing comprehensive access to 1650+ n8n nodes, templates, and documentation. It enables AI assistants like Claude to understand and create n8n workflows efficiently.
README Preview
# n8n-MCP\n\n[](https://opensource.org/licenses/MIT)\n[](https://github.com/czlonkowski/n8n-mcp)\n[](https://www.npmjs.com/package/n8n-mcp)\n[](https://codecov.io/gh/czlonkowski/n8n-mcp)\n[](https://github.com/czlonkowski/n8n-mcp/actions)\n[](https://github.com/n8n-io/n8n)\n[](https://github.com/czlonkowski/n8n-mcp/pkgs/container/n8n-mcp)\n[](https://railway.com/deploy/n8n-mcp?referralCode=n8n-mcp)\n\nA Model Context Protocol (MCP) server that provides AI assistants with comprehensive access to n8n node documentation, properties, and operations. Deploy in minutes to give Claude and other AI assistants deep knowledge about n8n's 1,650 workflow automation nodes (820 core + 830 community).\n\n## Overview\n\nn8n-MCP serves as a bridge between n8n's workflow automation platform and AI models, enabling them to understand and work with n8n nodes effectively. It provides structured access to:\n\n- **1,650 n8n nodes** - 820 core nodes + 830 community nodes (741 verified)\n- **Node properties** - 99% coverage with detailed schemas\n- **Node operations** - 63.6% coverage of available actions\n- **Documentation** - 87% coverage from official n8n docs (including AI nodes)\n- **AI tools** - 265 AI-capable tool variants detected with full documentation\n- **Real-world examples** - 156 ranked configurations extracted from popular templates\n- **Template library** - 2,352 workflow templates with 99.96% AI metadata coverage\n- **Community nodes** - Search verified community integrations with `source` filter\n\n## Support This Project\n\n\n \n \n \n\n\n**n8n-mcp** started as a personal tool but now helps tens of thousands of developers automate their workflows efficiently. Maintaining and developing this project competes with my paid work. Your sponsorship helps me dedicate focused time to new features, respond quickly to issues, keep documentation up-to-date, and ensure compatibility with latest n8n releases. **[Become a sponsor](https://github.com/sponsors/czlonkowski)**\n\n##
FAQ (5)
TroubleshootingHow do I disable n8n MCP Apps result cards and fix the 'Couldn't open n8n-mcp' widget errors?
Upgrade to n8n MCP 2.92.0 or later. To disable UI cards for the entire server, set N8N_MCP_DISABLE_UI_APPS=true before starting the process; only the exact value true is accepted. This applies to both stdio and HTTP deployments and overrides any per-request uiAppsEnabled: true. For per-request control, set InstanceContext.uiAppsEnabled to false. The server then stops advertising _meta.ui, _meta['ui/resourceUri'], _meta['n8n-mcp/toolName'], and ui://n8n-mcp/* resources, while all tools and text results remain available. Existing resources/read requests for ui:// URIs continue to succeed so cached clients do not generate another error card. Start a new ChatGPT/MCP session if the client has cached the old tool-to-card mapping.
TroubleshootingHow do I fix validate_node returning "Code cannot be empty" for pythonNative Python Code nodes in n8n-mcp?
The validator only checks language === 'python', but n8n 2.x uses pythonNative, so it incorrectly reads the jsCode field instead of pythonCode. Fix src/services/config-validator.ts in validateCode by normalizing the language:
const language = config.language === 'pythonNative' ? 'python' : config.language;
const codeField = language === 'python' ? 'pythonCode' : 'jsCode';
Alternatively, use:
const codeField = ['python', 'pythonNative'].includes(config.language)
? 'pythonCode'
: 'jsCode';
As a temporary workaround, normalize pythonNative to python before calling validate_node. Add a validate_node regression test using language: "pythonNative" with non-empty pythonCode.
TroubleshootingWhy does $jmespath() return null in n8n expressions even when the node succeeds?
n8n intentionally swallows JMESPath parse errors inside {{ }} expressions, so an invalid query resolves to null while the node still reports success. In Filter/IF nodes, that null makes every item fail the condition.
Fix the JMESPath syntax:
- Wrap numeric literals in backticks:
{{ $jmespath($json, "customers[?revenue > 100000].name") }}
- Use single quotes for string literals; double quotes are treated as field identifiers:
{{ $jmespath($json, "customers[?country=='PL'].name") }}
- Use JMESPath logical operators && and ||, not and/or:
{{ $jmespath($json, "customers[?country=='PL' && active].name") }}
- Use ==, not a single =.
- Keep the argument order as object first, query second:
$jmespath($json, "customers[].name")
Previously, JMESPath validation only ran inside Code nodes. If you use n8n-mcp's validate_workflow, upgrade to v2.87.0 or later; it statically checks $jmespath() calls inside expressions and reports these errors before runtime.
TroubleshootingWhy does the n8n Python Code node fail with NameError for _input or _json and block json/datetime imports?
n8n 2.x uses the native Python runtime (language: "pythonNative"), not the removed Pyodide "Python (Beta)" runtime. Update Code node scripts as follows:
1. Replace _input.all() with _items in All Items mode:
return [{"json": item} for item in _items]2. In Each Item mode, use
_item instead of _json:return {"json": _item}3. Access data with dictionary syntax only.
_input, _json, _node, _now, _today, and _jmespath are unavailable.4. Do not use
import json, import datetime, or other stdlib imports unless your self-hosted task runner explicitly allowlists them. n8n Cloud allows no imports by default.5. Avoid
class, type(), getattr(), hasattr(), dunder access, and global; use nonlocal where needed.6. Return values must match the mode: All Items accepts a list of
{"json": ...} objects, a list of plain dicts, or one dict; Each Item accepts one dict. Returning None drops an item, while returning a list errors.
If self-hosted Docker reports Python runner unavailable: Python 3 is missing from this system, deploy the n8nio/runners sidecar; otherwise Python Code nodes cannot run.
TroubleshootingHow to fix n8n 403 "insufficient_api_key_scope" or "insufficient_permissions" when updating a published workflow?
In n8n 2.39+, PUT /workflows/{id} saves changes as a draft but returns 403 when the caller cannot publish. The published workflow stays live. Grant the API key the workflow:activate scope and ensure the user has workflow:publish permission on that workflow, then retry the update. If using n8n-mcp, upgrade to v2.87.0 or later; these responses are reported as PUBLISH_FORBIDDEN instead of the previous misleading partial-update message. With n8n_update_full_workflow, the draft is retained; with n8n_update_partial_workflow, the draft is rolled back. Retrying with the same restricted credentials will create another draft and will not publish.