MCP CLI Tool
April 4, 2025 ยท View on GitHub
A command-line interface for interacting with MCP (Model Control Protocol) servers. This tool allows you to easily interact with various AI models through a simple command-line interface.
Features
- Interactive CLI interface
- Support for multiple MCP servers
- Easy-to-use argument prompts
- Progress tracking for long-running operations
- Configurable server settings
Installation
You can install the package directly from GitHub using pip:
pip install git+https://github.com/JckHoe/python-mcp-client.git
Or from PyPI:
pip install mcp-cli
Configuration
Create a servers_config.json file with your MCP server configuration:
{
"mcpServers": {
"mcp-hfspace": {
"command": "npx",
"args": [
"-y",
"@llmindset/mcp-hfspace",
"shuttleai/shuttle-jaguar",
"styletts2/styletts2",
"Qwen/QVQ-72B-preview"
]
}
}
}
Usage
Run the CLI tool:
mcp-cli
Or specify a custom configuration file:
mcp-cli -c path/to/config.json
Enable verbose logging:
mcp-cli -v
Available Tools
The tool will display all available tools from your configured MCP servers. Each tool will show:
- Name
- Description
- Required and optional arguments
Interactive Usage
- The tool will display a list of available tools
- Enter the name of the tool you want to use
- Follow the prompts to enter required and optional arguments
- View the results of the tool execution
- Type '/bye' to exit the program
Development
To set up the development environment:
git clone https://github.com/yourusername/mcp-cli.git
cd mcp-cli
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
pip install -e .
License
MIT License