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服务
jobsonlook小红书MCP服务 x-s x-t js逆向

FormLM
formlmBuild smart forms, scoring quizzes, and evaluation reports through natural language. An MCP Server that lets any AI agent create and manage complete assessment apps end-to-end.
MCP Web Client
jinruoxinchenMCP Web Client project
mcp_ha_xiaozhi
shawn996小智官方服务器(虾哥)对接home assistant的mcp server
Comments