n8n MCP Server
n8n MCP Server
Ein Model Context Protocol (MCP)-Server, der es KI-Assistenten ermöglicht, über natürliche Sprache mit n8n-Workflows zu interagieren.
Überblick
Dieser MCP-Server bietet KI-Assistenten Tools und Ressourcen zur Verwaltung von n8n-Workflows und -Ausführungen. Er ermöglicht Assistenten:
Auflisten, Erstellen, Aktualisieren und Löschen von Workflows
Aktivieren und Deaktivieren von Workflows
Ausführen von Workflows und Überwachen ihres Status
Zugriff auf Workflow-Informationen und Ausführungsstatistiken
Related MCP server: n8n MCP Server
Installation
Voraussetzungen
Node.js 18 oder höher
n8n-Instanz mit aktiviertem API-Zugriff
Von npm installieren
npm install -g n8n-mcp-serverVon der Quelle installieren
# Clone the repository
git clone https://github.com/leonardsellem/n8n-mcp-server.git
cd n8n-mcp-server
# Install dependencies
npm install
# Build the project
npm run build
# Optional: Install globally
npm install -g .Docker-Installation
Sie können den Server auch mit Docker ausführen:
# Pull the image
docker pull leonardsellem/n8n-mcp-server
# Run the container with your n8n API configuration
docker run -e N8N_API_URL=http://your-n8n:5678/api/v1 \
-e N8N_API_KEY=your_n8n_api_key \
-e N8N_WEBHOOK_USERNAME=username \
-e N8N_WEBHOOK_PASSWORD=password \
leonardsellem/n8n-mcp-serverKonfiguration
Erstellen Sie eine .env Datei in dem Verzeichnis, in dem Sie den Server ausführen, und verwenden Sie .env.example als Vorlage:
cp .env.example .envKonfigurieren Sie die folgenden Umgebungsvariablen:
Variable | Beschreibung | Beispiel |
| Vollständige URL der n8n-API, einschließlich |
|
| API-Schlüssel zur Authentifizierung mit n8n |
|
| Benutzername für die Webhook-Authentifizierung (bei Verwendung von Webhooks) |
|
| Passwort für die Webhook-Authentifizierung |
|
| Debug-Protokollierung aktivieren (optional) |
|
Generieren eines n8n-API-Schlüssels
Öffnen Sie Ihre n8n-Instanz in einem Browser
Gehen Sie zu Einstellungen > API > API-Schlüssel
Erstellen Sie einen neuen API-Schlüssel mit entsprechenden Berechtigungen
Kopieren Sie den Schlüssel in Ihre
.envDatei
Verwendung
Ausführen des Servers
Aus dem Installationsverzeichnis:
n8n-mcp-serverOder bei globaler Installation:
n8n-mcp-serverIntegration mit KI-Assistenten
Nachdem Sie den Server erstellt haben ( npm run build ), müssen Sie Ihren KI-Assistenten (z. B. VS Code mit der Claude-Erweiterung oder die Claude Desktop-App) für die Ausführung konfigurieren. Dies beinhaltet normalerweise die Bearbeitung einer JSON-Konfigurationsdatei.
Beispielkonfiguration (z. B. in VS Code settings.json oder Claude Desktop claude_desktop_config.json ):
{
"mcpServers": {
// Give your server a unique name
"n8n-local": {
// Use 'node' to execute the built JavaScript file
"command": "node",
// Provide the *absolute path* to the built index.js file
"args": [
"/path/to/your/cloned/n8n-mcp-server/build/index.js"
// On Windows, use double backslashes:
// "C:\\path\\to\\your\\cloned\\n8n-mcp-server\\build\\index.js"
],
// Environment variables needed by the server
"env": {
"N8N_API_URL": "http://your-n8n-instance:5678/api/v1", // Replace with your n8n URL
"N8N_API_KEY": "YOUR_N8N_API_KEY", // Replace with your key
// Add webhook credentials only if you plan to use webhook tools
// "N8N_WEBHOOK_USERNAME": "your_webhook_user",
// "N8N_WEBHOOK_PASSWORD": "your_webhook_password"
},
// Ensure the server is enabled
"disabled": false,
// Default autoApprove settings
"autoApprove": []
}
// ... other servers might be configured here
}
}Wichtige Punkte:
Ersetzen Sie
/path/to/your/cloned/n8n-mcp-server/durch den tatsächlichen absoluten Pfad, unter dem Sie das Repository geklont und erstellt haben.Verwenden Sie das richtige Pfadtrennzeichen für Ihr Betriebssystem (Schrägstriche
/für macOS/Linux, doppelte Backslashes\\für Windows).Stellen Sie sicher, dass Sie die richtige
N8N_API_URL(einschließlich/api/v1) undN8N_API_KEYangeben.Der Server muss erstellt werden (
npm run build), bevor der Assistent die Dateibuild/index.jsausführen kann.
Verfügbare Tools
Der Server stellt die folgenden Tools bereit:
Verwenden von Webhooks
Dieser MCP-Server unterstützt die Ausführung von Workflows über n8n-Webhooks. So nutzen Sie diese Funktion:
Erstellen Sie einen durch Webhook ausgelösten Workflow in n8n.
Richten Sie die Basisauthentifizierung auf Ihrem Webhook-Knoten ein.
Verwenden Sie das Tool
run_webhook, um den Workflow auszulösen, und übergeben Sie nur den Workflow-Namen.
Beispiel:
const result = await useRunWebhook({
workflowName: "hello-world", // Will call <n8n-url>/webhook/hello-world
data: {
prompt: "Hello from AI assistant!"
}
});Die Webhook-Authentifizierung wird automatisch mithilfe der Umgebungsvariablen N8N_WEBHOOK_USERNAME und N8N_WEBHOOK_PASSWORD durchgeführt.
Workflow-Management
workflow_list: Listet alle Workflows aufworkflow_get: Details zu einem bestimmten Workflow abrufenworkflow_create: Einen neuen Workflow erstellenworkflow_update: Aktualisieren Sie einen vorhandenen Workflowworkflow_delete: Einen Workflow löschenworkflow_activate: Aktiviert einen Workflowworkflow_deactivate: Einen Workflow deaktivieren
Ausführungsmanagement
execution_run: Ausführen eines Workflows über die APIrun_webhook: Führen Sie einen Workflow über einen Webhook ausexecution_get: Details einer bestimmten Ausführung abrufenexecution_list: Listet Ausführungen für einen Workflow aufexecution_stop: Stoppt eine laufende Ausführung
Ressourcen
Der Server stellt die folgenden Ressourcen bereit:
n8n://workflows/list: Liste aller Workflowsn8n://workflow/{id}: Details eines bestimmten Workflowsn8n://executions/{workflowId}: Liste der Ausführungen für einen Workflown8n://execution/{id}: Details einer bestimmten Ausführung
Entwicklung
Gebäude
npm run buildAusführen im Entwicklungsmodus
npm run devTesten
npm testFusseln
npm run lintLizenz
MIT
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
A Model Context Protocol server for Wix AI tools
Open-source Zapier/n8n alternative as an MCP server: agents build, run and debug your workflows.
Model Context Protocol server for the Apideck Unified API. Connect any MCP-compatible agent framework to 100+ accounting systems, HRIS platforms, file storage providers, and more through one integration. More information https://www.apideck.com/mcp-server
Related MCP Servers
- 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.-
- AlicenseNot gradedqualityDmaintenanceA Model Context Protocol server that allows AI agents to interact with n8n workflows through natural language, enabling workflow management and execution via SSE connections.7MIT
- AlicenseAqualityAmaintenanceA Model Context Protocol server that provides AI assistants with comprehensive access to n8n node documentation, properties, and operations for effective workflow automation.2947,555 npm23,286MIT
- AlicenseNot gradedqualityDmaintenanceA Model Context Protocol server that provides AI assistants with comprehensive access to n8n node documentation, properties, and operations, enabling them to understand and work with n8n's 525+ workflow automation nodes.32MIT