跳到正文
DEV Community· Abhinav Sachdeva·· 59 分鐘前AI 評分41

MCP 概念梳理:超越 Tools

Mapping MCP Concepts - Go beyond tools

AI 導讀

MCP 將架構劃分為伺服器功能、用戶端功能、基礎協議工具/模式及官方擴展,説明其設計不止於 Tools。2026-07-28 的無狀態協議修訂取消有狀態連線握手,並正式棄用多項 2025 年概念,設有至 2027 年 7 月的 12 個月過渡期。官方擴展涵蓋 Tasks、Skills、OAuth 2.0、企業授權及 MCP Apps。

正文

When most developers start building with the Model Context Protocol (MCP), they focus almost exclusively on Tools. While tools are the workhorses of agentic execution, the full MCP architecture—especially following the 2026-07-28 stateless protocol revision—is a rich, layered specification. It separates capabilities into distinct control models, request-response patterns, and modular extensions.

MCP organizes its architecture into Server Features, Client Features, Base Protocol Utilities/Patterns, and Official Extensions. Several concepts from 2025 were formally deprecated in the 2026-07-28 spec (with a 12-month sunset window until July 2027)


Server Utilities

Server Utilities are protocol-level helper mechanisms that make the core server primitives ergonomic, scalable, and fast in production. They solve practical operational challenges such as IDE-style argument autocompletion, paginating large capability catalogs, and caching responses across stateless HTTP requests. Note that structured protocol logging was formally deprecated in the 2026-07-28 spec in favor of stderr and OpenTelemetry.

  • Completions (completion/complete)
  • Pagination (cursor / nextCursor)
  • Caching Metadata (ttlMs, cacheScope)
  • Logging (notifications/message)

Server Features

Server Features are the foundational capabilities an MCP server exposes to a host application and its underlying language model. Rather than treating every integration as a callable function, MCP splits server capabilities by who controls them: the model, the host application, or the end user. This separation keeps read-only context, executable actions, and reusable prompt workflows cleanly decoupled.

  • Tools (tools/list, tools/call)
  • Resources (resources/list, resources/read, resources/templates/list)
  • Prompts (prompts/list, prompts/get)

Client Features

Client Features invert the traditional client-server flow by allowing an MCP server to request capabilities from the host or client during execution. In the 2026-07-28 specification, server-initiated requests are strictly scoped to active client requests so a server cannot prompt a user out of nowhere. Meanwhile, workspace boundary announcements (roots) and client-mediated LLM completions (sampling) were deprecated in favor of explicit arguments and direct model API calls.

  • Elicitation (elicitation/create)
  • Sampling (sampling/createMessage)
  • Roots (roots/list)

Message Patterns

Message Patterns define how JSON-RPC 2.0 messages flow over transports like stdio and Streamable HTTP without relying on sticky server sessions. Because the 2026-07-28 spec eliminated stateful connection handshakes, these patterns enable multi-step human-in-the-loop pauses, live change streams, and in-flight progress tracking over standard stateless infrastructure. Every pattern correlates messages using explicit request-scoped metadata (_meta) rather than hidden transport state.

  • Subscriptions (subscriptions/listen)
  • Multi Round-Trip Requests (MRTR)
  • Progress & Cancellation

Extensions

Extensions are opt-in, independently versioned modules negotiated via capability maps that add specialized workflows without bloating the core protocol. Official extensions live under the reserved io.modelcontextprotocol namespace and graduate through Experimental, Beta, and Stable stages. They cover advanced agentic needs ranging from rich inline interfaces and durable background jobs to reusable SKILL.md playbooks and enterprise authorization.

  • Tasks (io.modelcontextprotocol/tasks)
  • Skills (io.modelcontextprotocol/skills)
  • OAuth 2.0 (io.modelcontextprotocol/oauth-client-credentials)
  • IdP access control (io.modelcontextprotocol/enterprise-managed-authorization)
  • MCP Apps (ui/*)

In the next post, we will dive straight into Server Features, comparing when to model an integration as a Tool, a Resource, or a Prompt—with concrete TypeScript implementations using @modelcontextprotocol/sdk.

來源:DEV Community · dev.to