n8n MCP Server
n8n MCP 服务器
MCP 服务器通过模型上下文协议 (MCP) 提供对 n8n 工作流、执行、凭证等的访问。这使得大型语言模型 (LLM) 能够以安全且标准化的方式与 n8n 实例进行交互。
安装
获取您的 n8n API 密钥
登录您的 n8n 实例
点击左下角的用户图标
前往“设置”
选择 API
点击“创建 API 密钥”
复制您的 API 密钥(您将无法再看到它)
安装 MCP 服务器
选项 1:从 npm 安装(推荐)
npm install -g @illuminaresolutions/n8n-mcp-server选项 2:从源安装
克隆存储库:
git clone https://github.com/illuminaresolutions/n8n-mcp-server.git cd n8n-mcp-server安装依赖项并构建:
npm install npm run build在后台启动服务器:
nohup npm start > n8n-mcp.log 2>&1 &要停止服务器:
pkill -f "node build/index.js"
注意:从 npm 安装时,服务器将作为n8n-mcp-server在您的 PATH 中可用。
Related MCP server: MCP Server for n8n Integration
配置
克劳德桌面
打开您的 Claude Desktop 配置:
~/Library/Application Support/Claude/claude_desktop_config.json添加 n8n 配置:
{ "mcpServers": { "n8n": { "command": "n8n-mcp-server", "env": { "N8N_HOST": "https://your-n8n-instance.com", "N8N_API_KEY": "your-api-key-here" } } } }
Cline(VS 代码)
安装服务器(按照上面的安装步骤)
打开 VS Code
从左侧边栏打开 Cline 扩展
点击窗格顶部的“MCP 服务器”图标
滚动到底部并点击“配置 MCP 服务器”
在打开的设置文件中添加:
{ "mcpServers": { "n8n": { "command": "n8n-mcp-server", "env": { "N8N_HOST": "https://your-n8n-instance.com", "N8N_API_KEY": "your-api-key-here" } } } }保存文件
确保 MCP 开关已启用(绿色)且状态指示灯为绿色
开始在 Cline 中使用 MCP 命令
圣人
即将推出!n8n MCP 服务器将通过以下方式访问:
Smithery.ai 市场
从 Claude Desktop 导入
目前,请使用 Claude Desktop 或 Cline。
验证
配置后:
重新开始你的法学硕士申请
询问:“列出我的 n8n 工作流程”
您应该会看到列出的工作流程
如果出现错误:
检查你的 n8n 实例是否正在运行
验证您的 API 密钥具有正确的权限
确保 N8N_HOST 没有尾部斜杠
特征
核心功能
列出和管理工作流程
查看工作流详细信息
执行工作流程
管理凭据
处理标签和执行
生成安全审计
管理工作流标签
企业功能
这些功能需要 n8n Enterprise 许可证:
项目管理
变量管理
高级用户管理
故障排除
常见问题
“客户端未初始化”
检查 N8N_HOST 和 N8N_API_KEY 是否设置正确
确保 n8n 实例可访问
验证 API 密钥权限
“需要许可证”
您正在尝试使用企业功能
升级到 n8n Enterprise 或仅使用核心功能
连接问题
验证 n8n 实例是否正在运行
检查 URL 协议 (http/https)
从 N8N_HOST 中删除尾部斜杠
安全最佳实践
API 密钥管理
使用必要的最少权限
定期轮换密钥
永远不要将密钥提交到版本控制
实例访问
使用 HTTPS 进行生产
启用 n8n 身份验证
保持 n8n 更新
支持
执照
Available Tools
33 toolsactivate-workflowC
Activate a workflow by ID. This will enable the workflow to run. IMPORTANT: Arguments must be provided as compact, single-line JSON without whitespace or newlines.
Inputs: clientId (required), id (required).
create-credentialB
Create a credential that can be used by nodes of the specified type. The credential type name can be found in the n8n UI when creating credentials (e.g., 'cloudflareApi', 'githubApi', 'slackOAuth2Api'). Use get-credential-schema first to see what fields are required for the credential type you want to create.
Inputs: clientId (required), name (required), type (required), data (required).
create-projectA
Create a new project in n8n. NOTE: Requires n8n Enterprise license with project management features enabled. IMPORTANT: Arguments must be provided as compact, single-line JSON without whitespace or newlines.
Inputs: clientId (required), name (required).
create-tagC
Create a new tag in your instance.
Inputs: clientId (required), name (required).
create-usersC
Create one or more users in your instance.
Inputs: clientId (required), users (required).
create-variableA
Create a new variable in n8n. NOTE: Requires n8n Enterprise license with variable management features enabled. Variables can be used across workflows to store and share data. IMPORTANT: Arguments must be provided as compact, single-line JSON without whitespace or newlines.
Inputs: clientId (required), key (required), value (required).
create-workflowB
Create a new workflow in n8n. Use to set up a new workflow with optional nodes and connections. IMPORTANT: 1) Arguments must be provided as compact, single-line JSON without whitespace or newlines. 2) Must provide full workflow structure including nodes and connections arrays, even if empty. The 'active' property should not be included as it is read-only.
Inputs: clientId (required), name (required), nodes, connections.
deactivate-workflowC
Deactivate a workflow by ID. This will prevent the workflow from running. IMPORTANT: Arguments must be provided as compact, single-line JSON without whitespace or newlines.
Inputs: clientId (required), id (required).
delete-credentialB
Delete a credential by ID. You must be the owner of the credentials.
Inputs: clientId (required), id (required).
delete-executionC
Delete a specific execution by ID.
Inputs: clientId (required), id (required).
delete-projectA
Delete a project by ID. NOTE: Requires n8n Enterprise license with project management features enabled. IMPORTANT: Arguments must be provided as compact, single-line JSON without whitespace or newlines.
Inputs: clientId (required), projectId (required).
delete-tagC
Delete a tag by ID.
Inputs: clientId (required), id (required).
delete-userC
Delete a user from your instance.
Inputs: clientId (required), idOrEmail (required).
delete-variableA
Delete a variable by ID. NOTE: Requires n8n Enterprise license with variable management features enabled. Use after list-variables to get the ID of the variable to delete. This action cannot be undone. IMPORTANT: Arguments must be provided as compact, single-line JSON without whitespace or newlines.
Inputs: clientId (required), id (required).
delete-workflowA
Delete a workflow by ID. This action cannot be undone. IMPORTANT: Arguments must be provided as compact, single-line JSON without whitespace or newlines.
Inputs: clientId (required), id (required).
generate-auditC
Generate a security audit for your n8n instance.
Inputs: clientId (required), daysAbandonedWorkflow, categories.
get-credential-schemaA
Show credential data schema for a specific credential type. The credential type name can be found in the n8n UI when creating credentials (e.g., 'cloudflareApi', 'githubApi', 'slackOAuth2Api'). This will show you what fields are required for creating credentials of this type.
Inputs: clientId (required), credentialTypeName (required).
get-executionC
Retrieve a specific execution by ID.
Inputs: clientId (required), id (required), includeData.
get-tagC
Retrieve a specific tag by ID.
Inputs: clientId (required), id (required).
get-userC
Get user by ID or email address.
Inputs: clientId (required), idOrEmail (required).
get-workflowB
Retrieve a workflow by ID. Use after list-workflows to get detailed information about a specific workflow. IMPORTANT: Arguments must be provided as compact, single-line JSON without whitespace or newlines.
Inputs: clientId (required), id (required).
get-workflow-tagsC
Get tags associated with a workflow.
Inputs: clientId (required), workflowId (required).
init-n8nA
Initialize connection to n8n instance. Use this tool whenever an n8n URL and API key are shared to establish the connection. IMPORTANT: Arguments must be provided as compact, single-line JSON without whitespace or newlines.
Inputs: url (required), apiKey (required).
list-executionsC
Retrieve all executions from your instance with optional filtering.
Inputs: clientId (required), includeData, status, workflowId, +1 more.
list-projectsA
List all projects from n8n. NOTE: Requires n8n Enterprise license with project management features enabled. IMPORTANT: Arguments must be provided as compact, single-line JSON without whitespace or newlines.
Inputs: clientId (required).
list-tagsC
Retrieve all tags from your instance.
Inputs: clientId (required), limit.
list-usersB
Retrieve all users from your instance. Only available for the instance owner.
Inputs: clientId (required).
list-variablesA
List all variables from n8n. NOTE: Requires n8n Enterprise license with variable management features enabled. Use after init-n8n to see available variables. IMPORTANT: Arguments must be provided as compact, single-line JSON without whitespace or newlines.
Inputs: clientId (required).
list-workflowsB
List all workflows from n8n. Use after init-n8n to see available workflows. IMPORTANT: Arguments must be provided as compact, single-line JSON without whitespace or newlines.
Inputs: clientId (required).
update-projectB
Update a project's name. NOTE: Requires n8n Enterprise license with project management features enabled. IMPORTANT: Arguments must be provided as compact, single-line JSON without whitespace or newlines.
Inputs: clientId (required), projectId (required), name (required).
update-tagC
Update a tag's name.
Inputs: clientId (required), id (required), name (required).
update-workflowC
Update an existing workflow in n8n. Use after get-workflow to modify a workflow's properties, nodes, or connections. IMPORTANT: Arguments must be provided as compact, single-line JSON without whitespace or newlines.
Inputs: clientId (required), id (required), workflow (required).
update-workflow-tagsC
Update tags associated with a workflow.
Inputs: clientId (required), workflowId (required), tagIds (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 33 tools
Most tools have distinct purposes targeting specific resources like workflows, credentials, projects, tags, users, variables, and executions. However, some tools like 'create-users' and 'delete-user' (singular vs plural) could cause minor confusion, and 'get-workflow-tags' vs 'update-workflow-tags' are closely related but still distinguishable.
Tool names follow a highly consistent verb-noun pattern with hyphens (e.g., create-workflow, list-executions, delete-credential). All tools adhere to this convention, making them predictable and easy to parse, with no mixing of styles like camelCase or snake_case.
With 33 tools, the count is borderline high for an MCP server, as it may feel heavy and overwhelming for agents. While n8n is a complex automation platform, the tool set could potentially be streamlined or grouped to reduce cognitive load, though it does cover a broad domain.
The tool set provides comprehensive CRUD/lifecycle coverage for all key n8n resources: workflows (activate, deactivate, create, get, update, delete, list), credentials (create, delete, get-schema), projects (create, delete, list, update), tags (create, delete, get, list, update), users (create, delete, get, list), variables (create, delete, list), and executions (delete, get, list). There are no obvious gaps, and tools like init-n8n and generate-audit add useful functionality.
Maintenance
Related MCP Connectors
Open-source Zapier/n8n alternative as an MCP server: agents build, run and debug your workflows.
MCP server for secureFlows: token-free URL builders and integration-linting tools for AI agents.
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
MCP server for your apps' tools and custom tools, plus hosted AI agents and approval-gated workflows
Related MCP Servers
- AlicenseCqualityDmaintenanceA Model Context Protocol (MCP) server for programmatically creating and managing n8n workflows.118MIT
- FlicenseNot gradedqualityNot gradedmaintenanceA Model Context Protocol server that enables AI agents to interact with n8n workflows and automation tools through a standardized interface, allowing execution of workflows and access to n8n functions.-
- FlicenseNot gradedqualityDmaintenanceA Model Context Protocol (MCP) server that generates production-ready n8n workflows from natural language prompts. Transform simple descriptions into fully validated, deployable automation workflows using AI-powered code generation.1-
- AlicenseBqualityCmaintenanceA Model Context Protocol server that enables AI assistants to interact with N8N workflows, executions, and automation capabilities.12MIT