Claude MCP 完整教學指南
Model Context Protocol (MCP) 讓 Claude Desktop 擁有超強擴充能力!
 
什麼是 MCP?
Model Context Protocol (MCP) 是 Anthropic 推出的開放協議,讓 Claude Desktop 能夠連接外部工具和服務,大幅擴展 AI 助手的能力。
┌─────────────────┐ MCP Protocol ┌─────────────────┐
│ Claude Desktop │ ◄─────────────────► │ MCP Servers │
└─────────────────┘ └─────────────────┘
│
┌─────────────────────────────┼─────────────────────────────┐
│ │ │ │ │
┌────▼────┐ ┌────▼────┐ ┌────▼────┐ ┌────▼────┐ ┌────▼────┐
│ 檔案系統 │ │ GitHub │ │ Brave │ │ Blender │ │ Figma │
│ 存取 │ │ 整合 │ │ 搜尋 │ │ 3D建模 │ │ 設計 │
└─────────┘ └─────────┘ └─────────┘ └─────────┘ └─────────┘快速開始
前置需求
- Claude Desktop 桌面應用程式
- v18 或更高版本
- Windows 10/11 或 macOS
設定檔位置
| 作業系統 | 設定檔路徑 |
|---|---|
| Windows | %APPDATA%\Claude\claude_desktop_config.json |
| macOS | ~/Library/Application Support/Claude/claude_desktop_config.json |
提示:Windows 用戶可按Win + R,輸入%APPDATA%\Claude快速開啟資料夾
課程目錄
| 單元 | 主題 | 說明 |
|---|---|---|
| Part 01 | MCP 基礎入門 | 了解 MCP 架構與核心概念 |
| Part 02 | 檔案系統整合 | 讓 Claude 讀寫本機檔案 |
| Part 03 | SQLite 資料庫 | 連接本地資料庫進行查詢 |
| Part 04 | GitHub 整合 | 管理倉庫、PR、Issues |
| Part 05 | 網頁內容抓取 | 從網站獲取即時資訊 |
| Part 06 | 記憶系統 | 實現對話記憶功能 |
| Part 07 | Python MCP 伺服器 | 自訂 Python MCP 服務 |
| Part 08 | Node.js MCP 伺服器 | 自訂 Node.js MCP 服務 |
| Part 09 | 多伺服器整合 | 同時運行多個 MCP |
| Part 10 | 實戰專案 | 綜合應用範例 |
熱門 MCP 伺服器一覽
| MCP 伺服器 | 功能 | 需要設定 | 難度 |
|---|---|---|---|
| filesystem | 讀寫本機檔案 | 指定資料夾路徑 | ⭐ |
| sequential-thinking | 強化深度思考 | 無需額外設定 | ⭐ |
| puppeteer | 自動化瀏覽器 | 無需額外設定 | ⭐ |
| brave-search | 隱私優先搜尋 | Brave API Key | ⭐⭐ |
| github | GitHub 專案管理 | GitHub Token | ⭐⭐ |
| n8n-mcp | 工作流程自動化 | n8n API Key | ⭐⭐ |
| blender | 3D 建模控制 | 安裝 uv + Addon | ⭐⭐⭐ |
| figma | Figma 設計整合 | Figma API Key | ⭐⭐ |
完整設定檔範例
將以下內容儲存為 claude_desktop_config.json:
{
"mcpServers": {
"filesystem": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-filesystem",
"C:/Users/你的使用者名稱/Desktop",
"C:/Users/你的使用者名稱/Documents",
"C:/Users/你的使用者名稱/Downloads"
]
},
"sequential-thinking": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-sequential-thinking"]
},
"puppeteer": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-puppeteer"]
},
"brave-search": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-brave-search"],
"env": {
"BRAVE_API_KEY": "貼上你的_Brave_API_Key"
}
},
"github": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-github"],
"env": {
"GITHUB_PERSONAL_ACCESS_TOKEN": "貼上你的_GitHub_Token"
}
},
"n8n-mcp": {
"command": "npx",
"args": ["n8n-mcp"],
"env": {
"MCP_MODE": "stdio",
"LOG_LEVEL": "error",
"DISABLE_CONSOLE_OUTPUT": "true",
"N8N_API_URL": "http://localhost:5678",
"N8N_API_KEY": "貼上你的_n8n_API_Key"
}
},
"blender": {
"command": "cmd",
"args": ["/c", "uvx", "blender-mcp"]
},
"figma": {
"command": "npx",
"args": ["-y", "figma-developer-mcp", "--figma-api-key=貼上你的_Figma_Token", "--stdio"]
}
}
}注意:請將 你的使用者名稱 改為你的 Windows 使用者名稱詳細設定指南
包含以下 MCP 的逐步設定說明:
- n8n API Key 取得與設定
- Blender + uv 安裝設定
- GitHub Personal Access Token 申請
- Brave Search API Key 註冊
- Figma API Key 產生
常見問題
Q: MCP 沒有出現 🔨 圖示?
- 確認 JSON 格式正確(使用 JSONLint 驗證)
- 完全關閉 Claude Desktop 再重新開啟
- 檢查設定檔路徑是否正確
Q: 出現「spawn npx ENOENT」錯誤?
Windows 用戶請確認:
- Node.js 已正確安裝
- 重新開啟終端機,輸入
npx --version確認可執行 - 必要時重新啟動電腦
Q: 如何查看 MCP 錯誤日誌?
- Windows:
%UserProfile%\AppData\Roaming\Claude\Logs\ - macOS:
~/Library/Application Support/Claude/Logs/
或在 Claude Desktop 中:Settings → Developer → Debug 日誌
相關資源
| 資源 | 連結 |
|---|---|
| 官方 MCP 文檔 | modelcontextprotocol.io |
| 官方 MCP Servers | |
| Awesome MCP Servers | |
| MCP 搜尋引擎 | mcp.so |
| Claude Desktop 下載 |
授權
本專案採用 MIT License 授權。
如果這個指南對你有幫助,請給個 ⭐ Star!
有問題歡迎開 Issue 討論
