Skip to main content
Glama
n8n-manage-mcp

n8n-manage-mcp

by boy392112000

n8n-manage-mcp

Python 3.10+ MCP License: MIT

一個功能完整的 n8n MCP Server,提供 n8n 工作流程的完整管理能力,包含 CRUD 操作。

✨ 功能

查詢功能

工具

說明

search_workflows

搜尋/列出工作流程

get_workflow_details

取得工作流程完整定義

執行功能

工具

說明

execute_workflow

執行工作流程

get_executions

取得執行歷史

get_execution_details

取得執行詳細資料

CRUD 功能

工具

說明

create_workflow

建立新工作流程

update_workflow

更新工作流程

delete_workflow

刪除工作流程

activate_workflow

啟用工作流程

deactivate_workflow

停用工作流程

其他功能

工具

說明

list_tags

列出標籤


Related MCP server: n8n MCP Server

🚀 安裝

1. Clone 專案

git clone https://github.com/your-username/n8n-manage-mcp.git
cd n8n-manage-mcp

2. 安裝依賴

pip install -r requirements.txt

3. 設定連線

方式 A: 使用設定檔(推薦)

cp config.example.json config.json

編輯 config.json:

{
    "n8n_host": "https://your-n8n-instance.com/api/v1",
    "api_key": "your-n8n-api-key"
}

方式 B: 使用環境變數

export N8N_HOST="https://your-n8n-instance.com/api/v1"
export N8N_API_KEY="your-n8n-api-key"

Windows PowerShell:

$env:N8N_HOST = "https://your-n8n-instance.com/api/v1"
$env:N8N_API_KEY = "your-n8n-api-key"

4. 取得 n8n API Key

  1. 登入你的 n8n 實例

  2. 點擊右上角頭像 → Settings

  3. 找到 API 區塊

  4. 點擊 Create API Key

  5. 複製 API Key


🔧 使用方式

與 Claude Desktop / Antigravity 整合

在 MCP 設定檔中加入:

{
    "mcpServers": {
        "n8n-manage": {
            "command": "python",
            "args": [
                "/path/to/n8n-manage-mcp/server.py"
            ]
        }
    }
}

使用環境變數的設定

{
    "mcpServers": {
        "n8n-manage": {
            "command": "python",
            "args": [
                "/path/to/n8n-manage-mcp/server.py"
            ],
            "env": {
                "N8N_HOST": "https://your-n8n.com/api/v1",
                "N8N_API_KEY": "your-api-key"
            }
        }
    }
}

📖 使用範例

搜尋工作流程

搜尋名稱包含 "報告" 的工作流程

建立工作流程

建立一個名為 "每日報告" 的工作流程,包含:
1. Schedule Trigger (每天早上 9 點)
2. HTTP Request (取得資料)
3. Send Email (寄送報告)

更新工作流程

取得工作流程 ID xxx 的定義,
將名稱改為 "新名稱" 後更新

執行工作流程

執行工作流程 ID xxx,傳入資料 {"name": "test"}

📁 專案結構

n8n-manage-mcp/
├── server.py           # MCP Server 主程式
├── n8n_client.py       # n8n REST API 客戶端
├── config.json         # 連線設定(需自行建立)
├── config.example.json # 設定範例
├── requirements.txt    # Python 依賴
├── .gitignore          # Git 忽略檔案
└── README.md           # 本文件

🔧 故障排除

認證失敗 (401 Unauthorized)

  • 確認 API Key 正確且未過期

  • 確認 API Key 有足夠權限

連線失敗

  • 確認 n8n_host 格式正確(應以 /api/v1 結尾)

  • 確認 n8n 實例正在運行

找不到資源 (404)

  • 使用 search_workflows 確認 ID 正確


📝 與官方 n8n MCP 的比較

功能

官方 n8n MCP

n8n-manage-mcp

搜尋工作流程

✅

✅

取得詳情

✅

✅

執行工作流程

✅

✅

建立工作流程

❌

✅

更新工作流程

❌

✅

刪除工作流程

❌

✅

啟用/停用

❌

✅

執行歷史

❌

✅

標籤列表

❌

✅


📄 License

MIT License - 詳見 LICENSE


🤝 貢獻

歡迎提交 Issue 和 Pull Request!

  1. Fork 此專案

  2. 建立功能分支 (git checkout -b feature/amazing-feature)

  3. 提交變更 (git commit -m 'Add amazing feature')

  4. 推送分支 (git push origin feature/amazing-feature)

  5. 開啟 Pull Request

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      D
      maintenance
      Enables full workflow automation management in n8n through 40+ tools covering workflows, executions, credentials, tags, variables, projects, users, and source control operations.
      52
      MIT
    • A
      license
      B
      quality
      C
      maintenance
      Enables AI assistants to interact with n8n workflow automation instances through the REST API. Supports workflow management, execution control, tag organization, execution history monitoring, and webhook management.
      19
      5
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables AI assistants to manage n8n workflows and executions, including creating, updating, deleting, activating, deactivating, and executing workflows, as well as listing and retrieving execution details.
      MIT