MCP 客户端:各家支持哪些特性,以及怎样确认客户端的真实声明

MCP 客户端:各家支持哪些特性,以及怎样确认客户端的真实声明

能力与厂商文档的采集日期为 2026-10-26,不是持续更新的认证名单。升级客户端后重跑文内探针,区分规范能力、厂商文案和实际声明;仅声明能力也不能证明 UI 或工具执行正确。

服务器在依赖某个客户端之前,需要先确认三件事:客户端会把工具、资源、提示中的哪些展示给用户;它会不会响应服务器发起的根目录、采样和征询请求;它使用哪个协议修订版。下表只列厂商页面明确写出的能力,没有说明的地方留空。需要确认当前客户端实际声明的版本和能力时,可以运行第五节的探针服务器。

这些声明参与的生命周期和消息,请读学习路径和 MCP 架构。服务器能提供什么,请读工具、资源和提示。这一页解决"选哪个现成客户端";要自己动手写一个,读用 TypeScript SDK 构建 Node.js MCP 客户端。

1. “支持 MCP”可以指什么

这个说法背后有三件不同的事,协议里能看到的只有第二、第三件。

层面客户端做什么在哪里声明服务器怎么知道
原语调用 tools/list、resources/list、prompts/list,并展示或使用结果无处声明:工具、资源、提示是服务器的能力,客户端没有同名的能力看收到的调用,或查厂商文档
客户端能力回应服务器发起的请求:roots/list、采样、征询(部分修订版还有 tasks、extensions)ClientCapabilities:2025-11-25 及之前在 initialize 里,2026-07-28 在每个请求的 _meta 里读它的声明(第四节)
修订版说一个或多个协议修订版MCP-Protocol-Version 头,以及 initialize 或 server/discover看连接的最初几个请求(第六节)

声明之所以值得读,是因为规则这样写:2025-11-25 要求双方“Only use capabilities that were successfully negotiated”,2026-07-28 要求服务器“MUST NOT rely on capabilities the client has not declared”。如果确实需要,就返回 HTTP 400 的 MissingRequiredClientCapabilityError(-32021)。工具、资源、提示没有声明,所以第二节的矩阵靠的是厂商怎么写,其余部分用第五节的探针去测。

2. 各家厂商的页面写了什么

✓ 表示厂商自己的文档写明了该特性;括号里的数字是第三节原文表的行号。空格表示页面没写,不表示客户端没有这个特性。此前未注明来源的客户端不再沿用。

客户端工具资源提示根目录采样征询页面写出的修订版
Claude Code✓ (1)✓ (2)✓ (3)✓ (4)✓ (5)2026-07-28 (6)
Cursor✓ (7)✓ (8)✓ (9)✓ (10)✓ (11)
VS Code✓ (12)✓ (13)✓ (14)✓ (15)✓ (16)✓ (17)
Zed✓ (18)✓ (18)
Gemini CLI✓ (19)✓ (20)✓ (21)
  • 五个客户端都写明了工具。只有 Zed 的资源格是空的:它的页面只写了“Tools and Prompts”(18)。
  • 采样只有 VS Code 写明(16)。第六节显示 Claude Code 2.1.292 同样没有声明采样,与它的空格一致。
  • 根目录与征询同时写明的是 Claude Code、Cursor、VS Code,本表中没有其他客户端。
  • 只有 Claude Code 写出了协议修订版 2026-07-28(6)。其余页面没写,请读第六节它们实际发送了什么。

本表覆盖的是基础能力。MCP Apps 这类扩展的客户端支持范围不同,见官方客户端矩阵与 MCP Apps 实战;官方矩阵中标"部分支持"的格子(如 Inspector 的 MCP Apps)范围只是 UI 渲染,不代表面向模型的一侧也经过验证。

读取的页面:

客户端读取的页面读取日期
Claude Codecode.claude.com/docs/en/mcp2026-10-26
Cursorcursor.com/docs/mcp2026-10-26
VS Codecode.visualstudio.com/api/extension-guides/ai/mcp2026-10-26
Zedzed.dev/docs/ai/mcp2026-10-26
Gemini CLIgeminicli.com/docs/tools/mcp-server/2026-10-26

3. 厂商的原文

下列引文都在 2026-10-26 从对应页面取回并在页面里找到。c1 不是矩阵里的格子,而是对某一格的限制,第八节用到它。

#客户端对应单元格厂商页面的原文
1Claude Code工具“MCP servers give Claude Code access to your tools, databases, and APIs.”
2Claude Code资源“MCP servers can expose resources that you can reference using @ mentions”
3Claude Code提示“MCP servers can expose prompts that become available as commands in Claude Code.”
4Claude Code根目录“Claude Code answers roots/list with the session’s launch directory”
5Claude Code征询“MCP servers can request structured input from you mid-task using elicitation.”
6Claude Code修订版“which adds MCP protocol revision 2026-07-28”
7Cursor工具“Tools Supported Functions for the AI model to execute”
8Cursor资源“Resources Supported Structured data sources that can be read and referenced”
9Cursor提示“Prompts Supported Templated messages and workflows for users”
10Cursor根目录“Roots Supported Server-initiated inquiries into URI or filesystem boundaries”
11Cursor征询“Elicitation Supported Server-initiated requests for additional information from users”
12VS Code工具“Tools: extend agent mode with extra tools”
13VS Code资源“Resources: provide data and content that users can add as chat context or interact with directly in VS Code”
14VS Code提示“Prompts: add reusable prompts as slash commands in chat”
15VS Code根目录“Roots: provide information about the user’s workspace root folder(s)”
16VS Code采样“Sampling: make language model requests using the user’s configured models and subscription”
17VS Code征询“Elicitation: request input from the user”
18Zed工具, 提示“Zed currently supports MCP’s Tools and Prompts features.”
19Gemini CLI工具“An MCP server is an application that exposes tools and resources to the Gemini CLI”
20Gemini CLI资源“Gemini CLI discovers these automatically and gives you the possibility to reference them in the chat.”
21Gemini CLI提示“MCP servers can expose predefined prompts that can be executed as slash commands within Gemini CLI.”
c1Claude Code限制“elicitation/create is served only in interactive terminal sessions, and roots/list everywhere”

4. 客户端声明了什么:逐个修订版

ClientCapabilities 是客户端表明“我会回应什么”的唯一地方。下表由固定提交里的 schema/<修订版>/schema.json 计算得到;✓ 后面列出该修订版 schema 定义的子字段,— 表示该修订版没有这项能力。

能力2024-11-052025-03-262025-06-182025-11-252026-07-28
roots✓ (listChanged)✓ (listChanged)✓ (listChanged)✓ (listChanged)✓
sampling✓✓✓✓ (context, tools)✓ (context, tools)
elicitation——✓✓ (form, url)✓ (form, url)
tasks———✓ (cancel, list, requests)—
extensions————✓
experimental✓✓✓✓✓
  • 声明走哪条路。 到 2025-11-25 为止,客户端在 initialize 里声明一次。2026-07-28 起,客户端在每个请求的 _meta.io.modelcontextprotocol/clientCapabilities 里声明,支持根目录的客户端要在每个请求里“MUST declare the roots capability”。该修订版没有 initialize,见学习路径。
  • 征询的模式。 为向后兼容,空的 elicitation 对象表示只支持表单(form)模式。服务器不得发送客户端没有声明的模式的征询请求(2025-11-25)。
  • 采样的子能力(2025-11-25)。 客户端没有声明 sampling.tools 时,服务器不得发送带工具的采样请求;没有声明 sampling.context 时,服务器不应使用 includeContext 的 thisServer、allServers。
  • 2026-07-28 的根目录。 请求放在 InputRequiredResult 的 inputRequests 里送达。schema 现在把 roots 定义为没有字段的对象。
  • tasks 只在 2025-11-25 是客户端能力。2026-07-28 起它不再属于核心协议。
  • 弃用(2026-07-28)。 根目录与采样被 SEP-2577 弃用。它们仍在规范里,但新实现不应采用;征询没有被弃用。新服务器的设计应当在客户端既不声明根目录也不声明采样时同样可用。

5. 记录声明的探针服务器

探针是一个只用标准库的 HTTP 服务器。它只实现让客户端能连上的最少协议,提供空的工具、资源、提示列表(让客户端有理由去请求),并为每个请求打印一行 JSON:方法、协议修订版、客户端名称与版本、它声明的能力。它不发会话 ID,所以一次只测一个客户端。

python3 client_probe_server.py --era modern --port 8240   # 应答 server/discover,拒绝 initialize
python3 client_probe_server.py --era legacy --port 8240   # 应答 initialize,拒绝 server/discover

把 http://127.0.0.1:8240/mcp 作为远程 HTTP 服务器加到客户端自己的 MCP 设置里即可。Claude Code 的命令是 claude mcp add --transport http probe http://127.0.0.1:8240/mcp。同时支持两代的客户端会先探测 server/discover,失败后回退到 initialize,所以对这类客户端,旧代探针能看到它的旧代声明;只支持旧代的客户端会被新代探针拒绝,这本身就说明了它的代际。托管在云端的客户端访问不到 127.0.0.1,需要隧道,用完请关掉探针。

client_probe_server.py
#!/usr/bin/env python3
"""Probe MCP server: record what a connecting client says about itself and which list methods it calls.

Usage: client_probe_server.py [--era modern|legacy] [--port 8240]
Point a client at http://127.0.0.1:8240/mcp. Every POST prints one JSON line:
  method, protocol (the MCP-Protocol-Version header, or the version the client offers in `initialize`),
  version (the protocolVersion in the `_meta` of a modern request), client (name and version),
  capabilities (what the client declares: roots, sampling, elicitation, ...).
`--era modern` answers `server/discover` (revision 2026-07-28; a client names itself in the `_meta` of every
request) and refuses `initialize`. `--era legacy` refuses `server/discover` and answers `initialize` (a client names
itself once, in the handshake). The server offers empty tool, resource and prompt lists, so a client that wants
any of the three has a reason to ask. Standard library only.
"""
import argparse
import json
import sys
from http.server import BaseHTTPRequestHandler, ThreadingHTTPServer

PREFIX = "io.modelcontextprotocol/"
MODERN = "2026-07-28"
LEGACY = ["2025-11-25", "2025-06-18", "2025-03-26", "2024-11-05"]
CAPABILITIES = {"tools": {}, "resources": {}, "prompts": {}}
LISTS = {"tools/list": "tools", "resources/list": "resources", "prompts/list": "prompts"}


def make_handler(era, log):
    class Handler(BaseHTTPRequestHandler):
        def log_message(self, *args):  # keep stdout for the records
            pass

        def reply(self, status, body=None):
            data = json.dumps(body).encode() if body is not None else b""
            self.send_response(status)
            if body is not None:
                self.send_header("Content-Type", "application/json")
            self.send_header("Content-Length", str(len(data)))
            self.end_headers()
            self.wfile.write(data)

        def do_GET(self):  # no server-initiated stream: the spec allows 405
            self.reply(405)

        do_DELETE = do_GET

        def do_POST(self):
            try:
                msg = json.loads(self.rfile.read(int(self.headers.get("Content-Length", 0))))
                method, params = msg["method"], msg.get("params") or {}
            except (ValueError, KeyError, TypeError):
                return self.reply(400, {"jsonrpc": "2.0", "id": None, "error": {"code": -32700, "message": "bad request"}})
            meta = params.get("_meta") or {}
            entry = {"method": method, "protocol": self.headers.get("MCP-Protocol-Version") or params.get("protocolVersion"),
                     "version": meta.get(PREFIX + "protocolVersion"),
                     "client": meta.get(PREFIX + "clientInfo") or params.get("clientInfo"),
                     "capabilities": meta.get(PREFIX + "clientCapabilities", params.get("capabilities"))}
            log({k: v for k, v in entry.items() if v is not None})
            if "id" not in msg:  # a notification gets no body
                return self.reply(202)
            result, error = None, None
            if method == "server/discover" and era == "modern":
                result = {"resultType": "complete", "supportedVersions": [MODERN], "capabilities": CAPABILITIES,
                          "ttlMs": 0, "cacheScope": "private"}
            elif method == "initialize" and era == "legacy":
                offered = params.get("protocolVersion")
                result = {"protocolVersion": offered if offered in LEGACY else LEGACY[0], "capabilities": CAPABILITIES,
                          "serverInfo": {"name": "client-probe", "version": "1"}}
            elif method in LISTS:
                result = {LISTS[method]: []}
                if era == "modern":
                    result.update(resultType="complete", ttlMs=0, cacheScope="private")
            else:
                error = {"code": -32601, "message": "Method not found: %s" % method}
            body = {"jsonrpc": "2.0", "id": msg["id"]}
            body.update({"error": error} if error else {"result": result})
            self.reply(200, body)

    return Handler


def summarize(record):
    """One readable line per record: method, protocol, client, and the capability names it declares."""
    parts = ["%-26s" % record["method"], "protocol=%s" % record.get("protocol")]
    client = record.get("client")
    if client:
        parts.append("client=%s/%s" % (client.get("name"), client.get("version")))
    if "capabilities" in record:
        parts.append("declares=%s" % (sorted(record["capabilities"]) or "nothing"))
    return "  " + " ".join(parts).rstrip()


def serve(era, port, log):
    return ThreadingHTTPServer(("127.0.0.1", port), make_handler(era, log))


def main():
    ap = argparse.ArgumentParser()
    ap.add_argument("--era", choices=["modern", "legacy"], default="modern")
    ap.add_argument("--port", type=int, default=8240)
    args = ap.parse_args()
    server = serve(args.era, args.port, lambda e: print(json.dumps(e, sort_keys=True), flush=True))
    print("probe (%s era) on http://127.0.0.1:%d/mcp" % (args.era, args.port), file=sys.stderr, flush=True)
    try:
        server.serve_forever()
    except KeyboardInterrupt:
        pass


if __name__ == "__main__":
    main()

6. 运行结果

官方 Python SDK

probe_runs.py 在脚本内启动探针,并让官方 SDK 的 mcp.client.Client 连接四次:新代与旧代探针各一次不带回调、一次带上采样、根目录、征询的回调。三个列表调用由脚本发出;真实客户端会自己发。

探针服务器客户端回调请求顺序声明的能力
modern无server/discover → tools/list, resources/list, prompts/list无
modernsampling, roots, elicitationserver/discover → tools/list, resources/list, prompts/listelicitation, roots, sampling
legacy无server/discover → initialize → notifications/initialized → tools/list, resources/list, prompts/list无
legacysampling, roots, elicitationserver/discover → initialize → notifications/initialized → tools/list, resources/list, prompts/listelicitation, roots, sampling
  • SDK 只声明回调允许的能力,不多也不少。所以“SDK 支持采样”的意思是应用传入了采样回调。
  • 对旧代探针,SDK 先发 server/discover,被拒绝后用 2025-11-25 发 initialize。它的 auto 模式就是这样设计的。旧代里被拒绝的 server/discover 是正常现象,不是故障。
  • 它默认的 clientInfo 是 mcp/0.1.0,所以基于 SDK 的产品不一定能靠名称认出来。
probe_runs.py
#!/usr/bin/env python3
"""Connect the official Python SDK client (mcp==2.3.0) to the probe server in four configurations and print what
the probe recorded. The list calls are issued by this script; a real client issues its own, and that is what you read.

Usage: probe_runs.py      Exit code 0 = every run recorded what its configuration implies, 1 = it did not.
"""
import asyncio
import sys
import threading

from mcp import types
from mcp.client import Client

import client_probe_server as probe

PORT = 8241


async def no_sampling(context, params):
    return types.ErrorData(code=-32601, message="not used in this run")


async def no_roots(context):
    return types.ErrorData(code=-32601, message="not used in this run")


async def no_elicitation(context, params):
    return types.ErrorData(code=-32601, message="not used in this run")


def run(era, callbacks):
    records = []
    server = probe.serve(era, PORT, records.append)
    thread = threading.Thread(target=server.serve_forever, daemon=True)
    thread.start()
    kwargs = {"sampling_callback": no_sampling, "list_roots_callback": no_roots,
              "elicitation_callback": no_elicitation} if callbacks else {}

    async def drive():
        async with Client("http://127.0.0.1:%d/mcp" % PORT, **kwargs) as client:
            await client.list_tools()
            await client.list_resources()
            await client.list_prompts()

    try:
        asyncio.run(drive())
    finally:
        server.shutdown()
        server.server_close()
        thread.join()
    return records


def main():
    failed = 0
    for era in ("modern", "legacy"):
        for callbacks in (False, True):
            records = run(era, callbacks)
            print("run: era=%s callbacks=%s" % (era, "sampling,roots,elicitation" if callbacks else "none"))
            for record in records:
                print(probe.summarize(record))
            methods = [r["method"] for r in records]
            declared = [r for r in records if "capabilities" in r]
            wanted = ["elicitation", "roots", "sampling"] if callbacks else []
            ok = (methods[:1] == ["server/discover"]  # the SDK always probes first
                  and ("initialize" in methods) == (era == "legacy")  # only a legacy server gets the handshake
                  and [m for m in methods if m.endswith("/list")] == ["tools/list", "resources/list", "prompts/list"]
                  and bool(declared) and all(sorted(r["capabilities"]) == wanted for r in declared))
            print("  check: %s" % ("as configured" if ok else "NOT as configured"))
            failed += 0 if ok else 1
    return 1 if failed else 0


if __name__ == "__main__":
    sys.exit(main())
原始输出:probe_runs.py
run: era=modern callbacks=none
  server/discover            protocol=2026-07-28 client=mcp/0.1.0 declares=nothing
  tools/list                 protocol=2026-07-28 client=mcp/0.1.0 declares=nothing
  resources/list             protocol=2026-07-28 client=mcp/0.1.0 declares=nothing
  prompts/list               protocol=2026-07-28 client=mcp/0.1.0 declares=nothing
  check: as configured
run: era=modern callbacks=sampling,roots,elicitation
  server/discover            protocol=2026-07-28 client=mcp/0.1.0 declares=['elicitation', 'roots', 'sampling']
  tools/list                 protocol=2026-07-28 client=mcp/0.1.0 declares=['elicitation', 'roots', 'sampling']
  resources/list             protocol=2026-07-28 client=mcp/0.1.0 declares=['elicitation', 'roots', 'sampling']
  prompts/list               protocol=2026-07-28 client=mcp/0.1.0 declares=['elicitation', 'roots', 'sampling']
  check: as configured
run: era=legacy callbacks=none
  server/discover            protocol=2026-07-28 client=mcp/0.1.0 declares=nothing
  initialize                 protocol=2025-11-25 client=mcp/0.1.0 declares=nothing
  notifications/initialized  protocol=2025-11-25
  tools/list                 protocol=2025-11-25
  resources/list             protocol=2025-11-25
  prompts/list               protocol=2025-11-25
  check: as configured
run: era=legacy callbacks=sampling,roots,elicitation
  server/discover            protocol=2026-07-28 client=mcp/0.1.0 declares=['elicitation', 'roots', 'sampling']
  initialize                 protocol=2025-11-25 client=mcp/0.1.0 declares=['elicitation', 'roots', 'sampling']
  notifications/initialized  protocol=2025-11-25
  tools/list                 protocol=2025-11-25
  resources/list             protocol=2025-11-25
  prompts/list               protocol=2025-11-25
  check: as configured

Claude Code 2.1.292

claude_code_probe.py 把探针加到真实的 claude CLI 上,运行它的健康检查 claude mcp list,再打印收到的内容。HOME、XDG_CONFIG_HOME、CLAUDE_CONFIG_DIR 指向一次性目录,所以你自己的配置不会被读取或修改。测于 2026-10-26,macOS。

探针服务器claude mcp list请求顺序完整的声明
legacyConnectedserver/discover → initialize → notifications/initialized → tools/list{"elicitation": {"form": {}, "url": {}}, "roots": {"listChanged": true}}
modernConnectedserver/discover → tools/list{"elicitation": {"form": {}, "url": {}}, "roots": {"listChanged": true}}
  • Claude Code 先用 2026-07-28 探测 server/discover;对旧代探针则回退到 initialize,使用 2025-11-25。它两代都说,厂商页面写的是 2026-07-28(6)。
  • 它声明 elicitation(含 form、url)和 roots(含 listChanged),没有 sampling。这与第二节的格子 4、5 和空的采样格一致:厂商页面和线上的实际行为说的是同一件事。
  • 在新代运行里它仍然发送 roots.listChanged,尽管 2026-07-28 的 schema 把 roots 定义为没有字段。schema 并不禁止多余字段;服务器忽略它即可。
  • claude mcp list 只请求了 tools/list。它是健康检查,不是会话,所以没看到 resources/list、prompts/list 说明不了什么(第七节)。
claude_code_probe.py
#!/usr/bin/env python3
"""Connect the real Claude Code CLI to the probe server and print what it declares.

`claude mcp list` health-checks every configured server, so adding the probe and running it once records the
client's own handshake. HOME, XDG_CONFIG_HOME and CLAUDE_CONFIG_DIR point at a throw-away directory, so your own
Claude Code configuration and servers are neither read nor changed. Needs the `claude` CLI on PATH; exit code 3
when it is missing.
Usage: claude_code_probe.py [--save FILE]   (--save writes the full records of both runs as JSON)
"""
import argparse
import json
import os
import shutil
import subprocess
import sys
import tempfile
import threading
from pathlib import Path

import client_probe_server as probe

PORT = 8243
URL = "http://127.0.0.1:%d/mcp" % PORT


def run_era(era, env, cwd):
    records = []
    server = probe.serve(era, PORT, records.append)
    thread = threading.Thread(target=server.serve_forever, daemon=True)
    thread.start()
    try:
        subprocess.run(["claude", "mcp", "add", "--transport", "http", "-s", "local", "probe", URL],
                       cwd=cwd, env=env, check=True, capture_output=True, text=True, timeout=120)
        listed = subprocess.run(["claude", "mcp", "list"], cwd=cwd, env=env, capture_output=True, text=True, timeout=120)
        status = [line for line in listed.stdout.splitlines() if line.startswith("probe:")]
        subprocess.run(["claude", "mcp", "remove", "probe", "-s", "local"], cwd=cwd, env=env, capture_output=True, text=True, timeout=120)
    finally:
        server.shutdown()
        server.server_close()
        thread.join()
    return records, status[0].split(" - ")[-1] if status else "no status line"


def main():
    ap = argparse.ArgumentParser()
    ap.add_argument("--save")
    args = ap.parse_args()
    if not shutil.which("claude"):
        print("claude CLI not found on PATH", file=sys.stderr)
        return 3
    version = subprocess.run(["claude", "--version"], capture_output=True, text=True, timeout=60).stdout.strip()
    print("claude --version: %s" % version)
    saved = {"version": version}
    with tempfile.TemporaryDirectory() as home, tempfile.TemporaryDirectory() as cwd:
        env = dict(os.environ, HOME=home, XDG_CONFIG_HOME=os.path.join(home, ".config"),
                   CLAUDE_CONFIG_DIR=os.path.join(home, ".claude"))
        for era in ("legacy", "modern"):
            records, status = run_era(era, env, cwd)
            saved[era] = records
            print("run: probe era=%s, claude mcp list says: %s" % (era, status))
            for record in records:
                print(probe.summarize(record))
            first = next((r for r in records if "capabilities" in r), None)
            if first:
                print("  declared in full: %s" % json.dumps(first["capabilities"], sort_keys=True))
    if args.save:
        Path(args.save).write_text(json.dumps(saved, indent=1, sort_keys=True) + "\n", encoding="utf-8")
    return 0


if __name__ == "__main__":
    sys.exit(main())
原始输出:claude_code_probe.py
claude --version: 2.1.292 (Claude Code)
run: probe era=legacy, claude mcp list says: ✔ Connected
  server/discover            protocol=2026-07-28 client=claude-code/2.1.292 declares=['elicitation', 'roots']
  initialize                 protocol=2025-11-25 client=claude-code/2.1.292 declares=['elicitation', 'roots']
  notifications/initialized  protocol=2025-11-25
  tools/list                 protocol=2025-11-25
  declared in full: {"elicitation": {"form": {}, "url": {}}, "roots": {"listChanged": true}}
run: probe era=modern, claude mcp list says: ✔ Connected
  server/discover            protocol=2026-07-28 client=claude-code/2.1.292 declares=['elicitation', 'roots']
  tools/list                 protocol=2026-07-28 client=claude-code/2.1.292 declares=['elicitation', 'roots']
  declared in full: {"elicitation": {"form": {}, "url": {}}, "roots": {"listChanged": true}}

7. 读探针日志

日志里看到含义怎么办
server/discover 带 protocol=2026-07-28,随后是列表调用,没有 initialize新代客户端连新代服务器。每个请求的 _meta 都带着声明从每个请求里读声明;不要为它保存连接级状态
server/discover 被拒绝,随后是 initialize 且 protocol 更旧旧代客户端,或回退中的新代客户端(SDK 和 Claude Code 都这样)。声明只在 initialize 里做一次在 initialize 时按连接保存。不要把被拒绝的 server/discover 记成错误
declares 里没有 sampling客户端不会回应采样请求让采样成为可选项:提供不调用客户端模型的路径。2026-07-28 里如果没有它就无法处理请求,返回 -32021
elicitation 带 form 和 url两种模式都允许。空的 {} 表示只有表单(2025-11-25)按声明选择模式,绝不发送没有声明的模式
声明了 roots,但没看到 roots/list 调用声明表示客户端会回应,它不会主动来问需要时由你来问:旧代用请求,2026-07-28 放在 inputRequests 里
只请求了 tools/list不能证明不支持资源或提示:可能只是健康检查,也可能宿主等用户操作时才请求对照厂商页面(第三节)和真实会话
initialize 之后的请求没有客户端名称和能力旧代里声明按连接只做一次按连接关联,不要按请求关联

8. 失败模式

失败原因处理
服务器不检查声明就发采样或征询请求客户端从未声明过。两代规范都禁止依赖未声明的能力每次发送前检查 capabilities 并分支;2026-07-28 里需求无法满足时返回 -32021
把空格当成“不支持”矩阵记录的是页面怎么写,页面可能对产品已有的行为保持沉默空格就是未知,用探针去测
抄来的矩阵过期厂商会改页面,也会改产品每一格写上日期、保留原文,依赖之前再取一次页面
已声明的能力在某种模式下不能用厂商做了限制:Claude Code 只在“interactive terminal sessions”里提供征询(c1)读厂商页面上的限制;按用户实际的运行模式测试
以为一个客户端只说一个修订版客户端往往说好几个:第六节的两个客户端都先探测新修订版再回退两代都支持,或按学习路径里的兼容矩阵处理
忽略子能力sampling.tools、sampling.context、elicitation.url 只在较新的修订版存在要测子字段,不能只测能力本身

9. 新增或复查一行

  1. 找到厂商自己的页面。如果它写明了该特性,原样复制那句话,并记下网址和日期;没写明就让格子留空。
  2. 用探针测这个客户端(第五节)。把 declares 与页面关于根目录、采样、征询的描述对照。两者不一致时必有一方是错的:客户端发什么,以线上为准;产品拿它做什么,以厂商为准。
  3. 把客户端的版本号写在测量结果旁边。
  4. 客户端升级或页面变化时,重做第 1、2 步。

版本与验证说明

厂商原文于 2026-10-26 取自第二节列出的页面。规范原文与 schema 来自官方仓库的同一个固定提交(dae694f6;修订版 2026-07-28 及之前四个)。探针运行环境为 Python 3.14、mcp==2.3.0、macOS,以及 Claude Code CLI 2.1.292。厂商会改页面也会改产品,这里每个数字都带日期,第九节说明怎样复查。早期版本曾用一长串 ✅ 和 ❌ 表示支持,没有给任何一格注明来源;现在只保留厂商页面写明的内容,每格都引用原文。

来源