learn-mcp

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Learn Model Context Protocol (MCP)

学习Model Context Protocol(MCP)

Teach the focused Model Context Protocol (MCP) route. One invocation covers one lesson. The learner should inspect a request and response, predict a boundary result, run or hand-trace the lab, and record the lesson checkpoint before advancing.
教授专注的Model Context Protocol(MCP)学习路径。每次调用涵盖一个课程。 学习者需要检查请求和响应,预测边界结果, 运行或手动跟踪实验,并在进阶前记录课程检查点。

Use the invocation syntax of the host

使用宿主的调用语法

The portable skill name is
learn-mcp
. Do not present one host's syntax as a protocol rule.
HostStart or resume
Codex
learn-mcp
, or choose it from
/skills
Claude Code
/learn-mcp
Other compatible hosts
Use learn-mcp to start or resume the Model Context Protocol (MCP) path.
可移植技能名称为
learn-mcp
。不要将某一宿主的语法作为协议规则呈现。
宿主启动或继续方式
Codex
learn-mcp
,或从
/skills
中选择
Claude Code
/learn-mcp
其他兼容宿主
Use learn-mcp to start or resume the Model Context Protocol (MCP) path.

Read the route before selecting a lesson

选择课程前先阅读学习路径

The source of truth is
learning-paths/model-context-protocol.json
. Prefer local files when this repository is available. Otherwise fetch a needed file from:
text
https://raw.githubusercontent.com/rohitg00/ai-engineering-from-scratch/main/<path>
Follow the manifest's
lessons
array by
order
. The required sequence is 06, 07, 08, 09, 10, 11, 12, 13, 14, 15, 16, 18, 17, 28, 29, 30, 31. Numeric next navigation is not the route after Lesson 16.
For the selected lesson, read
docs/en.md
and
quiz.json
fully. Read or run
code/
and
outputs/
only when the current teaching step needs them. Use the lesson's stated protocol era. Never merge a legacy handshake rule into a modern stateless trace.
Lesson 23 is the only optional capstone. Offer it only after all required rows are complete and both manifest
prerequisitePaths
, Lessons 19 and 20, are complete. Do not silently add another lesson to this path.
权威来源为
learning-paths/model-context-protocol.json
。当此仓库可用时,优先使用本地文件。否则从以下地址获取所需文件:
text
https://raw.githubusercontent.com/rohitg00/ai-engineering-from-scratch/main/<path>
按照清单中
lessons
数组的
order
顺序学习。必填序列为06、07、08、09、10、11、12、13、14、15、16、18、17、28、29、30、31。第16课之后不再采用数字顺序导航。
对于选定的课程,需完整阅读
docs/en.md
quiz.json
。仅当当前教学步骤需要时,才阅读或运行
code/
outputs/
中的内容。使用课程指定的协议版本。切勿将旧版握手规则合并到现代无状态跟踪中。
第23课是唯一可选的顶点课程。仅在所有必填课程完成且清单中要求的前置路径(第19和20课)均完成后,才可提供该课程。请勿在此路径中擅自添加其他课程。

Establish the evidence mode

确定证据模式

Before the first executable checkpoint, determine whether:
  1. The lesson files are available locally.
  2. python3 --version
    succeeds.
  3. The learner can write
    MCP-LEARNING.md
    in the current working directory.
  4. A TypeScript runner is available if the learner chooses the optional second implementation in Lesson 07.
When local files and Python 3 are available, use executable mode. Record the absolute working directory, exact command, exit code, request id and method, selected protocol era, and observed result or error. Redact tokens, secrets, cookies, authorization headers, and sensitive parameter values.
When the repository or runtime is unavailable, continue in conceptual mode. Read the lesson, hand-trace a small request and response, and label the evidence
Conceptual
. Leave runtime, transport, authorization, and deployment checks
Pending
. Do not describe a hand trace as an executed pass.
If executable files are needed but absent, offer to clone the repository into a directory the learner chooses. Wait for confirmation before cloning. The conceptual lesson must remain available without a clone.
在第一个可执行检查点之前,需确定以下事项:
  1. 课程文件是否在本地可用。
  2. python3 --version
    命令是否可成功执行。
  3. 学习者能否在当前工作目录中写入
    MCP-LEARNING.md
    文件。
  4. 如果学习者选择第07课中的可选第二种实现,是否有TypeScript运行环境可用。
当本地文件和Python 3可用时,使用可执行模式。记录绝对工作目录、精确命令、退出码、请求ID和方法、选定的协议版本以及观察到的结果或错误。需编辑掉令牌、密钥、Cookie、授权头和敏感参数值。
当仓库或运行环境不可用时,采用概念模式继续学习。阅读课程内容,手动跟踪一个小型请求和响应,并将证据标记为
Conceptual
。将运行时、传输层、授权和部署检查标记为
Pending
。请勿将手动跟踪描述为已执行通过。
如果需要可执行文件但文件缺失,可提议将仓库克隆到学习者选择的目录中。克隆前需等待学习者确认。即使不克隆仓库,也必须提供概念课程学习选项。

Locate or create progress

定位或创建学习进度

Use
MCP-LEARNING.md
in the current working directory. Do not put this route in
LEARNING.md
and do not modify Agent Skills progress.
Before deciding that no state exists, handle the former filename safely:
  1. If
    MCP-LEARNING.md
    exists, use it. If
    MCP-ENGINEERING-LEARNING.md
    also exists, do not overwrite either file; report the collision and ask which file should own the next update.
  2. If
    MCP-LEARNING.md
    is absent and
    MCP-ENGINEERING-LEARNING.md
    exists, rename the legacy file to
    MCP-LEARNING.md
    in the same directory before teaching. Preserve every learner note and evidence row byte for byte. If an atomic rename is unavailable, copy the file, verify the new file matches, and only then remove the legacy file.
  3. Create a new state file only when neither filename exists. Never replace legacy progress with the blank template below.
If the file exists, preserve all learner notes and evidence. Resume the first row marked
In progress
or
Next
. If all required rows are
Done
, check the optional capstone prerequisites and report the exact missing path instead of restarting the route.
If the file does not exist, create it without a placement quiz:
markdown
undefined
使用当前工作目录中的
MCP-LEARNING.md
文件。请勿将此路径的进度写入
LEARNING.md
,也不要修改Agent Skills的进度。
在判定无进度状态存在之前,需妥善处理旧文件名:
  1. 如果
    MCP-LEARNING.md
    存在,则使用该文件。如果
    MCP-ENGINEERING-LEARNING.md
    也存在,请勿覆盖任何一个文件;需报告冲突并询问应更新哪个文件。
  2. 如果
    MCP-LEARNING.md
    不存在但
    MCP-ENGINEERING-LEARNING.md
    存在,在教学前将旧文件重命名为同一目录下的
    MCP-LEARNING.md
    。需逐字节保留所有学习者笔记和证据行。如果无法原子重命名,则复制文件,验证新文件与原文件匹配后,再删除旧文件。
  3. 仅当两个文件名都不存在时,才创建新的状态文件。切勿用空白模板替换旧的学习进度。
如果文件已存在,需保留所有学习者笔记和证据。从标记为
In progress
Next
的第一行继续学习。如果所有必填行均标记为
Done
,则检查可选顶点课程的前置条件,并报告确切缺失的路径,而非重新开始学习路径。
如果文件不存在,则无需进行入门测验即可创建:
markdown
undefined

My Model Context Protocol (MCP) Path

我的Model Context Protocol(MCP)学习路径

<!-- Managed by the learn-mcp tutor. Source: learning-paths/model-context-protocol.json -->
<!-- 由learn-mcp导师管理。 来源:learning-paths/model-context-protocol.json -->

Route

路径信息

  • Started: <YYYY-MM-DD>
  • Required time: about 23 hours 15 minutes
  • Current: 1 of 17
  • Evidence mode: Executable or Conceptual
  • 开始时间:<YYYY-MM-DD>
  • 预计所需时间:约23小时15分钟
  • 当前进度:1/17
  • 证据模式:Executable 或 Conceptual

Environment

环境信息

  • Repository files: Available or Pending
  • Python 3: Confirmed or Pending
  • TypeScript runner for Lesson 07: Optional, Confirmed, or Pending
  • Working directory: <absolute path>
  • 仓库文件:Available 或 Pending
  • Python 3:Confirmed 或 Pending
  • 第07课所需TypeScript运行环境:Optional、Confirmed 或 Pending
  • 工作目录:<绝对路径>

Public deployment gate

公开部署检查

  • Lesson 15 executable checkpoint: Pending
  • Threat model reviewed: Pending
  • External target and authority confirmed: Pending
  • 第15课可执行检查点:Pending
  • 威胁模型已审核:Pending
  • 外部目标和权限已确认:Pending

Progress

学习进度

OrderLessonStatusEvidenceCompleted
113/06 MCP fundamentalsNext
213/07 MCP serverLocked
313/08 MCP clientLocked
413/09 MCP transportsLocked
513/10 Resources and promptsLocked
613/11 Model input and MRTRLocked
713/12 Explicit scope and elicitationLocked
813/13 Durable tasksLocked
913/14 MCP AppsLocked
1013/15 MCP securityLocked
1113/16 MCP authorizationLocked
1213/18 Production authLocked
1313/17 Gateways and registriesLocked
1413/28 Tool contracts and contentLocked
1513/29 Reliability and flow controlLocked
1613/30 Registry supply chainLocked
1713/31 Conformance engineeringLocked
序号课程状态证据完成时间
113/06 MCP基础Next
213/07 MCP服务器Locked
313/08 MCP客户端Locked
413/09 MCP传输层Locked
513/10 资源与提示词Locked
613/11 模型输入与MRTRLocked
713/12 显式范围与启发Locked
813/13 持久任务Locked
913/14 MCP应用Locked
1013/15 MCP安全Locked
1113/16 MCP授权Locked
1213/18 生产环境授权Locked
1313/17 网关与注册中心Locked
1413/28 工具契约与内容Locked
1513/29 可靠性与流控Locked
1613/30 注册中心供应链Locked
1713/31 一致性工程Locked

Wire evidence

通信证据

DateLessonModeRequest or scenarioObserved resultCommand, cwd, exit
日期课程模式请求或场景观察结果命令、工作目录、退出码

Notes

笔记


Check facts that can be observed locally. Ask only for choices or authority
that cannot be inferred safely.

核实可本地观察的事实。仅询问无法安全推断的选项或权限相关问题。

Start Lesson 06 in ten minutes

十分钟内开始第06课

On the first invocation, begin the lesson immediately. From the repository root, run:
bash
python3 phases/13-tools-and-protocols/06-mcp-fundamentals/code/main.py
Ask the learner to identify the repeated protocol version and client capabilities, the complete
server/discover
result, error
-32022
, and the absence of protocol-session creation or teardown. Record those observations before expanding into the rest of Lesson 06.
If the command cannot run, show one modern request and response from the lesson, ask the learner to label every envelope field, and record the result as conceptual evidence. Keep the command checkpoint pending.
首次调用时,立即开始课程。从仓库根目录运行:
bash
python3 phases/13-tools-and-protocols/06-mcp-fundamentals/code/main.py
请学习者识别重复的协议版本和客户端能力、完整的
server/discover
结果、错误码
-32022
,以及协议会话未创建或销毁的情况。在展开第06课其余内容之前,记录这些观察结果。
如果命令无法运行,请展示课程中的一个现代请求和响应示例,让学习者标记每个信封字段,并将结果记录为概念证据。将命令检查点标记为待处理。

Enforce the public deployment gate

强制执行公开部署检查

Before any non-loopback bind, shared ingress, hosted endpoint, registry publication, or other public deployment, read
publicDeploymentGate
from the manifest. Require the executable Lesson 15 checkpoint, review the target and requested authority, and obtain the learner's explicit confirmation for the external action.
If any required evidence is missing, teach or rerun Lesson 15 and keep the deployment action pending. A skill invocation does not grant network, credential, publishing, or deployment authority.
在进行任何非环回绑定、共享入口、托管端点、注册中心发布或其他公开部署操作之前,需从清单中读取
publicDeploymentGate
要求。必须完成第15课的可执行检查点、审核目标和请求权限,并获得学习者对外部操作的明确确认。
如果任何必填证据缺失,需教授或重新运行第15课,并将部署操作标记为待处理。技能调用并不授予网络、凭证、发布或部署权限。

Teach one lesson

教授单个课程

  1. Mark the selected row
    In progress
    . State its manifest path, duration, group, protocol era, and evidence mode.
  2. Frame one production failure that this lesson prevents. Ask the learner to predict the status, JSON-RPC result, or state transition before explaining it.
  3. Draw one request boundary: producer, transport, consumer, and the exact fields each side validates. Keep protocol state, durable application state, transport state, authorization state, and UI state distinct.
  4. Work through Build It and Use It in small sections. For code, explain one invariant, ask for a prediction, then run or trace the smallest case that can falsify it.
  5. Exercise one success and at least one relevant failure. Prefer exact wire evidence: request id, method, protocol era, headers when applicable, body, status or error code, result type, and terminal state. Keep secret values redacted.
  6. Require every item in the lesson's manifest
    checkpointEvidence
    . Runtime evidence must come from observed output. Conceptual evidence must name the unexecuted command and remaining uncertainty.
  7. Ask every
    post
    quiz item one at a time. If the quiz has no staged items, ask all items. Do not reveal
    correct
    , an answer index, or an explanation before the learner responds.
  8. Mark the row
    Done
    only after the lesson checkpoint and quiz. Append one compact Wire evidence row, add the score to Notes, set the next row to
    Next
    , and update
    Current
    .
Do not use passing unit tests as a substitute for the named protocol evidence. Do not infer HTTP behavior from an in-process function, authorization from authentication, cancellation from a timeout, or conformance from one SDK.
  1. 将选定的行标记为
    In progress
    。说明其清单路径、时长、分组、协议版本和证据模式。
  2. 提出一个本课程可预防的生产故障场景。在解释之前,让学习者预测状态、JSON-RPC结果或状态转换。
  3. 绘制一个请求边界:生产者、传输层、消费者,以及每一方需验证的精确字段。需将协议状态、持久应用状态、传输层状态、授权状态和UI状态区分开。
  4. 分小部分完成“构建”和“使用”环节。对于代码,解释一个不变量,让学习者进行预测,然后运行或跟踪可推翻该预测的最小案例。
  5. 演练一次成功场景和至少一个相关失败场景。优先使用精确的通信证据:请求ID、方法、协议版本(如适用)、头信息、请求体、状态码或错误码、结果类型和终端状态。需编辑敏感值。
  6. 要求提供课程清单
    checkpointEvidence
    中的所有项。运行时证据必须来自观察到的输出。概念证据必须指明未执行的命令和剩余的不确定性。
  7. 逐个询问
    post
    测验中的问题。如果测验没有分阶段问题,则询问所有问题。在学习者作答前,不得透露
    correct
    、答案索引或解释内容。
  8. 仅在完成课程检查点和测验后,将该行标记为
    Done
    。添加一行简洁的通信证据记录,将分数添加到笔记中,将下一行设置为
    Next
    ,并更新
    Current
    进度。
请勿将通过单元测试作为指定协议证据的替代。请勿从进程内函数推断HTTP行为、从身份验证推断授权、从超时推断取消、从单个SDK推断一致性。

Close

结束

End with the quiz score, the exact checkpoint evidence recorded, any pending runtime or security evidence, and the next manifest lesson. Keep the learner on this route unless they ask to leave it.
以测验分数、记录的精确检查点证据、任何待处理的运行时或安全证据,以及下一个清单课程作为结束。除非学习者要求退出,否则保持学习者在此学习路径上。