n8n MCP Server
n8n MCP サーバー
AI アシスタントが自然言語を通じて n8n ワークフローと対話できるようにするモデル コンテキスト プロトコル (MCP) サーバー。
概要
このMCPサーバーは、AIアシスタントがn8nのワークフローと実行を管理するためのツールとリソースを提供します。アシスタントは以下のことが可能になります。
ワークフローの一覧表示、作成、更新、削除
ワークフローを有効化および無効化する
ワークフローを実行し、そのステータスを監視する
ワークフロー情報と実行統計にアクセスする
Related MCP server: n8n MCP Server
インストール
前提条件
Node.js 18以降
APIアクセスが有効になっているn8nインスタンス
npmからインストール
npm install -g n8n-mcp-serverソースからインストール
# 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のインストール
Docker を使用してサーバーを実行することもできます。
# 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-server構成
.env.exampleテンプレートとして使用して、サーバーを実行するディレクトリに.envファイルを作成します。
cp .env.example .env次の環境変数を設定します。
変数 | 説明 | 例 |
|
|
|
| n8nで認証するためのAPIキー |
|
| Webhook 認証のユーザー名 (Webhook を使用している場合) |
|
| Webhook認証用のパスワード |
|
| デバッグログを有効にする(オプション) |
|
n8n APIキーの生成
ブラウザでn8nインスタンスを開く
設定 > API > APIキーに移動します
適切な権限を持つ新しいAPIキーを作成する
キーを
.envファイルにコピーします
使用法
サーバーの実行
インストールディレクトリから:
n8n-mcp-serverまたはグローバルにインストールされている場合:
n8n-mcp-serverAIアシスタントとの統合
サーバーをビルド( npm run build )した後、AIアシスタント(Claude拡張機能付きのVS CodeやClaudeデスクトップアプリなど)を実行して動作させるには、設定が必要です。通常はJSON設定ファイルを編集する必要があります。
構成例 (例: VS Code のsettings.jsonまたは 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
}
}要点:
/path/to/your/cloned/n8n-mcp-server/リポジトリをクローンして構築した実際の絶対パスに置き換えます。オペレーティング システムに適したパス区切り文字を使用します (macOS/Linux の場合はスラッシュ
/、Windows の場合は二重のバックスラッシュ\\)。正しい
N8N_API_URL(/api/v1を含む) とN8N_API_KEYを指定していることを確認してください。アシスタントが
build/index.jsファイルを実行する前に、サーバーをビルドする必要があります (npm run build)。
利用可能なツール
サーバーは次のツールを提供します。
Webhookの使用
このMCPサーバーは、n8nウェブフックを介したワークフローの実行をサポートしています。この機能を使用するには、以下の手順を実行してください。
n8n で Webhook トリガーのワークフローを作成します。
Webhook ノードに基本認証を設定します。
ワークフロー名のみを渡して、
run_webhookツールを使用してワークフローをトリガーします。
例:
const result = await useRunWebhook({
workflowName: "hello-world", // Will call <n8n-url>/webhook/hello-world
data: {
prompt: "Hello from AI assistant!"
}
});Webhook 認証は、 N8N_WEBHOOK_USERNAMEおよびN8N_WEBHOOK_PASSWORD環境変数を使用して自動的に処理されます。
ワークフロー管理
workflow_list: すべてのワークフローを一覧表示するworkflow_get: 特定のワークフローの詳細を取得するworkflow_create: 新しいワークフローを作成するworkflow_update: 既存のワークフローを更新するworkflow_delete: ワークフローを削除するworkflow_activate: ワークフローをアクティブ化するworkflow_deactivate: ワークフローを非アクティブ化する
実行管理
execution_run: API経由でワークフローを実行するrun_webhook: Webhook経由でワークフローを実行するexecution_get: 特定の実行の詳細を取得するexecution_list: ワークフローの実行を一覧表示するexecution_stop: 実行中の実行を停止する
リソース
サーバーは次のリソースを提供します。
n8n://workflows/list: すべてのワークフローのリストn8n://workflow/{id}: 特定のワークフローの詳細n8n://executions/{workflowId}: ワークフローの実行リストn8n://execution/{id}: 特定の実行の詳細
発達
建物
npm run build開発モードで実行
npm run devテスト
npm testリンティング
npm run lintライセンス
マサチューセッツ工科大学
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