Model Context Protocol模型上下文协议
Developed by开发者Anthropic人择
Introduced引入November 25, 20242024年11月25日
Website网站modelcontextprotocol.io
Relationship between MCP client and server MCP 客户端与服务器的关系

The Model Context Protocol (MCP) is an open standard, open-source framework introduced by Anthropic in November 2024 to standardize the way artificial intelligence (AI) models like large language models (LLMs) integrate and share data with external tools, systems, and data sources.[1] Technology writers have dubbed MCP “the USB-C of AI apps”,[2] underscoring its goal of serving as a universal connector between language-model agents and external software. Designed to standardize context exchange between AI assistants and software environments, MCP provides a model-agnostic universal interface for reading files, executing functions, and handling contextual prompts.[3] It was officially announced and open-sourced by Anthropic in November 2024, with subsequent adoption by major AI providers including OpenAI and Google DeepMind.[4][5]
模型上下文协议 ( MCP ) 是由 Anthropic 于 2024 年 11 月推出的开放标准 开源框架 ,旨在标准化大型语言模型 (LLM) 等人工智能 (AI) 模型与外部工具、系统和数据源集成和共享数据的方式。 [ 1 ] 科技作家将 MCP 称为“AI 应用的 USB-C ”, [ 2 ] 强调了其作为语言模型代理和外部软件之间的通用连接器的目标。MCP 旨在标准化 AI 助手和软件环境之间的上下文交换,它提供了一个与模型无关的通用接口,用于读取文件、执行函数和处理上下文提示。 [ 3 ] 它于 2024 年 11 月由 Anthropic 正式宣布并开源,随后被包括 OpenAIGoogle DeepMind 在内的主要 AI 提供商采用。 [ 4 ] [ 5 ]

Background背景

The protocol was announced in November 2024 as an open standard[6] for connecting AI assistants to data systems such as content repositories, business management tools, and development environments.[7] It addresses the challenge of information silos and legacy systems that constrain even the most sophisticated AI models.[7]
该协议于 2024 年 11 月宣布,作为一项开放标准 [ 6 ] , 用于将人工智能助手连接到内容存储库 业务管理工具开发环境等数据系统。 [ 7 ] 它解决了信息孤岛遗留系统的挑战,这些挑战甚至制约了最复杂的人工智能模型。 [ 7 ]

Anthropic introduced MCP to address the growing complexity of integrating LLMs with third-party systems. Before MCP, developers often had to build custom connectors for each data source or tool, resulting in what Anthropic described as an "N×M" data integration problem.[7]
Anthropic 推出 MCP 是为了解决 LLM 与第三方系统集成日益复杂的问题。 在 MCP 推出之前,开发人员通常必须为每个数据源或工具构建自定义连接器,这导致了 Anthropic 所描述的“N×M” 数据集成问题。 [ 7 ]

Earlier stop-gap approaches - such as OpenAI’s 2023 “function-calling” API and the ChatGPT plug-in framework - solved similar problems but required vendor-specific connectors.[2] MCP’s authors note that the protocol deliberately re-uses the message-flow ideas of the Language Server Protocol (LSP) and is transported over JSON-RPC 2.0.[8]
早期的权宜之计——例如 OpenAI 于 2023 年提出的“函数调用” API 和 ChatGPT 插件框架——解决了类似的问题,但需要特定于供应商的连接器。 [ 2 ] MCP 的作者指出,该协议特意重用了语言服务器协议 (LSP) 的消息流思想,并通过 JSON-RPC 2.0 进行传输。 [ 8 ]

MCP was designed as a response to this challenge, offering a universal protocol for interfacing any AI assistant with any structured tool or data layer. The protocol was released with software development kits (SDK) in multiple programming languages, including Python, TypeScript, Java, and C#.[9]
MCP 的设计正是为了应对这一挑战,它提供了一个通用协议,用于将任何 AI 助手与任何结构化工具或数据层连接起来。该协议随多种编程语言软件开发工具包 (SDK) 一起发布,包括 PythonTypeScriptJavaC#[ 9 ]

Features特征

MCP defines a standardized framework for integrating AI systems with external data sources and tools. It includes specifications for data ingestion and transformation, contextual metadata tagging, and model interoperability across different platforms. The protocol also supports secure, bidirectional connections between data sources and AI-powered tools.[7]
MCP 定义了一个标准化框架,用于集成 AI 系统与外部数据源和工具。它包含数据提取转换 、上下文元数据标记以及跨不同平台模型互操作性的规范。该协议还支持数据源和 AI 工具之间的安全双向连接。 [ 7 ]

MCP enables developers to expose their data via MCP servers or to develop AI applications—referred to as MCP clients—that connect to these servers.[7] Key components of the protocol include a formal protocol specification and software development kits (SDKs), local MCP server support in Claude Desktop applications, and an open-source repository of MCP server implementations.[7]
MCP 使开发人员能够通过 MCP 服务器公开其数据,或开发连接到这些服务器的 AI 应用程序(称为 MCP 客户端)。 [ 7 ] 该协议的关键组件包括正式的协议规范和软件开发工具包 (SDK)、 Claude Desktop 应用程序中的本地 MCP 服务器支持,以及 MCP 服务器实现的开源存储库 [ 7 ]

Applications应用

MCP has been applied applied in domains such as software development, business process automation, and natural language automation.
MCP 已应用于软件开发、业务流程自动化和自然语言自动化等领域。

One prominent use case is in desktop assistants, where applications such as the Claude Desktop app deploy local MCP servers to enable secure access to system tools and user files. In enterprise settings, internal assistants are enhanced with MCP to retrieve data from proprietary documents, CRM systems, and internal knowledge bases—companies like Block have integrated MCP into their internal tooling for this purpose.[7]
一个突出的用例是桌面助手,其中 Claude Desktop 等应用程序部署了本地 MCP 服务器,以实现对系统工具和用户文件的安全访问。在企业环境中,MCP 增强了内部助手的功能,使其能够从专有文档、CRM 系统和内部知识库中检索数据——像 Block 这样的公司已经将 MCP 集成到其内部工具中以实现此目的。 [ 7 ]

MCP also plays a critical role in multi-tool agent workflows, allowing agentic AI systems to coordinate multiple tools—for example, combining document lookup with messaging APIs—to support advanced, chain-of-thought reasoning across distributed resources.
MCP 在多工具代理工作流中也发挥着关键作用,允许代理 AI 系统协调多种工具(例如,将文档查找与消息传递 API 相结合),以支持跨分布式资源的高级思路链推理。

In the field of natural language data access, MCP enables applications such as AI2SQL to bridge language models with structured databases, facilitating plain-language queries and efficient information retrieval from SQL systems.
在自然语言数据访问领域,MCP 使 AI2SQL 等应用程序能够将语言模型与结构化数据库连接起来,从而促进纯语言查询和从 SQL 系统中进行高效的信息检索。

The protocol has become increasingly common in software development tools. Integrated development environments (IDEs) like Zed, coding platforms such as Replit, and code intelligence tools like Sourcegraph have all adopted MCP to grant AI coding assistants real-time access to project context. This integration is especially valuable for workflows like "vibe coding," where continuous, adaptive assistance is essential.[6]
该协议在软件开发工具中越来越普遍。像 Zed 这样的集成开发环境 (IDE)、像 Replit 这样的编码平台以及像 Sourcegraph 这样的代码智能工具都采用了 MCP,让 AI 编码助手能够实时访问项目上下文。这种集成对于像“氛围编码”这样需要持续、自适应协助的工作流程尤其有价值。 [ 6 ]

In web application development, companies like Wix have embedded MCP servers into their platforms. This allows AI tools to interact with live website data, enabling dynamic content generation and on-the-fly edits. Such capabilities are central to Wix’s AI-driven development tools.[10][11]
在 Web 应用开发领域,像 Wix 这样的公司已将 MCP 服务器嵌入到其平台中。这使得 AI 工具能够与实时网站数据交互,从而实现动态内容生成和即时编辑。这些功能是 Wix AI 驱动开发工具的核心。 [ 10 ] [ 11 ]

Implementation执行

Anthropic maintains an open-source repository of reference MCP server implementations for popular enterprise systems including Google Drive, Slack, GitHub, Git, Postgres, Puppeteer and Stripe.[12] Developers can create custom MCP servers to connect proprietary systems or specialized data sources to AI models.[12] The protocol's open standard allows organizations to build tailored connections while maintaining compatibility with the broader MCP ecosystem. AI models can then leverage these custom connections to provide domain-specific assistance while respecting data access permissions.[7]
Anthropic 维护着一个开源存储库,其中包含适用于流行企业系统(包括 Google DriveSlackGitHubGitPostgresPuppeteerStripe) 的参考 MCP 服务器实现。 [ 12 ] 开发人员可以创建自定义 MCP 服务器,将专有系统或专用数据源连接到 AI 模型。 [ 12 ] 该协议的开放标准允许组织构建定制的连接,同时保持与更广泛的 MCP 生态系统的兼容性。然后,AI 模型可以利用这些自定义连接在尊重数据访问权限的同时提供特定于领域的帮助。 [ 7 ]

Adoption采用

In March 2025, OpenAI officially adopted the MCP, following a decision to integrate the standard across its products, including the ChatGPT desktop app, OpenAI's Agents SDK, and the Responses API. Altman described the adoption of MCP as a step toward standardizing AI tool connectivity. Prior to OpenAI's adoption, the potential benefits of MCP had been discussed extensively within the developer community, particularly for simplifying development in multi-model environments.[4][3]
2025 年 3 月, OpenAI 正式采用 MCP,并决定将该标准集成到其所有产品中,包括 ChatGPT 桌面应用程序、OpenAI 的 Agents SDK 和 Responses API。Altman 将 MCP 的采用描述为朝着标准化 AI 工具连接迈出的一步。在 OpenAI 采用 MCP 之前,开发者社区已广泛讨论了 MCP 的潜在优势,尤其是在简化多模型环境中的开发方面。 [ 4 ] [ 3 ]

By adopting MCP, OpenAI joins other organizations such as Block, Replit, and Sourcegraph in incorporating the protocol into their platforms. This wide adoption highlights MCP's potential to become a universal open standard for AI system connectivity and interoperability.[4] The rapid growth and broad community adoption of MCP are demonstrated by Glama's publicly available MCP server directory, which lists over 5,000 active MCP servers as of May 2025.[13] MCP can be integrated with Microsoft Semantic Kernel,[14] and Azure OpenAI.[15] MCP servers can be deployed to Cloudflare.[16]
通过采用 MCP,OpenAI 加入了 Block、Replit 和 Sourcegraph 等其他组织的行列,将该协议整合到各自的平台中。MCP 的广泛采用凸显了其成为人工智能系统连接和互操作性通用开放标准的潜力。 [ 4 ] Glama 公开的 MCP 服务器目录列出了截至 2025 年 5 月超过 5,000 台活跃的 MCP 服务器,证明了 MCP 的快速发展和广泛的社区采用。 [ 13 ] MCP 可以与 Microsoft Semantic Kernel [ 14 ]Azure OpenAI 集成。 [ 15 ] MCP 服务器可以部署到 Cloudflare[ 16 ]

Demis Hassabis, CEO of Google DeepMind, confirmed in April 2025 MCP support in the upcoming Gemini models and related infrastructure, describing the protocol as "rapidly becoming an open standard for the AI agentic era".[5]
谷歌 DeepMind 首席执行官 Demis Hassabis 于 2025 年 4 月确认,即将推出的 Gemini 模型和相关基础设施将支持 MCP,并称该协议“将迅速成为人工智能代理时代的开放标准”。 [ 5 ]

Many MCP servers have since been added, allowing integration of LLMs with diverse applications.[17]
此后,许多 MCP 服务器被添加,使得 LLM 能够与各种应用程序集成。 [ 17 ]

Reception接待

The Verge reported that MCP addresses a growing demand for AI agents that are contextually aware and capable of securely pulling from diverse sources.[6] The protocol's rapid uptake by OpenAI, Google DeepMind, and toolmakers like Zed and Sourcegraph suggests growing consensus around its utility.[4][18]
The Verge 报道,MCP 满足了人们对具有情境感知能力、能够安全地从不同来源获取数据的 AI 代理日益增长的需求。 [ 6 ] 该协议被 OpenAI、Google DeepMind 以及 Zed 和 Sourcegraph 等工具制造商迅速采用,表明人们越来越认同其实用性。 [ 4 ] [ 18 ]

In April 2025, security researchers released analysis that there are multiple outstanding security issues with MCP, including prompt injection,[19] tool permissions where combining tools can exfiltrate files,[20] and lookalike tools can silently replace trusted ones.[21]
2025 年 4 月,安全研究人员发布分析报告,指出 MCP 存在多个未解决的安全问题,包括提示注入 [ 19 ] 、工具权限(组合工具可窃取文件) [ 20 ] ,以及相似工具可悄悄替换受信任工具 [ 21 ]

It has been likened to OpenAPI, a similar specification that aims to describe APIs.[22][23]
它被比作 OpenAPI ,一个旨在描述 API 的类似规范。 [ 22 ] [ 23 ]

See also参见

References参考

  1. ^ David, Emilia (November 25, 2024). "Anthropic releases Model Context Protocol to standardize AI-data integration". VentureBeat. Retrieved 2025-05-12.
    David, Emilia (2024 年 11 月 25 日)。 “Anthropic 发布模型上下文协议,以标准化 AI 数据集成” 。VentureBeat 。检索日期: 2025-05-12 。
  2. ^ Jump up to: a b Edwards, Benj (1 April 2025). "MCP: The new "USB-C for AI" that's bringing fierce rivals together". Ars Technica. Retrieved 2025-05-24.
    Edwards, Benj (2025 年 4 月 1 日)。 “MCP:让激烈竞争对手走到一起的全新‘AI USB-C’”Ars Technica 。检索日期: 2025-05-24 。
  3. ^ Jump up to: a b Kumar, Vinay (March 26, 2025). "The open source Model Context Protocol was just updated — here's why it's a big deal". VentureBeat. Retrieved 2025-05-12.
    Kumar, Vinay (2025 年 3 月 26 日)。 “开源模型上下文协议刚刚更新——这才是它如此重要的原因” 。VentureBeat 。检索日期: 2025-05-12 。
  4. ^ Jump up to: a b c d Wiggers, Kyle (March 25, 2025). "OpenAI adopts rival Anthropic's standard for connecting AI models to data". TechCrunch.
    凯尔·威格斯 (2025 年 3 月 25 日)。 “OpenAI 采用竞争对手 Anthropic 的标准将 AI 模型与数据连接起来” 。TechCrunch
  5. ^ Jump up to: a b Wiggers, Kyle (April 9, 2025). "Google to embrace Anthropic's standard for connecting AI models to data". TechCrunch. Retrieved 2025-05-12.
    Wiggers, Kyle (2025 年 4 月 9 日)。 “谷歌将采用 Anthropic 的标准,将 AI 模型与数据连接起来” 。TechCrunch 。检索日期: 2025-05-12 。
  6. ^ Jump up to: a b c Roth, Emma (November 25, 2024). "Anthropic launches tool to connect AI systems directly to datasets". The Verge.
    艾玛·罗斯(2024 年 11 月 25 日)。 “Anthropic 推出将 AI 系统直接连接到数据集的工具” 。The Verge
  7. ^ Jump up to: a b c d e f g h "Introducing the Model Context Protocol". Anthropic. November 25, 2024. Retrieved 2025-05-12.
    “模型上下文协议简介” 。Anthropic。2024 年 11 月 25 日 。检索日期: 2025-05-12 。
  8. ^ "Model Context Protocol Specification (§Base Protocol)". modelcontextprotocol.io. 26 March 2025. Retrieved 2025-05-24.
    “模型上下文协议规范(§基础协议)”modelcontextprotocol.io 。2025 年 3 月 26 日 。检索日期: 2025-05-24 。
  9. ^ "Agents and tools: Model Context Protocol (MCP)". docs.anthropic.com.
    “代理和工具:模型上下文协议 (MCP)”docs.anthropic.com
  10. ^ "Wix just opened the door to quicker and easier coding with new AI tool". TechRadar Pro. March 27, 2025. Retrieved 2025-05-22.
    “Wix 刚刚通过新的 AI 工具开启了更快、更轻松编码的大门” 。TechRadar Pro。2025 年 3 月 27 日 。检索日期: 2025-05-22 。
  11. ^ "Wix Unveils the Wix Model Context Protocol Server for AI-Driven Web App Development". Enterprise AI World. March 27, 2024. Retrieved 2025-05-22.
    Wix 推出 Wix 模型上下文协议服务器,助力 AI 驱动的 Web 应用开发 。企业 AI 世界。2024 年 3 月 27 日 。检索日期: 2025-05-22 。
  12. ^ Jump up to: a b Bastian, Matthias (2024-11-25). "Anthropic's new open protocol lets AI systems tap into any data source". The Decoder. Retrieved 2025-06-14.
    Bastian, Matthias (2024 年 11 月 25 日)。 “Anthropic 的新开放协议让人工智能系统能够利用任何数据源” 解码器 。检索日期: 2025-06-14 。
  13. ^ "Glama MCP Server Directory". Retrieved 2025-05-21.
    “Glama MCP 服务器目录” 。检索日期: 2025-05-21 。
  14. ^ Wallace, Mark (March 5, 2025). "Integrating Model Context Protocol Tools with Semantic Kernel: A Step-by-Step Guide". Semantic Kernel Dev Blog, Microsoft. Retrieved 2025-05-12.
    Wallace, Mark (2025 年 3 月 5 日)。 “将模型上下文协议工具与语义内核集成:分步指南” 微软语义内核开发博客 。检索于 2025-05-12 。
  15. ^ mrajguru (March 16, 2025). "Model Context Protocol (MCP): Integrating Azure OpenAI for Enhanced Tool Integration and Prompting". AI - Azure AI services Blog, Microsoft. Retrieved 2025-05-12.
    mrajguru(2025 年 3 月 16 日)。 “模型上下文协议 (MCP):集成 Azure OpenAI 以增强工具集成和提示” 。AI - Azure AI 服务博客,微软 。检索于 2025-05-12 。
  16. ^ Brendan Irvine-Broque; Dina Kozlov; Glen Maddern (March 25, 2025). "Build and deploy Remote Model Context Protocol (MCP) servers to Cloudflare". Cloudflare. Retrieved 2025-05-12.
    Brendan Irvine-Broque;Dina Kozlov;Glen Maddern(2025 年 3 月 25 日)。 “构建远程模型上下文协议 (MCP) 服务器并将其部署到 Cloudflare” 。Cloudflare 。检索日期: 2025-05-12 。
  17. ^ Awan, Abid Ali. "10 Awesome MCP Servers". KDnuggets. Retrieved 2025-05-12.
    Awan, Abid Ali。 “10 款超棒的 MCP 服务器” 。KDnuggets 。检索日期: 2025-05-12 。
  18. ^ Sha, Arjun (April 14, 2025). "What is Model Context Protocol (MCP) Explained". Beebom.com.
    Sha, Arjun ( 2025 年 4 月 14 日)。 “模型上下文协议 (MCP) 解析” 。Beebom.com。
  19. ^ Lakshmanan, Ravie (30 April 2025). "Researchers Demonstrate How MCP Prompt Injection Can Be Used for Both Attack and Defense". thehackernews.com.
    Lakshmanan, Ravie(2025 年 4 月 30 日)。 “研究人员演示了 MCP 即时注入如何用于攻击和防御” 。thehackernews.com。
  20. ^ Beurer-Kellner, Luca; Fischer, Marc (1 April 2025). "MCP Security Notification: Tool Poisoning Attacks". InvariantLabs.
    Beurer-Kellner, Luca;Fischer, Marc (2025 年 4 月 1 日)。 “MCP 安全通知:工具中毒攻击” 。InvariantLabs。
  21. ^ Schulz, Kasimir; Martin, Jason; Kan, Marcus; Yeung, Kenneth; McCauley, Conor; Ring, Leo (10 April 2025). "MCP: Model Context Pitfalls in an Agentic World". hiddenlayer.com.
    舒尔茨,卡西米尔;马丁,杰森;肯,马库斯;杨,肯尼斯;麦考利,康纳;林,利奥(2025 年 4 月 10 日)。 “MCP:代理世界中的模型情境陷阱” 。hiddenlayer.com。
  22. ^ MacManus, Richard (13 March 2025). "MCP: The Missing Link Between AI Agents and APIs". The New Stack. Retrieved 29 May 2025.
    MacManus, Richard (2025 年 3 月 13 日)。 “MCP:AI 代理与 API 之间缺失的环节” 新栈 。检索日期:2025 年 29 May 。
  23. ^ Fanelli, Alessio. "Why MCP Won". www.latent.space. Retrieved 29 May 2025.

Further reading

External links