PluginBench
Skill
Official
Review
Audit score 70

mcp-cli

github/awesome-copilot

CLI interface to discover and call MCP servers and tools from the command line.

What is mcp-cli?

mcp-cli provides command-line access to Model Context Protocol (MCP) servers, enabling you to discover available tools, inspect their schemas, and execute them directly. Use it when you need to interact with external systems like filesystems, APIs, or databases through MCP without writing custom code.

  • List all available MCP servers and their tools
  • Explore tool parameters and JSON input schemas
  • Execute MCP tools with JSON arguments from the CLI
  • Search and filter tools by name using glob patterns
  • Output results as JSON for scripting and piping
  • Include tool descriptions for better understanding

How to install mcp-cli

npx skills add https://github.com/github/awesome-copilot --skill mcp-cli
Prerequisites
  • Node.js and npm installed
  • MCP servers configured and running in your environment
Claude Code
Cursor
Windsurf
Cline

How to use mcp-cli

  1. 1.Run `mcp-cli` to list all available servers and tools
  2. 2.Run `mcp-cli <server>` to see tools and their parameters for a specific server
  3. 3.Run `mcp-cli <server>/<tool>` to view the full JSON input schema for a tool
  4. 4.Run `mcp-cli <server>/<tool> '<json>'` to execute a tool with arguments
  5. 5.Use `mcp-cli grep "<glob>"` to search for tools by name pattern
  6. 6.Add `-d` flag to any command to include tool descriptions in output
  7. 7.Use `--json` flag to output results as JSON for parsing by other tools

Use cases

Good for
  • Discover what MCP servers and tools are available in your environment
  • Read files or query data sources through filesystem or database MCP servers
  • Chain multiple MCP tool calls together using pipes and command substitution
  • Debug MCP tool schemas before integrating them into agent workflows
  • Automate data extraction by piping MCP output to jq or other CLI tools
Who it's for
  • Developers integrating MCP servers into workflows
  • DevOps engineers automating tool interactions
  • AI agent developers testing MCP tool availability
  • Command-line users exploring external data sources

mcp-cli FAQ

How do I see what MCP servers are available?

Run `mcp-cli` with no arguments to list all servers and their tool names.

How do I call a tool with complex JSON arguments?

Use a heredoc (`<<EOF`) or pipe from a file: `cat args.json | mcp-cli server/tool` to avoid shell quoting issues.

What do the exit codes mean?

Exit code 0 is success, 1 is a client error (bad args/config), 2 is a server error (tool failed), and 3 is a network error.

Can I use the output in scripts?

Yes, use the `--json` flag to get JSON output suitable for parsing with jq or other tools.

How do I search for a specific tool?

Use `mcp-cli grep "<glob>"` to search tools by name pattern, e.g., `mcp-cli grep "*file*"`.

Full instructions (SKILL.md)

Source of truth, from github/awesome-copilot.


name: mcp-cli description: Interface for MCP (Model Context Protocol) servers via CLI. Use when you need to interact with external tools, APIs, or data sources through MCP servers, list available MCP servers/tools, or call MCP tools from command line.

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