Model Context Protocol CLI
@shahshrey
关于 Model Context Protocol CLI
概览
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.
其他 分类下的更多 MCP 客户端

Crowded Finance
mcp.crowdedfinance.comThe Crowded MCP allows organizations to run financial operations by asking — managing expenses, contacts, payment processing, reporting, and more. Samples of what you can do: Keep an eye on spending by asking "What sof
ThingsPanel MCP
thingspanelThis MCP server integrates ThingsPanel IoT platform with AI models like Claude, GPT, and others that support the Model Context Protocol.
TRMX MCP Playground
rosaboyleSearcherries: AI Visibility & SEO
searcherries.comConnect Claude, Codex, or any MCP client to your AI visibility and SEO data. Ask how your site performs and where to act next, using your own numbers.
小红书MCP服务
jobsonlook小红书MCP服务 x-s x-t js逆向
评论