概念
Anthropic 开源了一个革命性的新协议——MCP(模型上下文协议),有望彻底解决 LLM 应用连接数据难的痛点!它的目标是让前沿模型生成更好、更相关的响应。以后再也不用为每个数据源写定制的集成代码了,MCP 一个协议全搞定!
The Model Context Protocol (MCP) is an open protocol that enables seamless integration between LLM applications and external data sources and tools. Whether you're building an AI-powered IDE, enhancing a chat interface, or creating custom AI workflows, MCP provides a standardized way to connect LLMs with the context they need.
MCP 工作的方式和原理, 官方的文档已经说清清楚楚明明白白,但凡有丁点儿计算机常识是能够理解的。
-
MCP Hosts: Programs like Claude Desktop, IDEs, or AI tools that want to access data through MCP
-
MCP Clients: Protocol clients that maintain 1:1 connections with servers
-
MCP Servers: Lightweight programs that each expose specific capabilities through the standardized Model Context Protocol
-
Local Data Sources: Your computer’s files, databases, and services that MCP servers can securely access
-
Remote Services: External systems available over the internet (e.g., through APIs) that MCP servers can connect to
官方定义的这个MCP Servers是不是有点像个Sidecar 模式, 放在哪里没有问题, 中间的连接方式核心是这个 MCP.
我关注的是:
Protocol First, Specification Driven
这个protocol 不见得是最好、最优的,详细以Anthropic 号召力,业界必定很快跟上。 事实, langchain, spring ai 已经很快推出了, 如spring这个大图:
官方列出来的 Server已经有小100个, 我们熟悉的DB, Mysql, SQLite; Git, FileSystem, Google Server 等等。
几个随想
MCP 不是银弹,不能寄希望她解决所有的问题, 大模型“外挂”现在 RAG, Function Call, Tools, Web Search 都很好使也凑效;
难点在于用户意图识别,用户随机提问,如何找到匹配的外挂服务,想象百万GPTs, MCP 只是个协议,显然无法解决这个,就如HTTP协议能否解决你公司管理流程问题? Claude 现在通过本地配置(claude_desktop_config.json) , 和你手动选择插件或者角色('@' 或 '/')一个意思。
MCP 的一大亮点在于制定了一套标准且相对完善的协议,这对大模型和应用生态的协同具有重要的指导意义。想象下 Open API 对于各服务之间的通讯的价值和意义。 挑战是有多少人愿意接入MCP 协议?
参考 OpenAI 的 API 风格,依然成为这个行业设计标准。
值得跟一下....
Refer
-
https://mp.weixin.qq.com/s/k6t9SWzCGLRhWOfLmWjmOw Anthropic 重磅开源「模型上下文协议」MCP
-
https://mp.weixin.qq.com/s/blITLCReqoJKCogLc7kbfg Anthropic 新整的 MCP 协议是个啥?(漫画)
-
https://www.anthropic.com/news/model-context-protocol
-
https://modelcontextprotocol.io/llms-full.txt
-
https://github.com/modelcontextprotocol
-
https://modelcontextprotocol.io/quickstart#need-to-install-the-prerequisites
-
https://modelcontextprotocol.io/introduction
-
https://github.com/modelcontextprotocol/servers
-
https://learn.microsoft.com/zh-cn/visualstudio/extensibility/language-server-protocol?view=vs-2022
AI 入门
快速开启 - ApiHug如何在15分钟内,使用 ApiHug 启动一个API开发项目.https://apihug.com/zhCN-docs/startApiHug - API design Copilot - IntelliJ IDEs Plugin | Marketplace
https://plugins.jetbrains.com/plugin/23534-apihug--api-design-copilot