mcp-cli  by chrishayuk

CLI tool for interacting with Model Context Provider servers

created 8 months ago
1,586 stars

Top 26.9% on sourcepulse

GitHubView on GitHub
1 Expert Loves This Project
Project Summary

This CLI client provides a robust interface for interacting with Model Context Provider (MCP) servers, enabling seamless communication with Large Language Models (LLMs). It's designed for developers and power users who need to integrate LLM capabilities into their workflows, offering features like tool usage, conversation management, and multiple operational modes for chat, scripting, and direct command execution.

How It Works

The mcp-cli is built upon the chuk-mcp protocol library, which handles the core communication layer. This separation allows the CLI to focus on user experience, offering features like command completion, colorful output, and progress indicators. It supports multiple LLM providers (OpenAI, Ollama) and features a flexible tool system for automatic discovery and execution of server-provided tools, including complex multi-step tool chains.

Quick Start & Requirements

  • Installation: pip install -e ".[cli,dev]" (from source) or via UV.
  • Prerequisites: Python 3.11+, OpenAI API key (as OPENAI_API_KEY), local Ollama installation (if using Ollama), and a server_config.json file.
  • Links: CHUK-MCP Protocol Library

Highlighted Details

  • Multiple operational modes: Chat, Interactive, Command (Unix-friendly scripting), and Direct Commands.
  • Robust tool system with automatic discovery, server-aware execution, and multi-step tool chain support.
  • Advanced conversation management including history tracking, filtering, JSON export, and compaction.
  • Extensible architecture for adding new LLM providers.
  • Rich user experience with command completion, colorful output, and progress indicators.

Maintenance & Community

The project acknowledges contributions from Anthropic Claude, Rich, Typer, Prompt Toolkit, and CHUK-MCP. Contribution guidelines are provided.

Licensing & Compatibility

Licensed under the MIT License, permitting commercial use and integration with closed-source projects.

Limitations & Caveats

The README mentions a reserved section for future WebAssembly support, implying it is not currently available. The project relies on external LLM providers and their respective APIs/local installations.

Health Check
Last commit

2 weeks ago

Responsiveness

1 day

Pull Requests (30d)
5
Issues (30d)
8
Star History
471 stars in the last 90 days

Explore Similar Projects

Feedback? Help us improve.