Build Your AI Toolchain:MCP + ACP + n8n 個人 AI 工廠

2026-05-15 · AI 架構 · Eric Cheung

前言:由獨立工具到整合系統

快速結論(TL;DR)

過去 6 日,我哋學咗 MCP(Tool ↔ AI 通訊)、ACP(AI ↔ AI 通訊)、同各種 MCP Server 嘅實戰技巧。今日係最後一課,亦係最重要嘅一課:將所有 Protocol、Server、同自動化工具整合成一個完整嘅 AI-Augmented 開發流程 — 你嘅個人 AI 工廠。

呢個唔係 theoretical architecture,而係一個你可以即刻用喺任何 project 嘅實戰 blueprint。由 Directory Structure 到 Configuration 到 Daily Workflow,全部有齊。


Part 1:AI 工廠架構藍圖

五大組件


Part 2:Project Directory Structure

推薦嘅 AI-Augmented Project 結構

my-ai-augmented-project/
├── CLAUDE.md                    # AI 知識基礎(Context Engineering)
├── .claude/
│   ├── settings.json            # 權限 + 行為設定
│   ├── settings.local.json      # Local override(不 commit)
│   └── hooks/
│       ├── on-start.sh           # 啟動時自動 setup
│       └── pre-commit.sh         # Commit 前自動檢查
├── mcp-servers/                 # 你嘅 MCP Server 集合
│   ├── github-mcp/              # Day 4 建立嘅 GitHub MCP
│   ├── file-mcp/                # 檔案管理 MCP
│   └── custom-mcp/              # 你嘅 custom business logic
├── acp/                         # ACP 配置
│   └── agents.json              # Agent 名冊 + capabilities
├── n8n/                         # n8n workflow 定義
│   ├── daily-standup.json       # 每日自動報告 workflow
│   ├── deploy-pipeline.json     # Deploy 自動化 workflow
│   └── code-review.json         # PR auto-review workflow
├── src/                         # 你嘅 application code
├── docs/                        # 專案文檔
└── package.json

Part 3:整合設定 — 全部 Protocol 一次過 Configure

CLAUDE.md — AI 嘅知識基礎

# CLAUDE.md — AI-Augmented Project

## AI 工廠架構
- MCP Servers: github, filesystem, database, slack
- ACP Agents: claude-code (code gen), hermes (planning)
- Automation: n8n workflows for daily tasks

## 通訊規則
- Code tasks → Claude Code via ACP
- Planning tasks → Hermes Agent via ACP
- External tools → MCP Servers
- Scheduled tasks → n8n workflows

## Code Convention
- React + TypeScript + Tailwind CSS v4
- 所有 components 放 src/components/
- API calls 經 MCP tools,唔好直接 call HTTP

Claude Code MCP Config — 一鍵啟動全 Toolchain

{
  "mcpServers": {
    "github": {
      "command": "node",
      "args": ["./mcp-servers/github-mcp/index.js"],
      "env": { "GITHUB_TOKEN": "$GITHUB_TOKEN" }
    },
    "filesystem": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-filesystem",
        "./src", "./docs"]
    },
    "database": {
      "command": "node",
      "args": ["./mcp-servers/db-mcp/index.js"],
      "env": { "DATABASE_URL": "$DATABASE_URL" }
    },
    "slack": {
      "command": "node",
      "args": ["./mcp-servers/slack-mcp/index.js"],
      "env": { "SLACK_BOT_TOKEN": "$SLACK_BOT_TOKEN" }
    }
  }
}

Part 4:Daily Workflow — AI 工廠嘅一日

🌅 早上:Startup Routine

9:00 AM — n8n scheduled trigger:
  ├─ GitHub MCP: list open issues + PRs → 今日要處理嘅嘢
  ├─ Slack MCP: send #dev-team → 每日 summary
  └─ Claude Code: 載入 context → 準備好開工

👨‍💻 中午:Development Cycle

Dev 緊嗰陣 — 自然語言操控全工具鏈:
  "Implement user registration API"
  ├─ Hermes Agent (ACP): plan task breakdown
  ├─ Claude Code (ACP): generate route + controller + test
  ├─ File MCP: write code to src/
  ├─ Database MCP: run migration
  └─ GitHub MCP: create PR → assign reviewer

🌙 下午:Wrap-up Routine

5:30 PM — n8n scheduled trigger:
  ├─ GitHub MCP: summarize today's merged PRs
  ├─ Slack MCP: send daily wrap-up to #engineering
  └─ File MCP: append to docs/dev-log.md

Part 5:n8n Workflow 實戰範例

Workflow 1:PR Auto-Review

每當有新 PR,自動 trigger Claude Code 做 code review,然後將結果 post 返去 PR comment。

{
  "name": "Auto PR Review",
  "nodes": [
    {
      "name": "GitHub Webhook",
      "type": "webhook",
      "position": [250, 300],
      "parameters": { "event": "pull_request.opened" }
    },
    {
      "name": "Claude Code Review",
      "type": "mcp-tool",
      "position": [500, 300],
      "parameters": {
        "server": "claude-code",
        "tool": "code-review",
        "input": "{{ $json.pull_request.diff_url }}"
      }
    },
    {
      "name": "Post Review Comment",
      "type": "http-request",
      "position": [750, 300],
      "parameters": {
        "method": "POST",
        "url": "{{ $json.pull_request.comments_url }}",
        "body": "{{ $node['Claude Code Review'].json }}"
      }
    }
  ]
}

Workflow 2:Daily Standup Report

{
  "name": "Daily Standup Report",
  "nodes": [
    {
      "name": "Schedule",
      "type": "schedule",
      "position": [250, 300],
      "parameters": { "cron": "0 9 * * 1-5" }
    },
    {
      "name": "Get Open Issues",
      "type": "mcp-tool",
      "position": [500, 200],
      "parameters": {
        "server": "github",
        "tool": "github_list_issues",
        "input": { "state": "open" }
      }
    },
    {
      "name": "Get Open PRs",
      "type": "mcp-tool",
      "position": [500, 400],
      "parameters": {
        "server": "github",
        "tool": "github_list_prs",
        "input": { "state": "open" }
      }
    },
    {
      "name": "AI Generate Summary",
      "type": "ai-summary",
      "position": [750, 300],
      "parameters": {
        "input": "Issues: {{ $node[1].json }}\nPRs: {{ $node[2].json }}",
        "prompt": "Generate a concise daily standup summary"
      }
    },
    {
      "name": "Post to Slack",
      "type": "slack-send",
      "position": [1000, 300],
      "parameters": {
        "channel": "#daily-standup",
        "message": "{{ $node['AI Summary'].json }}"
      }
    }
  ]
}

Part 6:AI 工廠嘅 ROI — 點解值得花時間整合?

整合前 vs 整合後


總結:由 Day 1 到 Day 7 — 你而家嘅能力地圖

恭喜你完成咗 7 日嘅 AI-Augmented Development 學習之旅!回顧一下你學咗啲咩:

呢個就係AI-Augmented Developer 嘅完整武器庫。你唔單止學咗技術,更加建立咗一個可以即刻套用到任何 project 嘅 AI 開發系統。Welcome to the future of software development. 🚀

Written by Eric Cheung · Learn One AI Thing Every Day · Day 7: Build Your AI Toolchain