📦 GitHub: https://github.com/geekchow/mcp-explain
🇬🇧 English version: mcp-guide/00-overview.md | 📦 GitHub: https://github.com/geekchow/mcp-explain
你在哪里: 整个系列的入口。 读完本文你会知道: 这份指南覆盖了什么、一张图看清全部概念、以及应该按什么顺序阅读。
这份指南解释 MCP(Model Context Protocol,模型上下文协议):不是从定义讲起,而是先重建"它为什么必须被发明出来"的推理链条,然后逐层深入每一个组件——全程以一个真实的 Claude Code 工作场景作为贯穿始终的主线。
缩写对照表
| MCP | Model Context Protocol | 模型上下文协议:本文主题,让 AI 应用与外部工具、数据对话的标准协议 |
| LLM | Large Language Model | 大语言模型(本文场景中即 Claude) |
| JSON-RPC | JavaScript Object Notation — Remote Procedure Call | MCP 的底层消息格式(2.0 版) |
| API | Application Programming Interface | 应用程序编程接口 |
| SDK | Software Development Kit | 软件开发工具包,此处指 MCP 官方库(TypeScript、Python 等) |
| CLI | Command-Line Interface | 命令行界面,即终端里敲的 claude 命令 |
| stdio | Standard Input / Standard Output | 标准输入/标准输出:本地传输方式,服务器作为子进程,消息走它的 stdin/stdout |
| HTTP | HyperText Transfer Protocol | 超文本传输协议,远程传输方式的载体 |
| SSE | Server-Sent Events | 服务器发送事件:MCP 用它把服务器→客户端的消息推过来 |
| URI | Uniform Resource Identifier | 统一资源标识符,MCP 用它命名资源,如 schema://orders/tables |
| OAuth | Open Authorization | 开放授权框架(2.1 版),远程 MCP 服务器的鉴权方式 |
| RPC | Remote Procedure Call | 远程过程调用 |
| SQL | Structured Query Language | 结构化查询语言,示例服务器用它访问数据库 |
| TLS | Transport Layer Security | 传输层安全协议,HTTP 传输的加密层 |
| PKCE | Proof Key for Code Exchange | 授权码交换证明密钥,保护 OAuth 授权码流程的扩展 |
| DDL | Data Definition Language | 数据定义语言,即建表语句 |
| CI | Continuous Integration | 持续集成 |
| LSP | Language Server Protocol | 语言服务器协议,MCP 的直系精神前辈 |
一张图看清全部疆域
#mermaid-svg-IA6MOyjKxe5XTwCP{font-family:\”trebuchet ms\”,verdana,arial,sans-serif;font-size:16px;fill:#333;}@keyframes edge-animation-frame{from{stroke-dashoffset:0;}}@keyframes dash{to{stroke-dashoffset:0;}}#mermaid-svg-IA6MOyjKxe5XTwCP .edge-animation-slow{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 50s linear infinite;stroke-linecap:round;}#mermaid-svg-IA6MOyjKxe5XTwCP .edge-animation-fast{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 20s linear infinite;stroke-linecap:round;}#mermaid-svg-IA6MOyjKxe5XTwCP .error-icon{fill:#552222;}#mermaid-svg-IA6MOyjKxe5XTwCP .error-text{fill:#552222;stroke:#552222;}#mermaid-svg-IA6MOyjKxe5XTwCP .edge-thickness-normal{stroke-width:1px;}#mermaid-svg-IA6MOyjKxe5XTwCP .edge-thickness-thick{stroke-width:3.5px;}#mermaid-svg-IA6MOyjKxe5XTwCP .edge-pattern-solid{stroke-dasharray:0;}#mermaid-svg-IA6MOyjKxe5XTwCP .edge-thickness-invisible{stroke-width:0;fill:none;}#mermaid-svg-IA6MOyjKxe5XTwCP .edge-pattern-dashed{stroke-dasharray:3;}#mermaid-svg-IA6MOyjKxe5XTwCP .edge-pattern-dotted{stroke-dasharray:2;}#mermaid-svg-IA6MOyjKxe5XTwCP .marker{fill:#333333;stroke:#333333;}#mermaid-svg-IA6MOyjKxe5XTwCP .marker.cross{stroke:#333333;}#mermaid-svg-IA6MOyjKxe5XTwCP svg{font-family:\”trebuchet ms\”,verdana,arial,sans-serif;font-size:16px;}#mermaid-svg-IA6MOyjKxe5XTwCP p{margin:0;}#mermaid-svg-IA6MOyjKxe5XTwCP .edge{stroke-width:3;}#mermaid-svg-IA6MOyjKxe5XTwCP .section–1 rect,#mermaid-svg-IA6MOyjKxe5XTwCP .section–1 path,#mermaid-svg-IA6MOyjKxe5XTwCP .section–1 circle,#mermaid-svg-IA6MOyjKxe5XTwCP .section–1 polygon,#mermaid-svg-IA6MOyjKxe5XTwCP .section–1 path{fill:hsl(240, 100%, 76.2745098039%);}#mermaid-svg-IA6MOyjKxe5XTwCP .section–1 text{fill:#ffffff;}#mermaid-svg-IA6MOyjKxe5XTwCP .node-icon–1{font-size:40px;color:#ffffff;}#mermaid-svg-IA6MOyjKxe5XTwCP .section-edge–1{stroke:hsl(240, 100%, 76.2745098039%);}#mermaid-svg-IA6MOyjKxe5XTwCP .edge-depth–1{stroke-width:17;}#mermaid-svg-IA6MOyjKxe5XTwCP .section–1 line{stroke:hsl(60, 100%, 86.2745098039%);stroke-width:3;}#mermaid-svg-IA6MOyjKxe5XTwCP .disabled,#mermaid-svg-IA6MOyjKxe5XTwCP .disabled circle,#mermaid-svg-IA6MOyjKxe5XTwCP .disabled text{fill:lightgray;}#mermaid-svg-IA6MOyjKxe5XTwCP .disabled text{fill:#efefef;}#mermaid-svg-IA6MOyjKxe5XTwCP .section-0 rect,#mermaid-svg-IA6MOyjKxe5XTwCP .section-0 path,#mermaid-svg-IA6MOyjKxe5XTwCP .section-0 circle,#mermaid-svg-IA6MOyjKxe5XTwCP .section-0 polygon,#mermaid-svg-IA6MOyjKxe5XTwCP .section-0 path{fill:hsl(60, 100%, 73.5294117647%);}#mermaid-svg-IA6MOyjKxe5XTwCP .section-0 text{fill:black;}#mermaid-svg-IA6MOyjKxe5XTwCP .node-icon-0{font-size:40px;color:black;}#mermaid-svg-IA6MOyjKxe5XTwCP .section-edge-0{stroke:hsl(60, 100%, 73.5294117647%);}#mermaid-svg-IA6MOyjKxe5XTwCP .edge-depth-0{stroke-width:14;}#mermaid-svg-IA6MOyjKxe5XTwCP .section-0 line{stroke:hsl(240, 100%, 83.5294117647%);stroke-width:3;}#mermaid-svg-IA6MOyjKxe5XTwCP .disabled,#mermaid-svg-IA6MOyjKxe5XTwCP .disabled circle,#mermaid-svg-IA6MOyjKxe5XTwCP .disabled text{fill:lightgray;}#mermaid-svg-IA6MOyjKxe5XTwCP .disabled text{fill:#efefef;}#mermaid-svg-IA6MOyjKxe5XTwCP .section-1 rect,#mermaid-svg-IA6MOyjKxe5XTwCP .section-1 path,#mermaid-svg-IA6MOyjKxe5XTwCP .section-1 circle,#mermaid-svg-IA6MOyjKxe5XTwCP .section-1 polygon,#mermaid-svg-IA6MOyjKxe5XTwCP .section-1 path{fill:hsl(80, 100%, 76.2745098039%);}#mermaid-svg-IA6MOyjKxe5XTwCP .section-1 text{fill:black;}#mermaid-svg-IA6MOyjKxe5XTwCP .node-icon-1{font-size:40px;color:black;}#mermaid-svg-IA6MOyjKxe5XTwCP .section-edge-1{stroke:hsl(80, 100%, 76.2745098039%);}#mermaid-svg-IA6MOyjKxe5XTwCP .edge-depth-1{stroke-width:11;}#mermaid-svg-IA6MOyjKxe5XTwCP .section-1 line{stroke:hsl(260, 100%, 86.2745098039%);stroke-width:3;}#mermaid-svg-IA6MOyjKxe5XTwCP .disabled,#mermaid-svg-IA6MOyjKxe5XTwCP .disabled circle,#mermaid-svg-IA6MOyjKxe5XTwCP .disabled text{fill:lightgray;}#mermaid-svg-IA6MOyjKxe5XTwCP .disabled text{fill:#efefef;}#mermaid-svg-IA6MOyjKxe5XTwCP .section-2 rect,#mermaid-svg-IA6MOyjKxe5XTwCP .section-2 path,#mermaid-svg-IA6MOyjKxe5XTwCP .section-2 circle,#mermaid-svg-IA6MOyjKxe5XTwCP .section-2 polygon,#mermaid-svg-IA6MOyjKxe5XTwCP .section-2 path{fill:hsl(270, 100%, 76.2745098039%);}#mermaid-svg-IA6MOyjKxe5XTwCP .section-2 text{fill:#ffffff;}#mermaid-svg-IA6MOyjKxe5XTwCP .node-icon-2{font-size:40px;color:#ffffff;}#mermaid-svg-IA6MOyjKxe5XTwCP .section-edge-2{stroke:hsl(270, 100%, 76.2745098039%);}#mermaid-svg-IA6MOyjKxe5XTwCP .edge-depth-2{stroke-width:8;}#mermaid-svg-IA6MOyjKxe5XTwCP .section-2 line{stroke:hsl(90, 100%, 86.2745098039%);stroke-width:3;}#mermaid-svg-IA6MOyjKxe5XTwCP .disabled,#mermaid-svg-IA6MOyjKxe5XTwCP .disabled circle,#mermaid-svg-IA6MOyjKxe5XTwCP .disabled text{fill:lightgray;}#mermaid-svg-IA6MOyjKxe5XTwCP .disabled text{fill:#efefef;}#mermaid-svg-IA6MOyjKxe5XTwCP .section-3 rect,#mermaid-svg-IA6MOyjKxe5XTwCP .section-3 path,#mermaid-svg-IA6MOyjKxe5XTwCP .section-3 circle,#mermaid-svg-IA6MOyjKxe5XTwCP .section-3 polygon,#mermaid-svg-IA6MOyjKxe5XTwCP .section-3 path{fill:hsl(300, 100%, 76.2745098039%);}#mermaid-svg-IA6MOyjKxe5XTwCP .section-3 text{fill:black;}#mermaid-svg-IA6MOyjKxe5XTwCP .node-icon-3{font-size:40px;color:black;}#mermaid-svg-IA6MOyjKxe5XTwCP .section-edge-3{stroke:hsl(300, 100%, 76.2745098039%);}#mermaid-svg-IA6MOyjKxe5XTwCP .edge-depth-3{stroke-width:5;}#mermaid-svg-IA6MOyjKxe5XTwCP .section-3 line{stroke:hsl(120, 100%, 86.2745098039%);stroke-width:3;}#mermaid-svg-IA6MOyjKxe5XTwCP .disabled,#mermaid-svg-IA6MOyjKxe5XTwCP .disabled circle,#mermaid-svg-IA6MOyjKxe5XTwCP .disabled text{fill:lightgray;}#mermaid-svg-IA6MOyjKxe5XTwCP .disabled text{fill:#efefef;}#mermaid-svg-IA6MOyjKxe5XTwCP .section-4 rect,#mermaid-svg-IA6MOyjKxe5XTwCP .section-4 path,#mermaid-svg-IA6MOyjKxe5XTwCP .section-4 circle,#mermaid-svg-IA6MOyjKxe5XTwCP .section-4 polygon,#mermaid-svg-IA6MOyjKxe5XTwCP .section-4 path{fill:hsl(330, 100%, 76.2745098039%);}#mermaid-svg-IA6MOyjKxe5XTwCP .section-4 text{fill:black;}#mermaid-svg-IA6MOyjKxe5XTwCP .node-icon-4{font-size:40px;color:black;}#mermaid-svg-IA6MOyjKxe5XTwCP .section-edge-4{stroke:hsl(330, 100%, 76.2745098039%);}#mermaid-svg-IA6MOyjKxe5XTwCP .edge-depth-4{stroke-width:2;}#mermaid-svg-IA6MOyjKxe5XTwCP .section-4 line{stroke:hsl(150, 100%, 86.2745098039%);stroke-width:3;}#mermaid-svg-IA6MOyjKxe5XTwCP .disabled,#mermaid-svg-IA6MOyjKxe5XTwCP .disabled circle,#mermaid-svg-IA6MOyjKxe5XTwCP .disabled text{fill:lightgray;}#mermaid-svg-IA6MOyjKxe5XTwCP .disabled text{fill:#efefef;}#mermaid-svg-IA6MOyjKxe5XTwCP .section-5 rect,#mermaid-svg-IA6MOyjKxe5XTwCP .section-5 path,#mermaid-svg-IA6MOyjKxe5XTwCP .section-5 circle,#mermaid-svg-IA6MOyjKxe5XTwCP .section-5 polygon,#mermaid-svg-IA6MOyjKxe5XTwCP .section-5 path{fill:hsl(0, 100%, 76.2745098039%);}#mermaid-svg-IA6MOyjKxe5XTwCP .section-5 text{fill:black;}#mermaid-svg-IA6MOyjKxe5XTwCP .node-icon-5{font-size:40px;color:black;}#mermaid-svg-IA6MOyjKxe5XTwCP .section-edge-5{stroke:hsl(0, 100%, 76.2745098039%);}#mermaid-svg-IA6MOyjKxe5XTwCP .edge-depth-5{stroke-width:-1;}#mermaid-svg-IA6MOyjKxe5XTwCP .section-5 line{stroke:hsl(180, 100%, 86.2745098039%);stroke-width:3;}#mermaid-svg-IA6MOyjKxe5XTwCP .disabled,#mermaid-svg-IA6MOyjKxe5XTwCP .disabled circle,#mermaid-svg-IA6MOyjKxe5XTwCP .disabled text{fill:lightgray;}#mermaid-svg-IA6MOyjKxe5XTwCP .disabled text{fill:#efefef;}#mermaid-svg-IA6MOyjKxe5XTwCP .section-6 rect,#mermaid-svg-IA6MOyjKxe5XTwCP .section-6 path,#mermaid-svg-IA6MOyjKxe5XTwCP .section-6 circle,#mermaid-svg-IA6MOyjKxe5XTwCP .section-6 polygon,#mermaid-svg-IA6MOyjKxe5XTwCP .section-6 path{fill:hsl(30, 100%, 76.2745098039%);}#mermaid-svg-IA6MOyjKxe5XTwCP .section-6 text{fill:black;}#mermaid-svg-IA6MOyjKxe5XTwCP .node-icon-6{font-size:40px;color:black;}#mermaid-svg-IA6MOyjKxe5XTwCP .section-edge-6{stroke:hsl(30, 100%, 76.2745098039%);}#mermaid-svg-IA6MOyjKxe5XTwCP .edge-depth-6{stroke-width:-4;}#mermaid-svg-IA6MOyjKxe5XTwCP .section-6 line{stroke:hsl(210, 100%, 86.2745098039%);stroke-width:3;}#mermaid-svg-IA6MOyjKxe5XTwCP .disabled,#mermaid-svg-IA6MOyjKxe5XTwCP .disabled circle,#mermaid-svg-IA6MOyjKxe5XTwCP .disabled text{fill:lightgray;}#mermaid-svg-IA6MOyjKxe5XTwCP .disabled text{fill:#efefef;}#mermaid-svg-IA6MOyjKxe5XTwCP .section-7 rect,#mermaid-svg-IA6MOyjKxe5XTwCP .section-7 path,#mermaid-svg-IA6MOyjKxe5XTwCP .section-7 circle,#mermaid-svg-IA6MOyjKxe5XTwCP .section-7 polygon,#mermaid-svg-IA6MOyjKxe5XTwCP .section-7 path{fill:hsl(90, 100%, 76.2745098039%);}#mermaid-svg-IA6MOyjKxe5XTwCP .section-7 text{fill:black;}#mermaid-svg-IA6MOyjKxe5XTwCP .node-icon-7{font-size:40px;color:black;}#mermaid-svg-IA6MOyjKxe5XTwCP .section-edge-7{stroke:hsl(90, 100%, 76.2745098039%);}#mermaid-svg-IA6MOyjKxe5XTwCP .edge-depth-7{stroke-width:-7;}#mermaid-svg-IA6MOyjKxe5XTwCP .section-7 line{stroke:hsl(270, 100%, 86.2745098039%);stroke-width:3;}#mermaid-svg-IA6MOyjKxe5XTwCP .disabled,#mermaid-svg-IA6MOyjKxe5XTwCP .disabled circle,#mermaid-svg-IA6MOyjKxe5XTwCP .disabled text{fill:lightgray;}#mermaid-svg-IA6MOyjKxe5XTwCP .disabled text{fill:#efefef;}#mermaid-svg-IA6MOyjKxe5XTwCP .section-8 rect,#mermaid-svg-IA6MOyjKxe5XTwCP .section-8 path,#mermaid-svg-IA6MOyjKxe5XTwCP .section-8 circle,#mermaid-svg-IA6MOyjKxe5XTwCP .section-8 polygon,#mermaid-svg-IA6MOyjKxe5XTwCP .section-8 path{fill:hsl(150, 100%, 76.2745098039%);}#mermaid-svg-IA6MOyjKxe5XTwCP .section-8 text{fill:black;}#mermaid-svg-IA6MOyjKxe5XTwCP .node-icon-8{font-size:40px;color:black;}#mermaid-svg-IA6MOyjKxe5XTwCP .section-edge-8{stroke:hsl(150, 100%, 76.2745098039%);}#mermaid-svg-IA6MOyjKxe5XTwCP .edge-depth-8{stroke-width:-10;}#mermaid-svg-IA6MOyjKxe5XTwCP .section-8 line{stroke:hsl(330, 100%, 86.2745098039%);stroke-width:3;}#mermaid-svg-IA6MOyjKxe5XTwCP .disabled,#mermaid-svg-IA6MOyjKxe5XTwCP .disabled circle,#mermaid-svg-IA6MOyjKxe5XTwCP .disabled text{fill:lightgray;}#mermaid-svg-IA6MOyjKxe5XTwCP .disabled text{fill:#efefef;}#mermaid-svg-IA6MOyjKxe5XTwCP .section-9 rect,#mermaid-svg-IA6MOyjKxe5XTwCP .section-9 path,#mermaid-svg-IA6MOyjKxe5XTwCP .section-9 circle,#mermaid-svg-IA6MOyjKxe5XTwCP .section-9 polygon,#mermaid-svg-IA6MOyjKxe5XTwCP .section-9 path{fill:hsl(180, 100%, 76.2745098039%);}#mermaid-svg-IA6MOyjKxe5XTwCP .section-9 text{fill:black;}#mermaid-svg-IA6MOyjKxe5XTwCP .node-icon-9{font-size:40px;color:black;}#mermaid-svg-IA6MOyjKxe5XTwCP .section-edge-9{stroke:hsl(180, 100%, 76.2745098039%);}#mermaid-svg-IA6MOyjKxe5XTwCP .edge-depth-9{stroke-width:-13;}#mermaid-svg-IA6MOyjKxe5XTwCP .section-9 line{stroke:hsl(0, 100%, 86.2745098039%);stroke-width:3;}#mermaid-svg-IA6MOyjKxe5XTwCP .disabled,#mermaid-svg-IA6MOyjKxe5XTwCP .disabled circle,#mermaid-svg-IA6MOyjKxe5XTwCP .disabled text{fill:lightgray;}#mermaid-svg-IA6MOyjKxe5XTwCP .disabled text{fill:#efefef;}#mermaid-svg-IA6MOyjKxe5XTwCP .section-10 rect,#mermaid-svg-IA6MOyjKxe5XTwCP .section-10 path,#mermaid-svg-IA6MOyjKxe5XTwCP .section-10 circle,#mermaid-svg-IA6MOyjKxe5XTwCP .section-10 polygon,#mermaid-svg-IA6MOyjKxe5XTwCP .section-10 path{fill:hsl(210, 100%, 76.2745098039%);}#mermaid-svg-IA6MOyjKxe5XTwCP .section-10 text{fill:black;}#mermaid-svg-IA6MOyjKxe5XTwCP .node-icon-10{font-size:40px;color:black;}#mermaid-svg-IA6MOyjKxe5XTwCP .section-edge-10{stroke:hsl(210, 100%, 76.2745098039%);}#mermaid-svg-IA6MOyjKxe5XTwCP .edge-depth-10{stroke-width:-16;}#mermaid-svg-IA6MOyjKxe5XTwCP .section-10 line{stroke:hsl(30, 100%, 86.2745098039%);stroke-width:3;}#mermaid-svg-IA6MOyjKxe5XTwCP .disabled,#mermaid-svg-IA6MOyjKxe5XTwCP .disabled circle,#mermaid-svg-IA6MOyjKxe5XTwCP .disabled text{fill:lightgray;}#mermaid-svg-IA6MOyjKxe5XTwCP .disabled text{fill:#efefef;}#mermaid-svg-IA6MOyjKxe5XTwCP .section-root rect,#mermaid-svg-IA6MOyjKxe5XTwCP .section-root path,#mermaid-svg-IA6MOyjKxe5XTwCP .section-root circle,#mermaid-svg-IA6MOyjKxe5XTwCP .section-root polygon{fill:hsl(240, 100%, 46.2745098039%);}#mermaid-svg-IA6MOyjKxe5XTwCP .section-root text{fill:#ffffff;}#mermaid-svg-IA6MOyjKxe5XTwCP .section-root span{color:#ffffff;}#mermaid-svg-IA6MOyjKxe5XTwCP .section-2 span{color:#ffffff;}#mermaid-svg-IA6MOyjKxe5XTwCP .icon-container{height:100%;display:flex;justify-content:center;align-items:center;}#mermaid-svg-IA6MOyjKxe5XTwCP .edge{fill:none;}#mermaid-svg-IA6MOyjKxe5XTwCP .mindmap-node-label{dy:1em;alignment-baseline:middle;text-anchor:middle;dominant-baseline:middle;text-align:center;}#mermaid-svg-IA6MOyjKxe5XTwCP :root{–mermaid-font-family:\”trebuchet ms\”,verdana,arial,sans-serif;}
MCP
它解决的问题
N 乘 M 集成爆炸
每个应用都重复实现同样的连接器
上下文在模型之外
发现与权限没有统一标准
核心概念
宿主 Host
客户端 Client
服务器 Server
会话与生命周期
工具 Tool
资源 Resource
提示 Prompt
客户端原语采样 征询 根目录
关键组件
宿主 Claude Code
掌管用户 模型循环与审批闸门
MCP 客户端
掌管一个会话对一个服务器
传输层
掌管消息分帧stdio 或 HTTP
MCP 服务器
掌管一个领域的能力
授权层
掌管远程服务器的身份认证
贯穿示例
Claude Code 中的滞留订单排查
orders-db 走 stdio
payments 走 HTTP
关键流程
正常路径先发现后调用
审批与征询
失败 服务器崩溃令牌过期
图注:本指南覆盖的全部概念、组件与流程——在深入任何一处之前,先把这张图装进脑子里。
阅读顺序
| 1 | 01-why.md | WHY 为什么 | MCP 出现之前的痛点;为什么插件和函数调用还不够 |
| 2 | 02-what.md | WHAT 是什么 | 一句话定义、边界、生态位 |
| 3 | 03-concept-map.md | 概念地图 | 全部概念 + 关键组件 + 它们如何协作 |
| 4 | 04-running-example.md | 贯穿示例 | 滞留订单排查场景,先浅层走一遍 |
| 5 | 05-deep-dives/ | 深入 | 每个关键组件一篇,每篇都锚回示例 |
| 6 | 06-walkthrough.md | 完整走查 | 同一个示例,端到端全深度重跑一遍 |
| 7 | 07-next-steps.md | — | 自测题、练习、源码入口、延伸阅读 |
| — | examples/ | — | 可运行的 MCP 服务器 + Claude Code 配置 |
第一遍请按 01→06 顺序读。之后每篇深入文章都可独立阅读——每篇开头都会回顾组件职责,结尾都会锚回示例。
关于协议版本的说明
MCP 用日期字符串作为版本号。本指南描述的是 2025-06-18 修订版,也是当前 Claude Code 与官方 SDK 默认协商的版本;凡是某个特性在特定版本才引入的(Streamable HTTP 在 2025-03-26、征询(elicitation)与结构化工具输出在 2025-06-18),正文都会点明。之后还有更新的修订版并增加了特性,但本指南中的每一个概念在各版本间都是稳定的。当某个细节对你的实现真的重要时,请查阅 modelcontextprotocol.io 上你的 SDK 所协商的那个版本——以及你自己握手时实际返回的 protocolVersion(见客户端深入)。
📦 配套代码仓库
本文是一个开源指南系列的一部分。整个系列、全部图表源码,以及一个可以直接让 Claude Code 连上去的可运行 MCP 服务器,都在同一个仓库里:
→ https://github.com/geekchow/mcp-explain
| 本页源文件 | mcp-guide-zh/00-overview.md |
| 英文原版 | mcp-guide/00-overview.md |
| 可运行示例服务器 | mcp-guide/examples/orders-db-server |
克隆下来跟着做:
git clone https://github.com/geekchow/mcp-explain.git
cd mcp-explain/mcp-guide/examples/orders-db-server && npm install && node index.js
欢迎指正——如果某个协议细节随新版本发生了变化,欢迎提 issue。
📚 返回专栏目录
网硕互联帮助中心





评论前必须登录!
注册