mcpdo
它能做什么
这个技能教 AI 如何使用 mcpdo 命令行工具访问 MCP 服务器。适合希望 AI 使用已连接服务器中的工具和数据的人。
适用场景
- ✓当你询问自己连接了哪些 MCP 服务器或工具时。
- ✓当你希望 AI 调用已连接 MCP 服务器上的某个工具的时候。
- ✓当你需要从 MCP 服务器读取资源或提示词的时候。
技能链接
https://github.com/modelcontextprotocol/inspector/blob/main/skills/mcpdo/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“我想看看我现在连接了哪些 MCP 工具。”
每周 5 个新技能,1 分钟读完。
工作原理
AI 会列出可用的服务器条目,连接其中一个,然后在该已打开的连接上运行列出或调用工具等命令。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
mcpdo — MCP Inspector connection CLI
Connect to an MCP server once, then run many commands against that named connection.
mcpdo servers/list # catalog entries you can connect
mcpdo connect entry-name # connect a catalog entry
mcpdo connect https://example.com/mcp # ad-hoc HTTP/SSE target
mcpdo connect node server.js # ad-hoc stdio target
mcpdo connections/list # open connections
mcpdo @entry-name tools/list
mcpdo @entry-name tools/call <toolName> arg:=value
mcpdo @entry-name resources/list
mcpdo @entry-name resources/read <uri>
mcpdo @entry-name prompts/list
mcpdo --connection entry-name tools/list # flag form of @entry-name
mcpdo disconnect entry-name
The canonical flow is servers/list → connect <entry> → @entry <command>.
Run mcpdo help or mcpdo <command> --help for the full, authoritative list of
commands and flags (auth management, elicitation controls, daemon control, and
more).
How to think about mcpdo
- Connections extend your toolset. Treat every open connection's tools,
resources, and prompts as part of your available capabilities: when facing a
task (or before saying "I can't do that"), check
mcpdo connections/listand the connected servers'tools/list, and call those tools mid-task like any built-in tool. - Answer capability questions with it. "What MCP servers/tools do I have?"
includes mcpdo connections (
connections/list) and catalog entries that are connectable but not connected (servers/list). - Don't auto-connect. Catalog entries don't describe capabilities, and connecting can start an auth flow involving the human. Connect when the user directs it, or when a task clearly needs it — and say so first.
- Inspect via commands, not the filesystem. Entries, connections, auth
state, and daemon state all have read commands; never list or read
~/.mcp-inspectordirectly. The one exception is editing the catalog (below). - Make it always-on (optional). Skills load only on demand; for standing
awareness of mcpdo in a project, append
mcpdo agent-help --instructionsoutput to the project'sCLAUDE.md/AGENTS.md. (mcpdo agent-helpprints this guide;--skill-pathprints the installable skill file's path.)
The catalog
servers/list/servers/show <name>read the catalog: the writable entry file at~/.mcp-inspector/mcp.json(standardmcpServersshape), overridable per shell via--catalog <path>orMCP_CATALOG_PATH.servers/listprints the resolved source path.servers/*shows entries on disk;connections/*shows live daemon state. Two shells with different catalogs share the same connections.- There are no CLI edit commands, by design: add or remove entries by editing
the catalog file directly.
mcpdo connect entry --config path/to/mcp.jsoninstead connects an entry from a read-only foreign config file.
Conventions
--format jsonoutputs JSON; the default,--format text, is human-readable.- Always qualify commands with
@nameor--connection <name>(shorthand--conn) from an agent shell: with non-interactive (non-TTY) stdin, mcpdo requires an explicit connection and errors without one. Omitting it falls back to the most-recently-used connection only on an interactive TTY, or anywhere whenMCP_ALLOW_DEFAULT_CONNECTION=1is set. - Connections persist across separate
mcpdoinvocations and self-heal: a dropped transport (expired session, exited stdio child) transparently re-dials on next use with stored credentials. Don't monitor or reconnect manually; only anauth_requirederror needs action (re-runconnect).mcpdo disconnectends one connection;mcpdo daemon stopresets everything. - The
[legacy]/[modern]era tag onconnections/listis the negotiated protocol generation (legacy= classicinitializehandshake — current and fine, not deprecated). Informational only.
Auth
- Auth is automatic at connect time and stored for reuse (
mcpdo auth/list/mcpdo auth/clear).auth/listshows each stored URL with the catalog or connection names it is "known as" and a● livemarker when a current connection holds it, so the store entries line up with the servers you use.auth/clearaccepts either the store URL or one of those friendly names (mcpdo auth/clear hosted-everything); a name that resolves to n
常见问题
使用服务器之前需要先连接吗?
需要。该技能会先连接服务器,然后针对该命名的连接运行命令。
AI 如何找到正确的命令?
该技能会指向 mcpdo 的帮助输出,其中列出了全部命令和参数。
我用完后可以断开连接吗?
可以。该技能为每个连接提供了断开命令。
详情
作者的原始描述
Access MCP (Model Context Protocol) servers and their tools, resources, and prompts through the mcpdo CLI — connections it holds extend your capabilities alongside any built-in MCP support. Use this skill for any question or task about MCP servers, connections, or tools (e.g. "what MCP servers am I connected to?", "what MCP tools do I have?"), and whenever a task requires inspecting, testing, or scripting against an MCP server (stdio or HTTP) rather than writing custom client code.
热度
- GitHub 星标
- 11k
- 排名
- #11793
- 许可证
- —
- 更新时间
- 2026/10/29
评论
- …