--- title: "MCP(Model Context Protocol)" type: entity tags: [ai, protocol, mcp, integration] last_updated: 2026-04-22 --- ## Overview MCP(Model Context Protocol,模型上下文协议)是一种支持将外部工具和服务集成到AI代理的协议平台,赋予AI代理更丰富的执行能力。 ## Aliases - Model Context Protocol - MCP ## Key Features - 将外部API和工具集成到AI代理 - 扩展AI代理的功能范围 - 支持添加和切换MCP服务器 - 提升开发项目的扩展性和操作能力 ## Applications - 在Cursor中集成外部工具和服务 - 扩展AI代理的技能边界 - 连接第三方API和数据源 ## Connections - [[Cursor]] — 支持MCP扩展的AI代码编辑器 - [[AI代理]] — MCP可集成的核心组件 - [[Vibe Coding]] — MCP增强AI辅助编程能力 ## Sources - [[cursor-2-0初学者使用指南]] - [[mcp在cursor中的集成与应用详解]] ## Protocol Architecture (detailed from MCP in Cursor Integration) - **Client-Server 架构**:MCP 由 MCP Server(服务提供方)和 MCP Client(调用方,如 Cursor)组成 - **三种功能接口**: - 资源获取(GET,类似 HTTP GET):用于读取外部数据源 - 工具调用(POST,类似 HTTP POST):用于触发外部工具执行 - Promise 提示词:用于异步交互和状态管理 - **接入方式**: - SSE(Server-Sent Events):服务端推送模式,适合在线 MCP 服务 - Command(命令行):本地执行命令方式,适合本地 MCP 服务 - **典型 MCP Server**:smisery 热点新闻服务(9个新闻来源)、Sequential Thinking 逻辑推理工具