Model Context Protocol CLI
@shahshrey
About Model Context Protocol CLI
Overview
What is Model Context Protocol CLI?
Model Context Protocol CLI is a command-line client that communicates with an MCP (Model Context Protocol) server, enabling users to send commands, query data, and interact with server resources. It runs on any system with Python 3.8+ and is designed for developers working with MCP-based services.
How to use Model Context Protocol CLI?
Clone the repository, install UV with pip install uv, then run uv sync --reinstall to install dependencies. Start the client with uv run mcp-cli --server sqlite, optionally specifying a JSON configuration file (--config-file), provider (--provider openai or --provider ollama), and model (--model). Use interactive commands like help, chat, list-tools, and list-resources.
Key features of Model Context Protocol CLI
- Protocol-level communication with any MCP server.
- Dynamic exploration of tools, resources, and prompts.
- Support for OpenAI and Ollama providers.
- Interactive and chat modes for live queries.
- Configurable via command-line arguments and JSON files.
Use cases of Model Context Protocol CLI
- Query a SQLite database through an MCP server interactively.
- Explore available tools and resources exposed by an MCP server.
- Integrate with multiple AI model providers (OpenAI, Ollama) for context-based interactions.
FAQ from Model Context Protocol CLI
What prerequisites are needed to run Model Context Protocol CLI?
Python 3.8 or higher. If using OpenAI, set the OPENAI_API_KEY environment variable. If using Ollama, have Ollama installed and running.
Which providers and models are supported?
OpenAI (default model: gpt-4o) and Ollama (default model: llama3.2, also listed as qwen2.5-coder in the README). You can specify a custom model with the --model flag.
How do I set up the OpenAI provider?
Set the OPENAI_API_KEY environment variable (e.g., in a .env file or system variable) before running the client, then use --provider openai.
What is the default model for the Ollama provider?
The default model for Ollama is llama3.2 (the README also mentions qwen2.5-coder earlier; the CLI uses llama3.2 per the usage examples).
Is this project open source?
Yes, it is licensed under the MIT License.
Basic information
Category
Other
Author
More Other MCP clients
MCP (Model Context Protocol) Frontend
shaharia-labFrontend for MCP (Model Context Protocol) Kit for Go - A Complete MCP solutions for ready to use
Mcp-ChatBI
dynamiclu基于 Mcp 架构的 ChatBI,是一种数据分析智能体解决方案
MCP Agent Strategy
hjlarryAnirudh's Chat
kamathA simple NextJS MCP client with sensible keybindings
Aura AI
auraai.appAccess 20+ AI video and image models from Google, OpenAI, xAI, ByteDance, and more. Generate and edit videos with Veo 3.1, Sora 2, Seedance, Kling O3, and images with FLUX, Nano Banana, Seedram 4, GPT Image — all in one
Comments