Smithery Logo
MCPsSkillsDocsPricing
Login
Smithery Logo

Accelerating the Agent Economy

Resources

DocumentationPrivacy PolicySystem Status

Company

PricingAboutBlog

Connect

© 2026 Smithery. All rights reserved.

    jmreicha

    mcp-cli

    jmreicha/mcp-cli
    Productivity
    1
    2 installs

    About

    SKILL.md

    Install

    Install via Skills CLI

    or add to your agent
    • Claude Code
      Claude Code
    • Codex
      Codex
    • OpenClaw
      OpenClaw
    • Cursor
      Cursor
    • Amp
      Amp
    • GitHub Copilot
      GitHub Copilot
    • Gemini CLI
      Gemini CLI
    • Kilo Code
      Kilo Code
    • Junie
      Junie
    • Replit
      Replit
    • Windsurf
      Windsurf
    • Cline
      Cline
    • Continue
      Continue
    • OpenCode
      OpenCode
    • OpenHands
      OpenHands
    • Roo Code
      Roo Code
    • Augment
      Augment
    • Goose
      Goose
    • Trae
      Trae
    • Zencoder
      Zencoder
    • Antigravity
      Antigravity
    ├─
    ├─
    └─

    About

    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.

    SKILL.md

    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 tools
    mcp-cli info <server> Show server tools and parameters
    mcp-cli info <server> <tool> Get tool JSON schema
    mcp-cli grep "<pattern>" Search tools by name
    mcp-cli call <server> <tool> Call tool (reads JSON from stdin if no args)
    mcp-cli call <server> <tool> '<json>' Call tool with arguments

    Both formats work: <server> <tool> or <server>/<tool>

    Workflow

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

    Examples

    # List all servers
    mcp-cli
    
    # With descriptions
    mcp-cli -d
    
    # See server tools
    mcp-cli info filesystem
    
    # Get tool schema (both formats work)
    mcp-cli info filesystem read_file
    mcp-cli info filesystem/read_file
    
    # Call tool
    mcp-cli call filesystem read_file '{"path": "./README.md"}'
    
    # Pipe from stdin (no '-' needed!)
    cat args.json | mcp-cli call filesystem read_file
    
    # Search for tools
    mcp-cli grep "*file*"
    
    # Extract text from result
    mcp-cli call filesystem read_file '{"path": "./file"}' | jq -r '.content[0].text'
    

    Advanced Chaining

    # Chain: search files → read first match
    mcp-cli call filesystem search_files '{"path": ".", "pattern": "*.md"}' \
      | jq -r '.content[0].text | split("\n")[0]' \
      | xargs -I {} mcp-cli call filesystem read_file '{"path": "{}"}'
    
    # Loop: process multiple files
    mcp-cli call filesystem list_directory '{"path": "./src"}' \
      | jq -r '.content[0].text | split("\n")[]' \
      | while read f; do mcp-cli call filesystem read_file "{\"path\": \"$f\"}"; done
    
    # Conditional: check before reading
    mcp-cli call filesystem list_directory '{"path": "."}' \
      | jq -e '.content[0].text | contains("README")' \
      && mcp-cli call filesystem read_file '{"path": "./README.md"}'
    
    # Multi-server aggregation
    {
      mcp-cli call github search_repositories '{"query": "mcp", "per_page": 3}'
      mcp-cli call filesystem list_directory '{"path": "."}'
    } | jq -s '.'
    
    # Save to file
    mcp-cli call github get_file_contents '{"owner": "x", "repo": "y", "path": "z"}' \
      | jq -r '.content[0].text' > output.txt
    

    jq tips: -r raw output, -e exit 1 if false, -s slurp multiple inputs

    Options

    Flag Purpose
    -d Include descriptions
    -c <path> Specify config file

    Common Errors

    Wrong Command Error Fix
    mcp-cli server tool AMBIGUOUS_COMMAND Use call server tool or info server tool
    mcp-cli run server tool UNKNOWN_SUBCOMMAND Use call instead of run
    mcp-cli list UNKNOWN_SUBCOMMAND Use info instead of list
    mcp-cli call server MISSING_ARGUMENT Add tool name
    mcp-cli call server tool {bad} INVALID_JSON Use valid JSON with quotes

    Exit Codes

    • 0: Success
    • 1: Client error (bad args, missing config)
    • 2: Server error (tool failed)
    • 3: Network error
    Recommended Servers
    MCP Hive
    MCP Hive
    EasyWeek
    EasyWeek
    Svelte
    Svelte
    Repository
    jmreicha/lazycfg
    Files