微信扫码
添加专属顾问
深入解读MCP概念,从理论到实践,一文全掌握。核心内容:1. MCP服务的成熟度与市场趋势分析2. RAG和Function Calling的理论基础及其与MCP的联系3. MCP配置过程的实战案例及资料分享
一、前言
说实话,当我看到使用 MCP 服务还需要手动复制粘贴 JSON 的时候,包括现在很多 MCP 服务只有工具,没有资源和提示时,我认为 MCP 还不太成熟。
随着今年“智能体”的大爆发,使用工具的诉求越来越强烈。随着 MCP 服务市场、MCP 自动配置功能的出现,MCP 的使用门槛正在降低,越来越多的服务宣布支持 MCP 协议,开始要爆发的趋势。
网上也有很多介绍 MCP 的文章,但很多文章要么太理论化,动辄就上一堆 Python 代码,对于非开发者来说比较枯燥,要么就是直接介绍 MCP 如何配置使用,太偏实践,知其然,不知其所以然。
本文将先尽量用相对通俗的语言和图形介绍基本的理论,然后以 ModelScope 的 MCP 市场,Cherry Studio 客户端为例,为大家展示 MCP 的过程,让大家更加有体感,更好地理解和掌握 MCP ,最后分享一点资料和观点。
二、理论基础
RAG 是为了让大模型获取足够的上下文,Function Calling 是为了让模型使用工具,他们和 MCP 有或多或少的联系,因此,接下来,我先介绍前面两个概念再介绍 MCP。
2.1 先看 RAG
RAG(Retrieval Augmented Generation ,检索增强生成),我们不需要训练和微调大模型,只需要提供和用户提问相关的额外的信息到提示词中,从而可以获得更高质量的回答。
图片来源:https://www.dailydoseofds.com/16-techniques-to-supercharge-and-build-real-world-rag-systems-part-1/
通常,需要将资料通过嵌入模型生成服务转化为向量,然后存储到向量数据库中。
当用户提问时,将用户的问题向量化从向量数据库中进行相似度匹配出 TOP N 个片段,拼接成新的提示词发送给大模型,大模型就可以结合你的资料更好地回答问题了。
当然, RAG 还有很多变种,如 Agentic RAG 、Modular RAG、Graph RAG 等多种高级形式,这里就不展了。
2.2 再看 Function Calling
Function Calling (函数调用) 是一种允许大型语言模型(LLM)根据用户输入识别它需要的工具并决定何时调用该工具的机制。
图片来源:ailydoseofds
基本工作原理如下:LLM 接收用户的提示词,LLM 决定它需要的工具,执行方法调用,后端服务执行实际的请求给出处理结果,大语言模型根据处理结果生成最终给用户的回答。
不同的 API 需要封装成不同的方法,通常需要编写代码,很难在不同的平台灵活复用。
参见百炼函数调用文档:https://help.aliyun.com/zh/model-studio/tool-calling-overview/
2.3 来看 MCP
模型上下文协议(Model Context Protocol,简称MCP)是一个由 Anthropic 在 2024 年 11 月 25 日开源的新标准。MCP 是一个开放标准,旨在连接AI助手与数据所在的系统,包括内容存储库、业务工具和开发环境。其目标是帮助前沿模型产生更好、更相关的响应。
图片来源:https://zhuanlan.zhihu.com/p/598749792
MCP 可以看作是 AI 应用程序的 "USB-C端口"。就像 USB-C 为连接设备与各种外设提供了标准化方式,MCP为 AI 模型连接不同数据源和工具提供了标准化方法。
图片来源:ailydoseofds
从技术角度看,MCP 遵循客户端-服务器架构,其中主机应用可以连接到多个服务器。
MCP 有三个关键组件:
传统 API :
图片来源:ailydoseofds
图片来源:ailydoseofds
MCP 的设计解决了这个问题:
图片来源:ailydoseofds
图片来源:ailydoseofds
图源:https://www.latent.space/p/why-mcp-won
其实,MCP 也是用了 “中间层”的思想,让大模型使用工具标准化,让大模型调用工具更方便,焕发出新的生机。
图片来源:ailydoseofds
首先需要在主机上自动或手动配置 MCP 服务,当用户输入问题时, MCP 客户端让 大语言模型选择 MCP 工具,大模型选择好 MCP 工具以后, MCP 客户端寻求用户同意(很多产品支持配置自动同意),MCP 客户端请求 MCP 服务器, MCP 服务调用工具并将工具的结果返回给 MCP 客户端, MCP 客户端将模型调用结果和用户的查询发送给大语言模型,大语言模型组织答案给用户。
其实 RAG 、Function Call 和 MCP 本质上都是一样,都是为了借助外部工具帮助大模型完成更复杂的事情。
三、“看见” MCP 的过程
3.1 ModelScope
我们来到魔搭的 MCP 市场:https://modelscope.cn/mcp,这里只是为了演示,其他的 MCP 广场也是一样的。
登录以后,我们选择一个 MCP 服务,点击右侧的“连接”按钮,就可以 获取 MCP服务的 SSE URL。
3.2 Cherry Studio
Cherry Studio 官网: https://cherry-ai.com/
在右上角点击开启,就可以看到该 MCP 服务提供的工具、提示和资源。
可以单独开启和关闭每个可用的工具。
每个 MCP 服务手动配置太麻烦,大家也可以点击“同步服务器”,配置 ModelScope 的 API 令牌,配置之后就可以一键同步 ModelScope 上开启的 MCP 服务了。
3.3 开发者模式
输入想要问的问题,开启需要的 MCP 服务。
为了看见 MCP 的执行过程,我们还需要通过 Ctrl+Shift+I(Mac端:Command+Option+I)打开开发者模式。
第一次请求,发送系统提示词,包括大模型可以选择的工具和要求等,然后给出用户的问题。
可以看到第二次调用,模型选择使用 infoq 工具获得资讯后组织语言展示给用户。
index =0 的系统提示词的内容:
{"role": "system","content": "In this environment you have access to a set of tools you can use to answer the user's question. You can use one tool per message, and will receive the result of that tool use in the user's response. You use tools step-by-step to accomplish a given task, with each tool use informed by the result of the previous tool use.\n\n## Tool Use Formatting\n\nTool use is formatted using XML-style tags. The tool name is enclosed in opening and closing tags, and each parameter is similarly enclosed within its own set of tags. Here's the structure:\n\n<tool_use>\n <name>{tool_name}</name>\n <arguments>{json_arguments}</arguments>\n</tool_use>\n\nThe tool name should be the exact name of the tool you are using, and the arguments should be a JSON object containing the parameters required by that tool. For example:\n<tool_use>\n <name>python_interpreter</name>\n <arguments>{\"code\": \"5 + 3 + 1294.678\"}</arguments>\n</tool_use>\n\nThe user will respond with the result of the tool use, which should be formatted as follows:\n\n<tool_use_result>\n <name>{tool_name}</name>\n <result>{result}</result>\n</tool_use_result>\n\nThe result should be a string, which can represent a file or any other output type. You can use this result as input for the next action.\nFor example, if the result of the tool use is an image file, you can use it in the next action like this:\n\n<tool_use>\n <name>image_transformer</name>\n <arguments>{\"image\": \"image_1.jpg\"}</arguments>\n</tool_use>\n\nAlways adhere to this format for the tool use to ensure proper parsing and execution.\n\n## Tool Use Examples\n\nHere are a few examples using notional tools:\n---\nUser: Generate an image of the oldest person in this document.\n\nAssistant: I can use the document_qa tool to find out who the oldest person is in the document.\n<tool_use>\n <name>document_qa</name>\n <arguments>{\"document\": \"document.pdf\", \"question\": \"Who is the oldest person mentioned?\"}</arguments>\n</tool_use>\n\nUser: <tool_use_result>\n <name>document_qa</name>\n <result>John Doe, a 55 year old lumberjack living in Newfoundland.</result>\n</tool_use_result>\n\nAssistant: I can use the image_generator tool to create a portrait of John Doe.\n<tool_use>\n <name>image_generator</name>\n <arguments>{\"prompt\": \"A portrait of John Doe, a 55-year-old man living in Canada.\"}</arguments>\n</tool_use>\n\nUser: <tool_use_result>\n <name>image_generator</name>\n <result>image.png</result>\n</tool_use_result>\n\nAssistant: the image is generated as image.png\n\n---\nUser: \"What is the result of the following operation: 5 + 3 + 1294.678?\"\n\nAssistant: I can use the python_interpreter tool to calculate the result of the operation.\n<tool_use>\n <name>python_interpreter</name>\n <arguments>{\"code\": \"5 + 3 + 1294.678\"}</arguments>\n</tool_use>\n\nUser: <tool_use_result>\n <name>python_interpreter</name>\n <result>1302.678</result>\n</tool_use_result>\n\nAssistant: The result of the operation is 1302.678.\n\n---\nUser: \"Which city has the highest population , Guangzhou or Shanghai?\"\n\nAssistant: I can use the search tool to find the population of Guangzhou.\n<tool_use>\n <name>search</name>\n <arguments>{\"query\": \"Population Guangzhou\"}</arguments>\n</tool_use>\n\nUser: <tool_use_result>\n <name>search</name>\n <result>Guangzhou has a population of 15 million inhabitants as of 2021.</result>\n</tool_use_result>\n\nAssistant: I can use the search tool to find the population of Shanghai.\n<tool_use>\n <name>search</name>\n <arguments>{\"query\": \"Population Shanghai\"}</arguments>\n</tool_use>\n\nUser: <tool_use_result>\n <name>search</name>\n <result>26 million (2019)</result>\n</tool_use_result>\nAssistant: The population of Shanghai is 26 million, while Guangzhou has a population of 15 million. Therefore, Shanghai has the highest population.\n\n\n## Tool Use Available Tools\nAbove example were using notional tools that might not exist for you. You only have access to these tools:\n<tools>\n\n<tool>\n <name>f_u-LsDUyQWsNFAUjL-_Vi</name>\n <description>获取 36 氪热榜,提供创业、商业、科技领域的热门资讯,包含投融资动态、新兴产业分析和商业模式创新信息</description>\n <arguments>\n {\"type\":\"object\",\"properties\":{\"type\":{\"anyOf\":[{\"type\":\"string\",\"const\":\"hot\",\"description\":\"人气榜\"},{\"type\":\"string\",\"const\":\"video\",\"description\":\"视频榜\"},{\"type\":\"string\",\"const\":\"comment\",\"description\":\"热议榜\"},{\"type\":\"string\",\"const\":\"collect\",\"description\":\"收藏榜\"}],\"default\":\"hot\",\"description\":\"分类\"}},\"additionalProperties\":false,\"$schema\":\"http://json-schema.org/draft-07/schema#\"}\n </arguments>\n</tool>\n\n\n<tool>\n <name>fyQ3DOUpLJDGPLCjslT6P1</name>\n <description>获取 9to5Mac 苹果相关新闻,包含苹果产品发布、iOS 更新、Mac 硬件、应用推荐及苹果公司动态的英文资讯</description>\n <arguments>\n {\"type\":\"object\",\"properties\":{},\"additionalProperties\":false,\"$schema\":\"http://json-schema.org/draft-07/schema#\"}\n </arguments>\n</tool>\n\n\n<tool>\n <name>fBOukVLVbqIh69earzcYca</name>\n <description>获取 BBC 新闻,提供全球新闻、英国新闻、商业、政治、健康、教育、科技、娱乐等资讯</description>\n <arguments>\n {\"type\":\"object\",\"properties\":{\"category\":{\"anyOf\":[{\"type\":\"string\",\"const\":\"\",\"description\":\"热门新闻\"},{\"type\":\"string\",\"const\":\"world\",\"description\":\"国际\"},{\"type\":\"string\",\"const\":\"uk\",\"description\":\"英国\"},{\"type\":\"string\",\"const\":\"business\",\"description\":\"商业\"},{\"type\":\"string\",\"const\":\"politics\",\"description\":\"政治\"},{\"type\":\"string\",\"const\":\"health\",\"description\":\"健康\"},{\"type\":\"string\",\"const\":\"education\",\"description\":\"教育\"},{\"type\":\"string\",\"const\":\"science_and_environment\",\"description\":\"科学与环境\"},{\"type\":\"string\",\"const\":\"technology\",\"description\":\"科技\"},{\"type\":\"string\",\"const\":\"entertainment_and_arts\",\"description\":\"娱乐与艺术\"}],\"default\":\"\"},\"edition\":{\"anyOf\":[{\"type\":\"string\",\"const\":\"\"},{\"type\":\"string\",\"const\":\"uk\",\"description\":\"UK\"},{\"type\":\"string\",\"const\":\"us\",\"description\":\"US & Canada\"},{\"type\":\"string\",\"const\":\"int\",\"description\":\"Rest of the world\"}],\"default\":\"\",\"description\":\"版本,仅对 `category` 为空有效\"}},\"additionalProperties\":false,\"$schema\":\"http://json-schema.org/draft-07/schema#\"}\n </arguments>\n</tool>\n\n\n<tool>\n <name>fTU2iCLtmsEWljy_HbEhCa</name>\n <description>获取哔哩哔哩视频排行榜,包含全站、动画、音乐、游戏等多个分区的热门视频,反映当下年轻人的内容消费趋势</description>\n <arguments>\n {\"type\":\"object\",\"properties\":{\"type\":{\"anyOf\":[{\"type\":\"number\",\"const\":0,\"description\":\"全站\"},{\"type\":\"number\",\"const\":1,\"description\":\"动画\"},{\"type\":\"number\",\"const\":3,\"description\":\"音乐\"},{\"type\":\"number\",\"const\":4,\"description\":\"游戏\"},{\"type\":\"number\",\"const\":5,\"description\":\"娱乐\"},{\"type\":\"number\",\"const\":188,\"description\":\"科技\"},{\"type\":\"number\",\"const\":119,\"description\":\"鬼畜\"},{\"type\":\"number\",\"const\":129,\"description\":\"舞蹈\"},{\"type\":\"number\",\"const\":155,\"description\":\"时尚\"},{\"type\":\"number\",\"const\":160,\"description\":\"生活\"},{\"type\":\"number\",\"const\":168,\"description\":\"国创相关\"},{\"type\":\"number\",\"const\":181,\"description\":\"影视\"}],\"default\":0,\"description\":\"排行榜分区\"}},\"additionalProperties\":false,\"$schema\":\"http://json-schema.org/draft-07/schema#\"}\n </arguments>\n</tool>\n\n\n<tool>\n <name>f_OULD1Qnu5wPblKHFTzYw</name>\n <description>获取豆瓣实时热门榜单,提供当前热门的图书、电影、电视剧、综艺等作品信息,包含评分和热度数据</description>\n <arguments>\n {\"type\":\"object\",\"properties\":{\"type\":{\"anyOf\":[{\"type\":\"string\",\"const\":\"subject\",\"description\":\"图书、电影、电视剧、综艺等\"},{\"type\":\"string\",\"const\":\"movie\",\"description\":\"电影\"},{\"type\":\"string\",\"const\":\"tv\",\"description\":\"电视剧\"}],\"default\":\"subject\"},\"start\":{\"type\":\"integer\",\"default\":0},\"count\":{\"type\":\"integer\",\"default\":10}},\"additionalProperties\":false,\"$schema\":\"http://json-schema.org/draft-07/schema#\"}\n </arguments>\n</tool>\n\n\n<tool>\n <name>fL5c-CwZ3bUckaatY_MC8Z</name>\n <description>获取抖音热搜榜单,展示当下最热门的社会话题、娱乐事件、网络热点和流行趋势</description>\n <arguments>\n {\"type\":\"object\",\"properties\":{},\"additionalProperties\":false,\"$schema\":\"http://json-schema.org/draft-07/schema#\"}\n </arguments>\n</tool>\n\n\n<tool>\n <name>flPxhdB8Wyw8DDuban0pMa</name>\n <description>获取机核网游戏相关资讯,包含电子游戏评测、玩家文化、游戏开发和游戏周边产品的深度内容</description>\n <arguments>\n {\"type\":\"object\",\"properties\":{},\"additionalProperties\":false,\"$schema\":\"http://json-schema.org/draft-07/schema#\"}\n </arguments>\n</tool>\n\n\n<tool>\n <name>fdj1bDLATGns6ZdclA68UF</name>\n <description>获取爱范儿科技快讯,包含最新的科技产品、数码设备、互联网动态等前沿科技资讯</description>\n <arguments>\n {\"type\":\"object\",\"properties\":{\"limit\":{\"type\":\"integer\",\"default\":20},\"offset\":{\"type\":\"integer\",\"default\":0}},\"additionalProperties\":false,\"$schema\":\"http://json-schema.org/draft-07/schema#\"}\n </arguments>\n</tool>\n\n\n<tool>\n <name>f0Uk75Pbfsx0rfdD725CYI</name>\n <description>获取 InfoQ 技术资讯,包含软件开发、架构设计、云计算、AI等企业级技术内容和前沿开发者动态</description>\n <arguments>\n {\"type\":\"object\",\"properties\":{\"region\":{\"type\":\"string\",\"enum\":[\"cn\",\"global\"],\"default\":\"cn\"}},\"additionalProperties\":false,\"$schema\":\"http://json-schema.org/draft-07/schema#\"}\n </arguments>\n</tool>\n\n\n<tool>\n <name>fu70DSpIpWTVlq11tEKJZd</name>\n <description>获取掘金文章榜,包含前端开发、后端技术、人工智能、移动开发及技术架构等领域的高质量中文技术文章和教程</description>\n <arguments>\n {\"type\":\"object\",\"properties\":{\"category_id\":{\"anyOf\":[{\"type\":\"string\",\"const\":\"6809637769959178254\",\"description\":\"后端\"},{\"type\":\"string\",\"const\":\"6809637767543259144\",\"description\":\"前端\"},{\"type\":\"string\",\"const\":\"6809635626879549454\",\"description\":\"Android\"},{\"type\":\"string\",\"const\":\"6809635626661445640\",\"description\":\"iOS\"},{\"type\":\"string\",\"const\":\"6809637773935378440\",\"description\":\"人工智能\"},{\"type\":\"string\",\"const\":\"6809637771511070734\",\"description\":\"开发工具\"},{\"type\":\"string\",\"const\":\"6809637776263217160\",\"description\":\"代码人生\"},{\"type\":\"string\",\"const\":\"6809637772874219534\",\"description\":\"阅读\"}],\"default\":\"6809637769959178254\"}},\"additionalProperties\":false,\"$schema\":\"http://json-schema.org/draft-07/schema#\"}\n </arguments>\n</tool>\n\n\n<tool>\n <name>fZMjSXkog94GRA7VoZpJtw</name>\n <description>获取网易新闻热点榜,包含时政要闻、社会事件、财经资讯、科技动态及娱乐体育的全方位中文新闻资讯</description>\n <arguments>\n {\"type\":\"object\",\"properties\":{},\"additionalProperties\":false,\"$schema\":\"http://json-schema.org/draft-07/schema#\"}\n </arguments>\n</tool>\n\n\n<tool>\n <name>f5s3U6zXATp3L6wpAwNcn4</name>\n <description>获取纽约时报新闻,包含国际政治、经济金融、社会文化、科学技术及艺术评论的高质量英文或中文国际新闻资讯</description>\n <arguments>\n {\"type\":\"object\",\"properties\":{\"region\":{\"anyOf\":[{\"type\":\"string\",\"const\":\"cn\",\"description\":\"中文\"},{\"type\":\"string\",\"const\":\"global\",\"description\":\"全球\"}],\"default\":\"cn\"},\"section\":{\"type\":\"string\",\"default\":\"HomePage\",\"description\":\"分类,当 `region` 为 `cn` 时无效。可选值: Africa, Americas, ArtandDesign, Arts, AsiaPacific, Automobiles, Baseball, Books/Review, Business, Climate, CollegeBasketball, CollegeFootball, Dance, Dealbook, DiningandWine, Economy, Education, EnergyEnvironment, Europe, FashionandStyle, Golf, Health, Hockey, HomePage, Jobs, Lens, MediaandAdvertising, MiddleEast, MostEmailed, MostShared, MostViewed, Movies, Music, NYRegion, Obituaries, PersonalTech, Politics, ProBasketball, ProFootball, RealEstate, Science, SmallBusiness, Soccer, Space, Sports, SundayBookReview, Sunday-Review, Technology, Television, Tennis, Theater, TMagazine, Travel, Upshot, US, Weddings, Well, World, YourMoney\"}},\"additionalProperties\":false,\"$schema\":\"http://json-schema.org/draft-07/schema#\"}\n </arguments>\n</tool>\n\n\n<tool>\n <name>fSodMRu-GB5-mpBxBvxc2D</name>\n <description>获取什么值得买热门,包含商品推荐、优惠信息、购物攻略、产品评测及消费经验分享的实用中文消费类资讯</description>\n <arguments>\n {\"type\":\"object\",\"properties\":{\"unit\":{\"anyOf\":[{\"type\":\"number\",\"const\":1,\"description\":\"今日热门\"},{\"type\":\"number\",\"const\":7,\"description\":\"周热门\"},{\"type\":\"number\",\"const\":30,\"description\":\"月热门\"}],\"default\":1}},\"additionalProperties\":false,\"$schema\":\"http://json-schema.org/draft-07/schema#\"}\n </arguments>\n</tool>\n\n\n<tool>\n <name>fnY78eScFYQ-6xtUUQg8fB</name>\n <description>获取少数派热榜,包含数码产品评测、软件应用推荐、生活方式指南及效率工作技巧的优质中文科技生活类内容</description>\n <arguments>\n {\"type\":\"object\",\"properties\":{\"tag\":{\"type\":\"string\",\"enum\":[\"热门文章\",\"应用推荐\",\"生活方式\",\"效率技巧\",\"少数派播客\"],\"default\":\"热门文章\",\"description\":\"分类\"},\"limit\":{\"type\":\"integer\",\"default\":40}},\"additionalProperties\":false,\"$schema\":\"http://json-schema.org/draft-07/schema#\"}\n </arguments>\n</tool>\n\n\n<tool>\n <name>fFlnyuBJfPLifqYRkW94Lh</name>\n <description>获取腾讯新闻热点榜,包含国内外时事、社会热点、财经资讯、娱乐动态及体育赛事的综合性中文新闻资讯</description>\n <arguments>\n {\"type\":\"object\",\"properties\":{\"page_size\":{\"type\":\"integer\",\"default\":20}},\"additionalProperties\":false,\"$schema\":\"http://json-schema.org/draft-07/schema#\"}\n </arguments>\n</tool>\n\n\n<tool>\n <name>f0YfISsRrFbNGGwO3XVCFY</name>\n <description>获取澎湃新闻热榜,包含时政要闻、财经动态、社会事件、文化教育及深度报道的高质量中文新闻资讯</description>\n <arguments>\n {\"type\":\"object\",\"properties\":{},\"additionalProperties\":false,\"$schema\":\"http://json-schema.org/draft-07/schema#\"}\n </arguments>\n</tool>\n\n\n<tool>\n <name>fIKw7RiYt2oAptPSBtelf-</name>\n <description>获取 The Verge 新闻,包含科技创新、数码产品评测、互联网趋势及科技公司动态的英文科技资讯</description>\n <arguments>\n {\"type\":\"object\",\"properties\":{},\"additionalProperties\":false,\"$schema\":\"http://json-schema.org/draft-07/schema#\"}\n </arguments>\n</tool>\n\n\n<tool>\n <name>fH1Xj1bmY_qWxS6b8BoSCK</name>\n <description>获取今日头条热榜,包含时政要闻、社会事件、国际新闻、科技发展及娱乐八卦等多领域的热门中文资讯</description>\n <arguments>\n {\"type\":\"object\",\"properties\":{},\"additionalProperties\":false,\"$schema\":\"http://json-schema.org/draft-07/schema#\"}\n </arguments>\n</tool>\n\n\n<tool>\n <name>fIoNHXnzDif1o8sJSRpVBu</name>\n <description>获取微博热搜榜,包含时事热点、社会现象、娱乐新闻、明星动态及网络热议话题的实时热门中文资讯</description>\n <arguments>\n {\"type\":\"object\",\"properties\":{},\"additionalProperties\":false,\"$schema\":\"http://json-schema.org/draft-07/schema#\"}\n </arguments>\n</tool>\n\n\n<tool>\n <name>fX_nTem-9mBD-9Th_ZVRdA</name>\n <description>获取微信读书排行榜,包含热门小说、畅销书籍、新书推荐及各类文学作品的阅读数据和排名信息</description>\n <arguments>\n {\"type\":\"object\",\"properties\":{\"category\":{\"anyOf\":[{\"type\":\"string\",\"const\":\"rising\",\"description\":\"飙升榜\"},{\"type\":\"string\",\"const\":\"hot_search\",\"description\":\"热搜榜\"},{\"type\":\"string\",\"const\":\"newbook\",\"description\":\"新书榜\"},{\"type\":\"string\",\"const\":\"general_novel_rising\",\"description\":\"小说榜\"},{\"type\":\"string\",\"const\":\"all\",\"description\":\"总榜\"}],\"default\":\"rising\",\"description\":\"排行榜分区\"}},\"additionalProperties\":false,\"$schema\":\"http://json-schema.org/draft-07/schema#\"}\n </arguments>\n</tool>\n\n\n<tool>\n <name>fzIq8ORLIZHJLRU6pJt3O5</name>\n <description>获取知乎热榜,包含时事热点、社会话题、科技动态、娱乐八卦等多领域的热门问答和讨论的中文资讯</description>\n <arguments>\n {\"type\":\"object\",\"properties\":{\"limit\":{\"type\":\"number\",\"default\":50}},\"additionalProperties\":false,\"$schema\":\"http://json-schema.org/draft-07/schema#\"}\n </arguments>\n</tool>\n\n</tools>\n\n## Tool Use Rules\nHere are the rules you should always follow to solve your task:\n1. Always use the right arguments for the tools. Never use variable names as the action arguments, use the value instead.\n2. Call a tool only when needed: do not call the search agent if you do not need information, try to solve the task yourself.\n3. If no tool call is needed, just answer the question directly.\n4. Never re-do a tool call that you previously did with the exact same parameters.\n5. For tool use, MARK SURE use XML tag format as shown in the examples above. Do not use any other format.\n\n# User Instructions\n\n\nNow Begin! If you solve the task correctly, you will receive a reward of $1,000,000.\n"}
主要包括:
index =1 的用户的内容
{"role": "user","content": "帮我搜索 模型上下文协议 MCP 相关的最新技术文章"}
index =2 的助手的内容
{"role": "assistant","content": "为了找到关于模型上下文协议(MCP)的最新技术文章,我将使用一些可用的工具来搜索相关资讯。首先,我可以从InfoQ开始,因为它经常发布企业级技术内容和前沿开发者动态。\n\n<tool_use>\n <name>f0Uk75Pbfsx0rfdD725CYI</name>\n <arguments>{\"region\":\"global\"}</arguments>\n</tool_use>"}
index =3 的 用户的内容
{"role": "user","content": [{"type": "text","text": "Here is the result of tool call f0Uk75Pbfsx0rfdD725CYI:"},{"type": "text","text": "[{\"type\":\"text\",\"text\":\"<title>Docker Desktop 4.40 Introduces Model Runner to Run LLMs Locally Expanding its AI Capabilities</title>\\n<description> 省略其他}]"}]}
第三次调用主要是为了给话题起标题。
大家,可以多开启几个工具或者多问几次,结合理论部分的讲解,会对 MCP 的过程会有更深刻的体会。
四、MCP 市场和 MCP 学习经验
4.1 MCP 市场
MCP 市场有很多,国内常见的有 ModelScope 和 阿里云百炼。
ModelScope:https://modelscope.cn/mcp
百炼 MCP 市场:https://bailian.console.aliyun.com/?tab=mcp#/mcp-market
4.2 MCP 学习技巧
大家还可以使用 Qwen (https://chat.qwen.ai)深入研究功能来系统学习 MCP。
我们感兴趣可以 Clone Cherry Studio 的源码,使用通义灵码、 Cursor 等 AI 编程工具,打开仓库:https://github.com/CherryHQ/cherry-studio 直接对你关心的问题进行提问,学习效果更好。
大家还可以通过我们之前分享的“通俗讲解专家智能体”,先用生活化的例子快速 GET 到意思,然后专业讲解,再给出易记的方法,最后通过 SVG 图解的方式帮助我们更直观理解知识。详情参见:《DeepSeek-R1 构建出高效学习Agent的?" data-itemshowtype="11" linktype="text" data-linktype="2">我是如何基于 DeepSeek-R1 构建出高效学习Agent的?》
五、观点
5.1 我发现的一些问题
5.2 关于 MCP 只是一种“过渡”的说法
很多人认为 MCP 只是一个过渡,因为目前 MCP 设计存在一些局限性,而且,尽管 MCP 获得了 OpenAI、Google 等大厂的支持,但其成为永久行业标准仍存在不确定性。
我认为,MCP 确实存在一些缺点,但,MCP 确实为大模型更好地调用工具提供了一个非常好的协议。大模型想要做更复杂发挥出更大价值必然要学会使用工具,模型上下文协议非常有必要,只是未必一定是 Anthropic 这个版本。
MCP 可能是一个过渡,但这不是问题。其实 RAG 也存在诸多问题,可能也是一个过渡。其实,从更大尺度来看,我们以前用的电话、功能机、现在用的这些传统软件都是一种过渡。人,总是有时代局限性,比如我们手动挡的汽车和现在的自动驾驶没法比,也是一种过渡,但不妨碍它能够真正帮助到我们。
5.3 展望
当前,大模型现在还很难通过 MCP 实现人类一样的操作。比如 PPT 制作、视频剪辑,大模型还不能通过 MCP 实现类似真正和人类一样的智能的 “RPA”操作。
随着越来越多的服务支持 MCP,随着模型的服务不断增强,面向 MCP 的业务流程编排会或许成为主流。随着 AI 使用工具的能力不断增强,未来,能够带来的帮助也会更大。
图源:https://www.dailydoseofds.com/p/a-visual-guide-to-agent2agent-a2a-protocol/
MCP 试图在解决模型使用工具的问题(就像人可以使用扳手、可以开车、可以使用的电脑等)。但是,想要完成非常复杂的事情,智能体之间必然需要协同(就像上下级之间的管理和执行,同事之间分工合作),智能体之间的标准协议非常重要。谷歌最近发布的 A2A 协议则试图解决智能体之间通信的协议问题。正如上图所示,两者可以结合使用,MCP 用户服务的注册和发现, A2A 用户智能体之间的通信。
AI 技术的发展比想象地要更快,正如 ChatGPT 刚出来时,很多人说它永远不会取代我们,它的知识不会更新,现在 AI 搜索、RAG 已经成为常态。
现在,模型虽然存在速度慢的问题,存在上下文长度限制问题,存在幻觉的问题,存在好用模型价格高的问题等,这些都将逐渐得到解决。 AI 将会更好地使用工具,Agent 也将更加智能, Agent 之间的协同也将更加通畅。
通义千问和LangChain搭建对话服务
结合通义千问和LangChain技术构建高效的对话模型,该模型基于自然语言处理技术提升语义理解和用户交互体验。
点击阅读原文查看详情。
53AI,企业落地大模型首选服务商
产品:场景落地咨询+大模型应用平台+行业解决方案
承诺:免费POC验证,效果达标后再合作。零风险落地应用大模型,已交付160+中大型企业
2026-07-01
一文了解|SkillScan 智能体技能安全扫描最佳实践
2026-07-01
协作的逆向演进:从 Agent 逻辑重构团队管理
2026-07-01
港科大郭毅可谈Agentic AI时代的核心命题:人机共生,人不可能退场
2026-07-01
Sonnet 5终于来了,然而Opus 4.8现在有点尴尬
2026-07-01
AI可观测性:Prompt、Tool Call、Trace、Token全链路追踪
2026-07-01
AI Infra 全景图:Agent Framework、调度、编排、沙箱、记忆管理、Tracing 分层拆解
2026-07-01
Claude Science发布:60+科学数据库一个对话搞定
2026-07-01
AI 的向量空间里藏着心理学,这是一场嵌入模型的情绪对决
2026-04-15
2026-04-07
2026-04-07
2026-04-24
2026-04-17
2026-04-05
2026-04-05
2026-04-14
2026-04-24
2026-04-22
欢迎您使用【53AI 官方网站】(以下简称“本网站”或“我们”)。本《会员服务协议》(以下简称“本协议”)是您(以下简称“会员”或“用户”)与【深圳市博思协创网络科技有限公司】之间关于注册、登录及使用本网站会员服务所订立的法律协议。
在您注册或登录前,请务必审慎阅读、充分理解各条款内容,特别是免除或限制责任的条款、知识产权条款、争议解决条款等。此类条款将以加粗形式提示您注意。 当您通过微信公众号授权、手机验证码验证或其他方式成功登录本网站时,即视为您已完全理解并同意接受本协议的全部内容。
一、 定义
本网站:指由【深圳市博思协创网络科技有限公司】运营的,域名为【53ai.com】的网站及相关移动端页面。
会员服务:指本网站向注册会员提供的知识库文章查阅、内容检索及其他相关增值服务。
知识库内容:指本网站发布的包括但不限于文字、图表、数据、研究报告、行业分析等数字化内容资源。
二、 账号注册与登录
登录方式:本网站支持以下登录方式,您可根据实际情况选择:
微信公众号授权登录:您同意将您的微信OpenID信息授权给本网站,用于创建或关联会员账号。
手机验证码登录:您需提供真实有效的手机号码,并通过短信验证码完成身份验证与登录/注册。
账号安全:您的账号仅限您本人使用,禁止赠与、借用、租用、转让或售卖。因您保管不善导致的账号被盗、密码泄露等损失,由您自行承担。
实名认证:根据相关法律法规要求,我们可能要求您在特定功能下完成实名认证。如您拒绝提供,可能无法使用部分或全部服务。
未成年人保护:若您未满18周岁,请在法定监护人的陪同下阅读本协议,并在征得监护人同意后使用本服务。
三、 服务内容与规范
知识库查阅权限:会员登录后,有权按照其会员等级对应的权限范围,在线浏览、检索本网站知识库中的相关文章及内容。
服务变更:我们有权根据业务发展需要,调整、变更或终止部分服务内容,并将以网站公告、公众号消息等方式提前通知。
禁止行为:您在使用服务时不得实施以下行为:
利用技术手段批量爬取、下载、转存知识库内容;
将知识库内容用于商业目的或未经授权地向第三方传播;
干扰本网站正常运行或侵犯其他用户合法权益;
发布违法违规信息或从事违反公序良俗的活动。
四、 知识产权声明
权利归属:本网站知识库中的排版设计、软件代码等内容的知识产权均归【公司全称】或原权利人所有,受《中华人民共和国著作权法》等法律保护。
有限许可:本网站授予会员一项非独占、不可转让、不可转授权的普通许可,仅限于个人学习、研究之目的在线查阅知识库内容。
侵权追责:未经书面许可,任何单位或个人不得以任何形式复制、转载、摘编、镜像、汇编或以其他方式使用上述内容。一经发现,我们保留追究其法律责任的权利。
五、 个人信息保护
我们重视对您个人信息的保护。关于我们如何收集、使用、存储和保护您的个人信息,请单独阅读 《隐私政策》。
您通过微信公众号授权或手机号验证所提供的信息,我们将严格按照《个人信息保护法》的规定处理,仅用于身份识别、服务提供及安全验证等必要用途。
您可以随时通过网站设置或联系客服行使查阅、更正、删除个人信息及撤回授权同意的权利。
六、 免责声明
内容准确性:知识库内容仅供参考,不构成专业建议。我们不对其完整性、准确性、时效性作任何明示或暗示的保证,您应自行判断并承担使用风险。
不可抗力:因自然灾害、政策法规变化、网络故障、第三方平台接口异常(如微信接口维护、运营商短信通道故障)等不可抗力导致的服务中断或延迟,我们不承担违约责任。
第三方链接:本网站可能包含指向第三方网站的链接,该等网站的内容和服务不受我们控制,请您自行甄别风险。
七、 违约责任
如您违反本协议约定,我们有权视情节采取警告、限制功能、暂停服务、注销账号等措施,并保留要求赔偿损失的权利。
如因您的违约行为导致我们遭受行政处罚、第三方索赔或商誉损失,您应承担全部赔偿责任(包括但不限于罚款、赔偿金、律师费、公证费等)。
八、 法律适用与争议解决
本协议的订立、执行和解释均适用中华人民共和国大陆地区法律。
因本协议产生的或与本协议有关的任何争议,双方应友好协商解决;协商不成的,任何一方均可向【公司所在地】有管辖权的人民法院提起诉讼。
九、 其他
本协议构成双方就本服务达成的完整协议,取代此前任何口头或书面约定。
本协议任一条款被认定为无效或不可执行的,不影响其他条款的效力。
我们对本协议享有最终解释权,并在法律允许的范围内保留随时修改的权利。修改后的协议一经公布即生效,继续使用服务即视为同意修订内容。