Dayward AIWeChat Mini Program
← All course question banks

MCP in 7 Days: Wire Tools Into Any Agent

Course questions · 21 / 21

D1 Why a Protocol: the Host/Client/Server Triangle, JSON-RPC Messages, and Three Primitives

  • How is MCP actually different from a model's built-in function calling, and when should you not use MCP?MCP 和模型自带的函数调用到底差在哪?什么情况下你不该用 MCP?
    Common in ChinaCommon overseasBasic#mcp-basics#architecture

    🔒 Unlock D1 to see the answer keys.

  • Why does the MCP spec require one client per server instead of multiplexing many servers over one connection?MCP 规范为什么规定一个客户端只连一个服务端?多路复用不是更省资源吗?
    Common in ChinaCommon overseasIntermediate#architecture#security

    🔒 Unlock D1 to see the answer keys.

  • The 2026-07-28 revision made MCP stateless and removed the initialize handshake. What does that cost, and how should a server that still needs state handle it?2026-07-28 这一版把 MCP 改成了无状态协议,删掉了 initialize 握手。这么改的代价是什么?服务端还想保存状态该怎么办?
    Common in ChinaCommon overseasDeep dive#protocol-versions#statelessness

    🔒 Unlock D1 to see the answer keys.

D2 Writing Your First MCP Server: stdio Transport, the Official SDK, Parameter Schemas, Tool Annotations, and Debugging With Inspector

  • Who is a tool's description actually written for, and what concretely goes wrong in production when it is too vague?工具的 description 到底写给谁看?写得太泛,在生产里会造成什么具体后果?
    Common in ChinaCommon overseasBasic#tool-design#prompt-surface

    🔒 Unlock D2 to see the answer keys.

  • When should a tool return a JSON-RPC error versus a result with isError set to true? Give me a decision rule.什么时候该返回 JSON-RPC 的 error,什么时候该返回 isError 为真的工具结果?给我一个判据。
    Common in ChinaCommon overseasIntermediate#error-handling#tool-design

    🔒 Unlock D2 to see the answer keys.

  • What is the most common way a stdio MCP server breaks, and how do you prevent it in code and in process?一个 stdio 的 MCP 服务端最常见的翻车原因是什么?你会在代码和流程上分别怎么堵住它?
    Common in ChinaCommon overseasDeep dive#stdio-transport#debugging

    🔒 Unlock D2 to see the answer keys.

D3 Resources and Prompts: URI Templates, Change Notifications, Progress and Logging, Pagination, and Client Capabilities

  • For the same data, what is the difference between exposing it as an MCP resource versus a tool, and how do you choose?同一份数据,做成 MCP 资源和做成工具有什么区别?你按什么标准选?
    Common in ChinaCommon overseasBasic#primitives#server-design

    🔒 Unlock D3 to see the answer keys.

  • Why must MCP pagination cursors be opaque, and what breaks if a client parses them?MCP 的分页游标为什么必须是不透明的?如果客户端去解析它,会出什么问题?
    Common in ChinaCommon overseasIntermediate#pagination#api-design

    🔒 Unlock D3 to see the answer keys.

  • On HTTP both subscription streams and in-request progress notifications ride SSE, so why does the 2026-07-28 spec split them into two channels?订阅流和请求内的进度通知在 HTTP 上都走 SSE,为什么 2026-07-28 规范要把它们分成两个通道?
    Common in ChinaCommon overseasDeep dive#subscriptions#notifications

    🔒 Unlock D3 to see the answer keys.

D4 Remote MCP: the Streamable HTTP Binding, the Stateless Model and Request Metadata, OAuth 2.1 Authorization, Container Deployment

  • The 2026-07-28 revision removed protocol-level sessions. How should a remote server that needs cross-call state — a shopping cart, a database transaction — be designed?2026-07-28 去掉了协议级会话。那一个需要跨调用保存状态的远程服务端——比如购物车、数据库事务——应该怎么设计?
    Common in ChinaCommon overseasIntermediate#statelessness#api-design

    🔒 Unlock D4 to see the answer keys.

  • Streamable HTTP requires the Mcp-Method header to match the method in the request body. Why mirror it at all, and what breaks if the server does not validate the match?Streamable HTTP 要求 Mcp-Method 头必须和请求体里的 method 一致。为什么要抄一遍?不校验会有什么风险?
    Common in ChinaCommon overseasIntermediate#transport#security

    🔒 Unlock D4 to see the answer keys.

  • Why must an MCP server never forward the client's access token straight to a downstream API?为什么 MCP 服务端绝对不能把客户端给的访问令牌直接转发给下游 API?
    Common in ChinaCommon overseasDeep dive#oauth#security

    🔒 Unlock D4 to see the answer keys.

D5 Writing an MCP Client: Discovering and Calling Tools Inside Your Own Agent Loop, Multi-Server Aggregation and Name Collisions

  • Your client is connected to five MCP servers and two of them expose a tool called search. How do you merge them into one tool list for the model, and why can't you just prefix with the server's name?你的客户端同时连了五个 MCP 服务端,其中两个都有一个叫 search 的工具。合并成一张工具表给模型时,重名该怎么处理?为什么不能直接拿服务端名做前缀?
    Common in ChinaCommon overseasIntermediate#client#tool-naming

    🔒 Unlock D5 to see the answer keys.

  • One of your MCP servers times out in production. How should your agent loop react?线上一个 MCP 服务端超时了。你的 Agent 循环应该怎么反应?
    Common in ChinaCommon overseasIntermediate#client#reliability

    🔒 Unlock D5 to see the answer keys.

  • When translating an MCP tool definition into a model API's tool parameters, what is most easily lost, and what goes wrong when it is?把 MCP 的工具定义翻译成模型 API 的工具参数时,最容易丢掉的是什么?丢了会怎样?
    Common in ChinaCommon overseasDeep dive#client#tool-schema

    🔒 Unlock D5 to see the answer keys.

D6 Security and Governance: Prompt Injection in Tool Descriptions, the Confused Deputy, Least Privilege, Audit Logs, and a Tool Allowlist

  • Why is an MCP tool's description untrusted input, and what protections would you build as a client author?为什么说 MCP 工具的描述是不可信输入?作为客户端作者,你会做哪些防护?
    Common in ChinaCommon overseasIntermediate#prompt-injection#client

    🔒 Unlock D6 to see the answer keys.

  • How does the confused deputy attack play out in an MCP setting, and what does the spec require to prevent it?混淆代理攻击在 MCP 场景里具体是怎么发生的?规范要求怎么防?
    Common in ChinaCommon overseasDeep dive#oauth#confused-deputy

    🔒 Unlock D6 to see the answer keys.

  • Since the protocol is stateless, a server that needs state mints a handle for the client to carry back. What attack surface does that create, and how do you close it?2026-07-28 之后协议是无状态的,服务端要保存状态就得铸一个句柄让客户端带回来。这会带来什么新的攻击面?怎么防?
    Common in ChinaCommon overseasIntermediate#statelessness#security

    🔒 Unlock D6 to see the answer keys.

D7 Productionizing and Retrospective: Writing Evals for Tools, Versioning, Publishing to npm and a Registry, Observability, and a Capstone Project

  • How do you evaluate whether an MCP tool is any good, and what categories of test cases would you design?怎么评估一个 MCP 工具做得好不好?你会设计哪几类测试用例?
    Common in ChinaCommon overseasIntermediate#eval#tooling

    🔒 Unlock D7 to see the answer keys.

  • When versioning an MCP server, what counts as a breaking change, and why is editing a tool description more dangerous than renaming a field?给一个 MCP 服务端做版本管理时,什么样的改动算破坏性变更?为什么说改一句工具描述比改一个字段名更危险?
    Common in ChinaCommon overseasIntermediate#versioning#tooling

    🔒 Unlock D7 to see the answer keys.

  • A user reports that one of your MCP tools is 'always getting it wrong' in production. In what order do you investigate?线上有人反馈某个 MCP 工具「总是调不对」。你按什么顺序排查?
    Common in ChinaCommon overseasIntermediate#observability#debugging

    🔒 Unlock D7 to see the answer keys.