MCP(Model Context Protocol)

What is MCP

学习一个新兴的协议:MCP协议,它的作用可以类比为一个USB-C端口,实现大模型LLM与各种外部工具的无缝连接。有了它,开发者不必为每个模型或者每个工具专门设计API接口进行互联,可以方便地将大模型的能力拓展到已整合MCP的工具中,更快实现agentic AI。

Learn about an emerging protocol: the MCP protocol. Its function can be analogized to that of a USB-C port, enabling seamless connection between large language models (LLMs) and various external tools. With it, developers don't have to specifically design API interfaces for interconnection for each model or each tool. They can conveniently expand the capabilities of large language models to the tools that have integrated the MCP, and achieve agentic AI more quickly.

该协议从发布以来就迅速增长,MCP生态初现端倪,以下a16z对该市场的梳理

The protocol has grown rapidly since its release, and the MCP ecosystem has begun to take shape. The following is a16z's review of the market.

MCP 中有两个核心概念,分别是客户端 MCP Client 和服务器 MCP Server。客户端发起对某个MCP服务器的请求时,会先从服务器获取其包含的所有工具的列表和描述信息,之后客户端决定该使用哪一个工具来完成任务,调用完工具后将工具给出的结果包装最终返回给用户。

There are two core concepts in MCP, namely the MCP Client on the client side and the MCP Server on the server side. When the client initiates a request to a certain MCP server, it will first obtain from the server a list and descriptive information of all the tools contained therein. After that, the client decides which tool to use to complete the task. After invoking the tool, it will package the result given by the tool and finally return it to the user.

有了MCP,可以解决如下问题:

With MCP, the following problems can be solved:

  1. AI 应用开发者可以将其AI应用无缝连接到任何 MCP Server,扩展能力边界(目前看来AI可以根据给出的模板格式直接发送信息给MCP Server,仅需要开发者保证AI传输正确模板即可);AI application developers can seamlessly connect their AI applications to any MCP Server, expanding the boundaries of capabilities (currently, it seems that AI can directly send information to the MCP Server according to the given template format, and developers only need to ensure that the AI transmits the correct template);
  2. Tool / API 开发者只要搭一个符合协议要求的 MCP Server即可供其他AI应用使用,相当于给原先工具套个外壳;Tool/API developers only need to set up an MCP Server that meets the requirements of the protocol to make it available for other AI applications, which is equivalent to putting a shell on the original tool;
  3. 数据和Tool类似,数据库通过MCP Server也能被Agent直接调用。Similar to tools, in the case of data, the database can also be directly invoked by the Agent through the MCP Server.

以下是一种常见的调用形式,这个功能可以快速获取server能提供的工具列表

The following is a common form of invocation, and this code can quickly obtain the list of tools that the server can provide.

暂无评论

发送评论 编辑评论


				
|´・ω・)ノ
ヾ(≧∇≦*)ゝ
(☆ω☆)
(╯‵□′)╯︵┴─┴
 ̄﹃ ̄
(/ω\)
∠( ᐛ 」∠)_
(๑•̀ㅁ•́ฅ)
→_→
୧(๑•̀⌄•́๑)૭
٩(ˊᗜˋ*)و
(ノ°ο°)ノ
(´இ皿இ`)
⌇●﹏●⌇
(ฅ´ω`ฅ)
(╯°A°)╯︵○○○
φ( ̄∇ ̄o)
ヾ(´・ ・`。)ノ"
( ง ᵒ̌皿ᵒ̌)ง⁼³₌₃
(ó﹏ò。)
Σ(っ °Д °;)っ
( ,,´・ω・)ノ"(´っω・`。)
╮(╯▽╰)╭
o(*////▽////*)q
>﹏<
( ๑´•ω•) "(ㆆᴗㆆ)
😂
😀
😅
😊
🙂
🙃
😌
😍
😘
😜
😝
😏
😒
🙄
😳
😡
😔
😫
😱
😭
💩
👻
🙌
🖕
👍
👫
👬
👭
🌚
🌝
🙈
💊
😶
🙏
🍦
🍉
😣
Source: github.com/k4yt3x/flowerhd
颜文字
Emoji
小恐龙
花!
上一篇
下一篇