Trung BìnhAI Engineering iconAI Engineering

MCP (Model Context Protocol) là gì?

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.

Xem toàn bộ AI Engineering cùng filter theo level & chủ đề con.

Mở danh sách AI Engineering