M

mcp-cli

by @githubv
4.5(308)

Interact with MCP servers via CLI to connect external tools, APIs, or data sources, and list available resources.

mcp-clicommand-line-interfacebackend-toolsautomationdeveloper-utilitiesGitHub
Installation
npx skills add github/awesome-copilot --skill mcp-cli
compare_arrows

Before / After Comparison

1
Before

Manually managing external tools and data sources on MCP servers is cumbersome and inefficient, making automation difficult. Querying available resources is inconvenient, affecting development efficiency.

After

Leveraging CLI for efficient interaction with MCP servers, external resources can be easily connected and available items listed. This significantly improves resource management efficiency and streamlines the development process.

SKILL.md

MCP-CLI

Access MCP servers through the command line. MCP enables interaction with external systems like GitHub, filesystems, databases, and APIs.

Commands

CommandOutput
mcp-cliList 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)

Workflow

  1. Discover: mcp-cli → see available servers and tools
  2. Explore: mcp-cli <server> → see tools with parameters
  3. Inspect: mcp-cli <server>/<tool> → get full JSON input schema
  4. Execute: mcp-cli <server>/<tool> '<json>' → run with arguments

Examples

# 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\": \"{}\"}"'

Options

FlagPurpose
-j, --jsonJSON output for scripting
-r, --rawRaw text content
-dInclude descriptions

Exit Codes

  • 0: Success
  • 1: Client error (bad args, missing config)
  • 2: Server error (tool failed)
  • 3: Network error

User Reviews (0)

Write a Review

Effect
Usability
Docs
Compatibility

No reviews yet

Statistics

Installs9.2K
Rating4.5 / 5.0
Version
Updated2026年5月23日
Comparisons1

User Rating

4.5(308)
5
23%
4
51%
3
23%
2
2%
1
0%

Rate this Skill

0.0

Compatible Platforms

🔧Claude Code
🔧OpenClaw
🔧OpenCode
🔧Codex
🔧Gemini CLI
🔧GitHub Copilot
🔧Amp
🔧Kimi CLI

Timeline

Created2026年3月16日
Last Updated2026年5月23日