Files
myWiki/concepts/mcp-protocol.md

55 lines
1.7 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
title: "MCP 协议 — Model Context Protocol"
created: 2026-06-19
updated: 2026-06-19
type: concept
tags: [mcp, protocol, tool-integration, json-rpc, standardization]
sources:
- https://arxiv.org/abs/2506.01056
- https://github.com/modelcontextprotocol/servers
---
# MCP 协议Model Context Protocol
## 定义
Model Context Protocol (MCP) 是 2024 年引入的**开放标准**,通过 JSON-RPC 消息交换为 LLM 提供安全、统一的工具和服务访问接口。解决了不同平台需要自定义连接器和专有协议的碎片化问题。
## 核心设计
- 基于 **JSON-RPC** 的消息交换
- 标准化接口:所有 server 和 tool 必须提供描述性文档
- Server 层面:平台/权限域(如 filesystem, github, database
- Tool 层面:具体操作(如 read_file, search_repos
## 生态规模
MCP-Zero 论文构建的 MCP-tools 数据集显示:
- **308** 个 MCP servers
- **2,797** 个 tools
- 全量 tool schema 约 **248.1K tokens**
## MCP 解决了什么
| 问题 | MCP 解法 |
|------|---------|
| 平台碎片化 | 统一 JSON-RPC 接口 |
| 工具可达性 | 标准化的发现和调用机制 |
| 集成摩擦 | 无需自定义连接器 |
## MCP 没解决什么
MCP 解决了**互操作性**问题,但**未解决过程性问题**
- 有 300 个 server 可用 → 该用哪个?
- 即使知道 server该调用哪个 tool
- 多步任务需要跨 server 的 toolchain → 如何编排?
这正是 [[active-tool-discovery|MCP-Zero]] 切入的方向——在 MCP 基础上增加**主动发现**层。
## 参考
- [[active-tool-discovery|主动工具发现]]
- [[fei-mcp-zero-2025|MCP-Zero 论文]]
- [[agent-skill|Agent Skill]]skill 是 MCP 之上的过程层)
- [[mcp-tools-dataset|MCP-tools 数据集]]