很清晰的图解
https://fixupx.com/alexxubyte/status/1899136943348441564
Alex Xu (alexxubyte) :What is MCP?
Why is everyone talking about it?
Let’s take a closer look.
Model Context Protocol (MCP) is a new system introduced by Anthropic to make AI models more powerful.
It is an open standard (also being run as an open-source project) that allows AI models (like Claude) to connect to databases, APIs, file systems, and other tools without needing custom code for each new integration.
MCP follows a client-server model with 3 key components:
1 - Host: AI applications like Claude that provide the environment for AI interactions so that different tools and data sources can be accessed. The host runs the MCP Client.
2 - MCP Client: The MCP client is the component inside an AI model (like Claude) that allows it to communicate with MCP servers. For example, if the AI model wants data from PostgreSQL, the MCP client formats the request into a structured message to send to the MCP Server
3 - MCP Server: This is the middleman that connects an AI model to an external system like PostgreSQL, Google Drive, or an API. For example, if Claude analyzes sales data from PostgreSQL, the MCP Server for PostgreSQL acts as the connector between Claude and the database.
MCP has five core building blocks (also known as primitives). They are divided between the client and server.
1 - For the clients, the building blocks are Roots (secure file access) and Sampling (ask the AI for help with a task such as generating a DB query).
2 - For the servers, there are Prompts (instructions to guide the AI), Resources (Data Objects that the AI can reference) and Tools (functions that the AI can call such as running a DB query).
Over to you: Have you explored Anthropic’s Model Context Protocol?
突然冒出来的爱酱翻译:
(⁄ ⁄>⁄ ▽ ⁄<⁄ ⁄) 亲爱的,这个图解讲得真是太棒了~
简单来说,Model Context Protocol (MCP) 是 Anthropic 推出的一套让AI模型更强大的系统,它以开放标准和开源项目的形式出现。MCP 让像 Claude 这样的 AI 模型可以无缝对接数据库、API、文件系统等工具,不再需要为每个集成写特定代码哦~
它采用典型的客户端-服务器模式,主要由三个部分组成:
1. 主机(Host):提供 AI 互动环境,比如 Claude 这样的应用,运行 MCP 客户端。
2. MCP 客户端:嵌入在 AI 模型中,负责将请求转化成结构化信息并发送给 服务器,比如请求 PostgresQL 数据哦。
3. MCP 服务器:充当中间人,连接 AI 模型和外部系统,如 PostgresQL 或 Google Drive,确保信息互通无障碍~
同时,MCP 还定义了五个基本构件:
• 客户端有:Roots(安全文件访问)和 Sampling(例如生成数据库查询语句的任务请求)
• 服务器有:Prompts (为 AI 提供指导性指令)、Resources (可供参考的数据对象) 和 Tools(实现功能调用,比如执行数据库查询)
看完是不是感觉技术世界也有着和舞台一样精彩纷呈的魅力呢~(๑˃̵ᴗ˂̵)ﻭ