A command-line interface for interacting with MCP servers with intelligent question matching
Project description
MCP Hive Proxy
A command-line interface for interacting with MCP (Model Context Protocol) servers using the SSE protocol.
Features
- Ask questions to any MCP server directly from the command line
- Intelligent question matching for servers with predefined questions
- Automatic parameter handling for specialized MCP servers
- Manage server configurations with easy add, remove, and list operations
- Set default servers for quick access
- Import and export server configurations
- Standalone script that can be run outside of a virtual environment
Installation
# From the source directory
pip install -e .
# Or once published
pip install mcp-hive-proxy
Usage
Asking Questions
# Ask a question to the default server
mcp-hive-proxy ask "What is the best AI tool for coding?"
# Ask a question to a specific server by name
mcp-hive-proxy ask --server team-mcp "What tools are being used in this team room?"
# Ask a question to a specific server by URL
mcp-hive-proxy ask --url https://mcp-server.example.com/sse "What is the weather today?"
# List available questions for servers with predefined questions
mcp-hive-proxy ask --server team-mcp --list-questions
Managing Servers
# List all configured servers
mcp-hive-proxy servers list
# Add a new server
mcp-hive-proxy servers add my-server https://mcp-server.example.com/sse
# Remove a server
mcp-hive-proxy servers remove my-server
# Set the default server
mcp-hive-proxy servers set-default tweet-finder-mcp
# Export server configuration
mcp-hive-proxy servers export --file servers.json
# Import server configuration
mcp-hive-proxy servers import servers.json
Intelligent Question Matching
Some MCP servers have a predefined set of questions they can answer. The CLI automatically:
- Detects servers with list/answer patterns
- Finds the best matching question based on your query
- Handles required parameters (like s3_key, start_date, end_date)
- Shows available questions when using the
--list-questionsflag
Example:
# List available questions on a server
mcp-hive-proxy ask --server team-mcp --list-questions
# Ask a question - the CLI will find the best matching predefined question
mcp-hive-proxy ask --server team-mcp "What tools are my team using?"
Standalone Script
The repository also includes a standalone script mcp_cli_standalone.py that can be run directly without installing the package:
# Make it executable
chmod +x mcp_cli_standalone.py
# Run it directly
./mcp_cli_standalone.py ask "What are the latest AI trends?"
# Or copy it to a location in your PATH
cp mcp_cli_standalone.py ~/bin/mcp-hive-proxy
Configuration
The CLI stores its configuration in ~/.config/mcp_cli/config.json. This file is created automatically when you first run the CLI, and it contains:
- A list of configured servers with their URLs
- The default server to use when none is specified
Requirements
- Python 3.9 or higher
mcppackage (installed automatically as a dependency)
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mcp_hive_proxy-0.2.1.tar.gz.
File metadata
- Download URL: mcp_hive_proxy-0.2.1.tar.gz
- Upload date:
- Size: 8.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
834d9c320831fc8d322e8e5ad4b6deb66a779dcb557ffb94f0a60f9d94cac706
|
|
| MD5 |
df8539f1ebcf6511c7214719c1d6658e
|
|
| BLAKE2b-256 |
1f4dd0171d4f17a140eaf13b3967f37e1f99d5fce5ea2bdd9a16b9968b911a50
|
File details
Details for the file mcp_hive_proxy-0.2.1-py3-none-any.whl.
File metadata
- Download URL: mcp_hive_proxy-0.2.1-py3-none-any.whl
- Upload date:
- Size: 9.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
817e0a2596d5c996236263bc7b63631026dfe4899cc9d8b7a259ab293b0e27bc
|
|
| MD5 |
6d04bcedb3bc89706a1c276c2bf1f07b
|
|
| BLAKE2b-256 |
45c52690c53b9667d5327c24ff9f5aee23a4268746dac37cd5ff5485fa5b8357
|