Skip to main content

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:

  1. Detects servers with list/answer patterns
  2. Finds the best matching question based on your query
  3. Handles required parameters (like s3_key, start_date, end_date)
  4. Shows available questions when using the --list-questions flag

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
  • mcp package (installed automatically as a dependency)

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mcp_hive_proxy-0.2.0.tar.gz (7.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mcp_hive_proxy-0.2.0-py3-none-any.whl (7.9 kB view details)

Uploaded Python 3

File details

Details for the file mcp_hive_proxy-0.2.0.tar.gz.

File metadata

  • Download URL: mcp_hive_proxy-0.2.0.tar.gz
  • Upload date:
  • Size: 7.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for mcp_hive_proxy-0.2.0.tar.gz
Algorithm Hash digest
SHA256 79e176b7a318e10c96677e7f648c1bbdc4412f3f8ae4d3c9fd4abd5d46bbed3a
MD5 c6adbb652e0887a1c33f69aaabe324ea
BLAKE2b-256 59931af6a8cfef9a84d3de45905269d1772349960f916962e71ab7358253f5d4

See more details on using hashes here.

File details

Details for the file mcp_hive_proxy-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: mcp_hive_proxy-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 7.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for mcp_hive_proxy-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d1dcfc12c4ef5b1fa5ade79d35f262ab5637a167755ea8c4297201ef61ec8d7d
MD5 c2cb157195361fe582d37d40d1600bc5
BLAKE2b-256 b1c033cdeda1d6742009ef40d29a0e9d77131028cec60801140c8d8e7f6856bc

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page