适合谁
- 希望以微创方式集成 MCP 服务器的 AI 编码代理。
- 需要在终端中直接操作 MCP 工具的开发者。
- 需要高效、可脚本化访问 MCP 工具的用户。
mcp-cli 是一个功能丰富的 CLI 工具,特别适合 AI 代理和终端用户,它以脚本友好方式提供对 MCP 服务器的访问。
mcp-cli 是一个基于 Bun 的轻量级 CLI,用于与 Model Context Protocol (MCP) 服务器交互。它支持通过 stdio 和 HTTP 传输的服务器,提供工具发现、模式查看、调用等功能,并优化了 AI 编程代理的使用体验。
curl -fsSL https://raw.githubusercontent.com/philschmid/mcp-cli/main/install.sh | bash 或 bun install -g https://github.com/philschmid/mcp-cli。2. 创建配置文件 mcp_servers.json(见上图)。3. 使用 mcp-cli 命令。{
"mcpServers": {
"filesystem": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-filesystem",
"."
]
},
"deepwiki": {
"url": "https://mcp.deepwiki.com/mcp"
}
}
}