Model Context Protocol (Anthropic công bố 11/2024) là giao thức mở chuẩn hoá cách LLM/agent kết nối với tools, data sources, và prompts bên ngoài. Giống như "USB-C cho AI": thay vì mỗi app AI tự viết integration riêng cho Google Drive, GitHub, Postgres..., các hệ thống đó chỉ cần expose một MCP server → bất kỳ MCP client nào (Claude Desktop, Cursor, Cline, Claude Code) cũng có thể cắm vào ngay.
Kiến trúc: Host (app AI — VD Claude Desktop) ↔ Client (1 client/server connection) ↔ Server (wrap data/tool). Server expose 3 primitive: Tools (function callable), Resources (file/doc read-only), Prompts (template tái sử dụng). Transport: stdio (local) hoặc HTTP+SSE (remote).
Tại sao quan trọng:
- Tránh N×M integration — giảm chi phí tích hợp.
- Ecosystem chuẩn — hàng trăm MCP server cộng đồng sẵn có (filesystem, git, slack, postgres, browser...).
- Bảo mật rõ ràng — mỗi server chạy process riêng, permission kiểm soát từ host.
- Portable — prompt/workflow dùng được giữa nhiều AI client.
So với function calling native: function calling là mechanism LLM-level (model tuân schema); MCP là protocol layer cao hơn (định nghĩa discovery, lifecycle, transport, auth) → scale cho hệ sinh thái tools. Các IDE AI hiện đại (Cursor, Cline, Claude Code) đều đã hỗ trợ MCP.
Model Context Protocol (Anthropic, Nov 2024) is an open protocol standardizing how LLMs/agents connect to external tools, data sources, and prompts. Think "USB-C for AI": instead of every AI app writing custom integrations for Google Drive, GitHub, Postgres..., those systems expose an MCP server → any MCP client (Claude Desktop, Cursor, Cline, Claude Code) plugs in instantly.
Architecture: Host (AI app, e.g. Claude Desktop) ↔ Client (one client/server connection) ↔ Server (wraps data/tool). Servers expose 3 primitives: Tools (callable functions), Resources (read-only files/docs), Prompts (reusable templates). Transport: stdio (local) or HTTP+SSE (remote).
Why it matters:
- Avoids N×M integration — lower integration cost.
- Standard ecosystem — hundreds of community MCP servers ready (filesystem, git, slack, postgres, browser...).
- Explicit security — each server is its own process, host-controlled permissions.
- Portable — prompts/workflows move between AI clients.
Vs native function calling: function calling is an LLM-level mechanism (model follows a schema); MCP sits above (defining discovery, lifecycle, transport, auth) → scales the tools ecosystem. Modern AI IDEs (Cursor, Cline, Claude Code) already support MCP.