Description: No description available.
The `ibm/mcp-cli` repository provides a powerful and feature-rich command-line interface (CLI) for interacting with Model Context Protocol (MCP) servers. Its primary purpose is to facilitate seamless communication with Large Language Models (LLMs) by integrating with the CHUK Tool Processor and CHUK-LLM, enabling tool usage, conversation management, and various operational modes. The CLI is designed to be user-friendly and versatile, catering to both casual users and developers seeking to automate interactions with LLMs.
A key feature is its default configuration, which leverages Ollama with the `gpt-oss` reasoning model for local, privacy-focused operation, eliminating the need for API keys in many cases. This makes it easy for users to get started quickly and experiment with LLMs without complex setup. The CLI supports a wide range of LLM providers, including OpenAI, Anthropic, Azure OpenAI, Google Gemini, Groq, Perplexity, IBM watsonx, and Mistral AI, allowing users to choose the best model for their needs.
Recent updates, particularly in version 0.16, introduce significant enhancements. The "AI Virtual Memory" feature provides OS-style virtual memory for managing conversation context, improving efficiency and handling longer conversations. Users can control the token budget, choose different VM modes (passive, relaxed, strict), and visualize the VM state. The "Execution Plans" feature allows users to create, inspect, and execute reproducible tool call graphs. This includes model-driven planning, where the LLM autonomously creates and executes plans, parallel batch execution, variable resolution, dry-run mode, checkpointing, and DAG visualization. This feature is powered by the `chuk-ai-planner` library.
Furthermore, the CLI supports "MCP Apps," enabling interactive HTML UIs served by MCP servers. These apps run in sandboxed iframes and communicate with the server via a WebSocket bridge, providing a rich user experience. The CLI also includes features for production hardening, such as secret redaction in logs, structured file logging, per-server timeouts, and thread-safe OAuth. Performance and polish improvements include O(1) tool lookups, cached LLM tool metadata, startup progress messages, token usage tracking, session persistence, and conversation export. A real-time browser dashboard is also available, providing an agent terminal, activity stream, plan viewer, tool registry, config panel, and file attachment capabilities. Multi-modal attachments, including images, text, and audio, are supported through commands like `/attach` and `--attach`, as well as inline references.
The architecture of the MCP CLI is modular, built upon the CHUK Tool Processor, CHUK-LLM, and CHUK-Term libraries. This modularity promotes clean separation of concerns and facilitates maintainability and extensibility. The CLI offers multiple operational modes, including chat mode, interactive mode, command mode, and direct commands, providing flexibility for different use cases. The advanced chat interface features streaming responses, reasoning visibility, concurrent tool execution, smart interruption, performance metrics, rich formatting, token usage tracking, multi-modal attachments, session persistence, and conversation export. The CLI also provides robust tool system features, including automatic discovery, provider adaptation, production-grade execution, multiple execution strategies, concurrent execution, rich progress display, tool history, middleware, and streaming tool calls.
The documentation is comprehensive, covering architecture, commands, token management, execution plans, the dashboard, attachments, MCP apps, OAuth authentication, streaming integration, package management, UI themes, output system, terminal management, and testing. The prerequisites include Python 3.11 or higher, Ollama (for local operation), and API keys for cloud providers. Installation is straightforward, with quick start instructions for Ollama and detailed guidance for using different models and cloud providers. The CLI offers global configuration options for specifying servers, providers, models, and other settings, allowing users to customize their experience.
Fetching additional details & charts...