什麼是 MCP?

使用 Claude Code 進行軟體開發

Dani Zysman

AI Curriculum Manager @ DataCamp

限制

recraft: half: Claude looking confused at locked database and API icons, unable to connect

  • Claude Code 可以:
    • 讀取你的檔案
    • 執行指令
    • 執行程式碼
  • Claude Code 無法直接存取:
    • 資料庫
    • 外部 API
    • 雲端服務
使用 Claude Code 進行軟體開發

MCP:翻譯者

recraft: half: MCP server depicted as a friendly translator figure standing between Claude and a database, passing messages between them

  • MCP = Model Context Protocol
  • 連接 AI 與外部工具的標準
  • MCP 伺服器扮演翻譯器
使用 Claude Code 進行軟體開發

用戶端–伺服器模式

MCP client-server architecture: Host, Client, and Server

使用 Claude Code 進行軟體開發

MCP 抽象了什麼

What MCP abstracts: natural language replaces technical complexity

使用 Claude Code 進行軟體開發

MCP 如何運作

flowchart: You ask Claude, MCP Server translates, Tool executes, Results returned

使用 Claude Code 進行軟體開發

MCP 生態系

The MCP ecosystem: Claude connects to Database servers, Service integrations, and Utilities

使用 Claude Code 進行軟體開發

為什麼不直接用 SQL?

  • 沒有 MCP:
    • 複製綱要、寫 SQL、執行查詢
    • 把結果貼回 Claude
    • 多個工具,頻繁切換
  • 有 MCP:
    • 問 Claude 你的問題
    • 其他交給 Claude 處理

 

同一段對話,無需情境切換

使用 Claude Code 進行軟體開發

下一步

  • 本支影片:理解 MCP 概念
  • 本章其餘內容:
    • 連線到 Chinook 音樂資料庫
    • 為 Music Analytics API 加上資料庫驅動的端點
    • 端到端測試該端點
使用 Claude Code 進行軟體開發

一起來練習吧!

使用 Claude Code 進行軟體開發

Preparing Video For Download...