用途:mcp-cli 面向 MCP 服务器的验证与调试,适合在配置 MCP 服务器、检查工具 schema、执行端到端工具调用测试时使用。
主要能力:通过终端命令直接、顺序执行;以严格的通过/失败流程判断服务器是否验证完成;调试时优先使用单服务器命令;重建服务器后用 MCP_NO_DAEMON=1 重新测试。
用法:先安装(若缺失):which mcp-cli || curl -fsSL https://raw.githubusercontent.com/philschmid/mcp-cli/main/install.sh | bash。检查服务器与 schema:mcp-cli info my-server、mcp-cli info my-server my-tool。执行正常路径与失败路径:mcp-cli call my-server my-tool '{"param":"value"}'、mcp-cli call my-server my-tool '{}'。重建后做新连接检查:MCP_NO_DAEMON=1 mcp-cli call my-server my-tool '{"param":"value"}'。验证本仓库源码时可运行本地实现:bun run src/index.ts -c ./mcp_servers.json info filesystem、bun run src/index.ts -c ./mcp_servers.json call filesystem read_file '{"path":"./README.md"}'。
分步参考:references/testing-flow.md、references/configuration-and-arguments.md、references/output-debugging-and-chaining.md、references/errors-and-recovery.md,以及项目文档 getting-started、configuration、commands、testing-guide、troubleshooting、advanced-usage、internals。
限制:除非明确要求,否则不要编写辅助脚本;所有清单命令未通过前不得报告完成。