mcp-cli by github/awesome-copilot
npx skills add https://github.com/github/awesome-copilot --skill mcp-cli通过命令行访问 MCP 服务器。MCP 支持与外部系统(如 GitHub、文件系统、数据库和 API)进行交互。
| 命令 | 输出 |
|---|---|
mcp-cli | 列出所有服务器和工具名称 |
mcp-cli <server> | 显示带参数的工具 |
mcp-cli <server>/<tool> | 获取工具的 JSON 模式 |
mcp-cli <server>/<tool> '<json>' | 使用参数调用工具 |
mcp-cli grep "<glob>" |
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
| 按名称搜索工具 |
添加 -d 以包含描述(例如 mcp-cli filesystem -d)
mcp-cli → 查看可用的服务器和工具mcp-cli <server> → 查看带参数的工具mcp-cli <server>/<tool> → 获取完整的 JSON 输入模式mcp-cli <server>/<tool> '<json>' → 使用参数运行工具# 列出所有服务器和工具名称
mcp-cli
# 查看所有带参数的工具
mcp-cli filesystem
# 包含描述(更详细)
mcp-cli filesystem -d
# 获取特定工具的 JSON 模式
mcp-cli filesystem/read_file
# 调用工具
mcp-cli filesystem/read_file '{"path": "./README.md"}'
# 搜索工具
mcp-cli grep "*file*"
# 用于解析的 JSON 输出
mcp-cli filesystem/read_file '{"path": "./README.md"}' --json
# 包含引号的复杂 JSON(使用 heredoc 或 stdin)
mcp-cli server/tool <<EOF
{"content": "Text with 'quotes' inside"}
EOF
# 或从文件/命令管道输入
cat args.json | mcp-cli server/tool
# 查找所有 TypeScript 文件并读取第一个
mcp-cli filesystem/search_files '{"path": "src/", "pattern": "*.ts"}' --json | jq -r '.content[0].text' | head -1 | xargs -I {} sh -c 'mcp-cli filesystem/read_file "{\"path\": \"{}\"}"'
| 标志 | 用途 |
|---|---|
-j, --json | 用于脚本的 JSON 输出 |
-r, --raw | 原始文本内容 |
-d | 包含描述 |
0:成功1:客户端错误(参数错误,配置缺失)2:服务器错误(工具执行失败)3:网络错误每周安装量
7.8K
代码仓库
GitHub 星标数
26.7K
首次出现
2026年1月23日
安全审计
安装于
opencode7.6K
github-copilot7.6K
codex7.6K
gemini-cli7.5K
kimi-cli7.5K
cursor7.5K
Access MCP servers through the command line. MCP enables interaction with external systems like GitHub, filesystems, databases, and APIs.
| Command | Output |
|---|---|
mcp-cli | List all servers and tool names |
mcp-cli <server> | Show tools with parameters |
mcp-cli <server>/<tool> | Get tool JSON schema |
mcp-cli <server>/<tool> '<json>' | Call tool with arguments |
mcp-cli grep "<glob>" | Search tools by name |
Add-d to include descriptions (e.g., mcp-cli filesystem -d)
mcp-cli → see available servers and toolsmcp-cli <server> → see tools with parametersmcp-cli <server>/<tool> → get full JSON input schemamcp-cli <server>/<tool> '<json>' → run with arguments# List all servers and tool names
mcp-cli
# See all tools with parameters
mcp-cli filesystem
# With descriptions (more verbose)
mcp-cli filesystem -d
# Get JSON schema for specific tool
mcp-cli filesystem/read_file
# Call the tool
mcp-cli filesystem/read_file '{"path": "./README.md"}'
# Search for tools
mcp-cli grep "*file*"
# JSON output for parsing
mcp-cli filesystem/read_file '{"path": "./README.md"}' --json
# Complex JSON with quotes (use heredoc or stdin)
mcp-cli server/tool <<EOF
{"content": "Text with 'quotes' inside"}
EOF
# Or pipe from a file/command
cat args.json | mcp-cli server/tool
# Find all TypeScript files and read the first one
mcp-cli filesystem/search_files '{"path": "src/", "pattern": "*.ts"}' --json | jq -r '.content[0].text' | head -1 | xargs -I {} sh -c 'mcp-cli filesystem/read_file "{\"path\": \"{}\"}"'
| Flag | Purpose |
|---|---|
-j, --json | JSON output for scripting |
-r, --raw | Raw text content |
-d | Include descriptions |
0: Success1: Client error (bad args, missing config)2: Server error (tool failed)3: Network errorWeekly Installs
7.8K
Repository
GitHub Stars
26.7K
First Seen
Jan 23, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykWarn
Installed on
opencode7.6K
github-copilot7.6K
codex7.6K
gemini-cli7.5K
kimi-cli7.5K
cursor7.5K
97,600 周安装