n8n MCP Server
n8n 的 MCP 服务器
该项目是 n8n 的主控制程序 (MCP) 服务器,为您的 n8n 自动化项目提供工作流验证工具和最佳实践。
特征
工作流程验证:检查您的工作流程是否遵循最佳实践
命名约定
错误处理
安全
表现
文档
NextJS 集成:生成 n8n 工作流程与 NextJS 应用程序中的集成
自动生成API路由
创建 OpenAPI/Swagger 文档
TypeScript 类型生成
API 客户端,方便集成
工作流管理:与您的 n8n 工作流交互(列出、检索、创建、更新、删除、导出、导入)
n8n API :直接访问 n8n API 进行高级操作
工作流模板:使用现成的模板来适应不同的用例,包括谷歌日历
Related MCP server: mcp-n8n-builder
先决条件
Node.js(v16 或更高版本)
pnpm(v7 或更高版本)
n8n 实例(本地或远程,例如 n8n.bienquoi.com 上的 Cloudron 实例)
设施
克隆此存储库或导航到项目文件夹
安装依赖项:
pnpm install配置环境变量:
cp .env.example .env使用您的 n8n API 连接信息编辑.env文件。
使用
项目建设
pnpm build服务器启动
pnpm start可以通过http://localhost:3000 (或 .env 文件中指定的端口)访问 MCP 服务器。
与 Claude Desktop 一起使用
要将此 MCP 服务器与 Claude Desktop 一起使用,您需要配置%APPDATA%/Claude/文件夹中的claude_desktop_config.json文件:
{
"mcpServers": {
"n8n-mcp-server": {
"command": "node",
"args": ["/chemin/absolu/vers/mcp-n8n-server/dist/server.js"]
}
}
}项目结构
mcp-n8n-server/
├── src/ # Code source
│ ├── tools/ # Outils MCP
│ │ ├── N8nApiTool.ts # Outil pour interagir avec l'API n8n
│ │ ├── WorkflowManagerTool.ts # Outil pour gérer les workflows
│ │ ├── NextJSIntegrationTool.ts # Outil pour générer des intégrations NextJS
│ │ ├── WorkflowValidatorTool.ts # Outil pour valider les workflows
│ │ └── ...
│ ├── validators/ # Validateurs de workflows
│ │ ├── naming.js # Validateur de conventions de nommage
│ │ ├── errorHandling.js # Validateur de gestion des erreurs
│ │ ├── security.js # Validateur de sécurité
│ │ ├── performance.js # Validateur de performance
│ │ └── documentation.js # Validateur de documentation
│ ├── resources/ # Ressources partagées
│ └── server.ts # Point d'entrée du serveur
├── dist/ # Code compilé
├── public/ # Fichiers statiques
├── output/ # Répertoire pour les sorties des outils
├── .env.example # Exemple de fichier de configuration
└── README.md # Documentation可用工具
1. N8nApi工具
直接与 n8n API 交互。
// Exemple d'utilisation
{
"method": "GET",
"endpoint": "/workflows",
"params": "?active=true"
}2. 工作流管理器工具
管理 n8n 工作流(列出、检索、创建、更新、删除、导出、导入)。
// Exemple d'utilisation
{
"action": "list",
"tags": "production"
}3. NextJS集成工具
为 n8n 工作流生成 NextJS 集成。
// Exemple d'utilisation
{
"workflowId": "123",
"outputDir": "./my-nextjs-app/pages/api",
"generateTypes": true,
"generateOpenAPI": true
}4. 工作流验证工具
根据各种标准验证 n8n 工作流程。
// Exemple d'utilisation
{
"workflow": "{...}",
"validators": ["naming", "errorHandling", "security"],
"strictness": "high"
}贡献
欢迎投稿!请随时提出问题或请求。
执照
麻省理工学院
This server cannot be deployed
Maintenance
Related MCP Connectors
Open-source Zapier/n8n alternative as an MCP server: agents build, run and debug your workflows.
Security scanner for n8n workflows + live MCP Trust-Check. 18 rules, OWASP mapped. Paid x402 API.
MCP server for your apps' tools and custom tools, plus hosted AI agents and approval-gated workflows
MCP server for secureFlows: token-free URL builders and integration-linting tools for AI agents.
Related MCP Servers
- AlicenseCqualityDmaintenanceA Model Context Protocol (MCP) server for programmatically creating and managing n8n workflows.118MIT
- AlicenseAqualityDmaintenance🪄 MCP server for programmatic creation and management of n8n workflows. Enables AI assistants to build, modify, and manage workflows without direct user intervention through a comprehensive set of tools and resources for interacting with n8n's REST API.1039 npm86MIT
- AlicenseNot gradedqualityDmaintenanceAn MCP server that empowers AI assistants to build, validate, and manage n8n workflows by providing structured access to documentation for over 1,200 nodes and thousands of templates. It enables deep integration with n8n instances for automated workflow orchestration and management through natural language.48,200 npm1MIT
- 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