Catalog
github/mcp-cli

github

mcp-cli

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.

v1.0Latest
New~624Updated Jun 26, 2026

MCP-CLI

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

Commands

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)

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

Flag Purpose
-j, --json JSON output for scripting
-r, --raw Raw text content
-d Include descriptions

Exit Codes

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

Select a file to preview

Overall Score

72/100

Grade

B

Good

Safety

75

Quality

70

Clarity

82

Completeness

62

Summary

This skill provides a reference guide for interacting with MCP (Model Context Protocol) servers through a CLI interface. It documents command syntax, workflows for discovering and executing MCP tools, and practical examples for common tasks like file operations and search patterns.

Detected Capabilities

command-line interfaceMCP server communicationtool discoveryJSON parsing and generationfile reading via MCPsearch operationsstdin/stdout piping

Trigger Keywords

Phrases that MCP clients use to match this skill to user intent.

call mcp toolsmcp server interactiondiscover mcp toolsaccess external apismcp-cli commandtool parameter inspection

Risk Signals

INFO

No destructive operations (rm, chmod, sudo) detected

SKILL.md (general)
INFO

No hardcoded credentials or secrets detected

SKILL.md (general)
INFO

No pipe-to-shell patterns (curl | sh) detected

SKILL.md (general)
WARNING

JSON arguments passed as strings with shell quoting — potential for injection if user input is not properly escaped

SKILL.md line: `mcp-cli <server>/<tool> '<json>'`
WARNING

Complex shell chaining example uses xargs with sh -c, which could be vulnerable if command substitution is not sanitized

SKILL.md lines: Complex example with jq and xargs

Use Cases

  • Access external tools and APIs via MCP servers from the CLI
  • Discover available MCP servers and their exposed tools
  • Inspect tool parameters and JSON input schemas
  • Call MCP tools with structured arguments
  • Search for tools by name pattern using glob syntax
  • Chain MCP tool outputs with other commands for complex workflows

Quality Notes

  • Strength: Clear command reference with examples covering basic to advanced workflows
  • Strength: Well-structured documentation with discovery→explore→inspect→execute workflow
  • Strength: Option flags clearly documented with purpose
  • Strength: Exit codes documented for error handling
  • Weakness: No documentation of security considerations when passing JSON arguments from user input
  • Weakness: The complex chaining example demonstrates a pattern (xargs with sh -c) that could be fragile or unsafe if not carefully used
  • Weakness: No mention of how to handle MCP servers that may require authentication or special configuration
  • Weakness: No guidance on error handling beyond exit codes — what does a developer do when a tool fails?
  • Weakness: No mention of limitations (e.g., maximum JSON size, timeout behavior, tool availability constraints)
Model: claude-haiku-4-5-20251001Analyzed: Jun 26, 2026

Reviews

Add this skill to your library to leave a review.

No reviews yet

Be the first to share your experience.

Use github/mcp-cli in your dev environment

Command Palette

Search for a command to run...