ch

chrishayuk/mcp-cli

๐Ÿ ๐Ÿ  Yet another CLI tool for testing MCP servers

#python#cli#minecraft
Publisherchrishayuk/mcp-cli
Submitted date4/19/2025

Overview: MCP CLI - Model Context Provider Command Line Interface

๐Ÿ“Œ Title

MCP CLI - Model Context Provider Command Line Interface
A powerful, feature-rich command-line tool for interacting with Model Context Provider (MCP) servers, enabling seamless communication with Large Language Models (LLMs) via the CHUK-MCP protocol.

๐Ÿ› ๏ธ How to Use

Installation

  • From Source:
    git clone https://github.com/chrishayuk/mcp-cli cd mcp-cli pip install -e ".[cli,dev]"
  • Using UV (Alternative):
    uv sync --reinstall uv run mcp-cli --help

Running the CLI

  • Chat Mode:
    mcp-cli chat --server sqlite
  • Interactive Mode:
    mcp-cli interactive --server sqlite
  • Command Mode (for automation):
    mcp-cli cmd --server sqlite --input file.txt --prompt "Summarize: {{input}}"

๐ŸŒŸ Key Features

  • Multiple Modes:

    • Chat Mode โ€“ Conversational LLM interaction with automated tool usage.
    • Interactive Mode โ€“ Command-driven server operations.
    • Command Mode โ€“ Scriptable automation for pipelines.
    • Direct Commands โ€“ Run single commands without entering interactive mode.
  • Multi-Provider Support:

    • OpenAI (gpt-4o, gpt-4-turbo)
    • Ollama (llama3.2, qwen2.5-coder)
    • Extensible for additional providers.
  • Advanced Tool System:

    • Automatic tool discovery & execution.
    • Tool call history tracking.
    • Multi-step tool chain support.
  • Conversation Management:

    • Full history tracking.
    • JSON export & compaction.
    • Filtering by message ranges.
  • Rich UX:

    • Command autocompletion.
    • Colorful output & progress indicators.
    • Detailed help docs.
  • Resilient Resource Handling:

    • Graceful error recovery.
    • Clean terminal restoration.
    • Multi-server connection support.

๐Ÿ“‹ Use Cases

  1. Automated Summarization โ€“ Process documents via command mode.
  2. Database Interaction โ€“ Direct SQL tool calls for querying.
  3. Scripting & Pipelines โ€“ Integrate with Unix tools (parallel, grep).
  4. Debugging & Analysis โ€“ Export conversation history in JSON.
  5. Multi-Model Testing โ€“ Switch between OpenAI & Ollama models.

๐Ÿš€ Ideal for developers, researchers, and automation workflows!

Visit More

View All