Skip to main content

A command-line interface for interacting with MCP servers with intelligent question matching and Windsurf integration

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
  • Synchronize with Windsurf/Cursor to integrate with AI assistants
  • 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

# Add a server and sync with Windsurf
mcp-hive-proxy servers add my-server https://mcp-server.example.com/sse --sync-windsurf

# Remove a server
mcp-hive-proxy servers remove my-server

# Remove a server and sync with Windsurf
mcp-hive-proxy servers remove my-server --sync-windsurf

# 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

# Import server configuration and sync with Windsurf
mcp-hive-proxy servers import servers.json --sync-windsurf

# Manually sync with Windsurf
mcp-hive-proxy servers sync --windsurf

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?"

Windsurf Integration

The CLI can synchronize your MCP server configurations with Windsurf, allowing you to use the intelligent question matching and parameter handling features directly from Windsurf:

# Add a server and sync with Windsurf
mcp-hive-proxy servers add my-server https://mcp-server.example.com/sse --sync-windsurf

# Manually sync all servers with Windsurf
mcp-hive-proxy servers sync --windsurf

When syncing with Windsurf, the CLI:

  1. Updates the Windsurf MCP configuration file (~/.codeium/windsurf/mcp_config.json)
  2. Configures Windsurf to use the MCP Hive Proxy for all MCP server interactions
  3. Creates a memory instructing Windsurf to always use the proxy for MCP tools

This ensures that all MCP interactions in Windsurf benefit from the intelligent question matching and parameter handling features of the MCP Hive Proxy.

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.3.0.tar.gz (10.7 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.3.0-py3-none-any.whl (11.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: mcp_hive_proxy-0.3.0.tar.gz
  • Upload date:
  • Size: 10.7 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.3.0.tar.gz
Algorithm Hash digest
SHA256 476daa1000e178aa5eac15cea0e8ef6c9a7c163a3a38889b3b0d1b04828b68c0
MD5 25d1dcfb22412786d577142c87677a95
BLAKE2b-256 805926e7a6d4b1b1ab7a51310dbcfc636ed23e1ac6cd0749708fbd123cb2407f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mcp_hive_proxy-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 11.1 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.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 068aae50ddde059204c60a9afc04cdb60ed5a69535d042ec6a997089b112735a
MD5 91bfd848a02bdf703b8e1a699a4085bd
BLAKE2b-256 dcdde8936a48f27657594a197d2dc84d063bc75f3c047e53389ab28fb6093ef2

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