Skip to content

A Rust implementation of the Model Context Protocol (MCP) remote proxy that bridges local MCP clients (IDEs/LLMs) with remote MCP servers via HTTP/SSE transport.

Notifications You must be signed in to change notification settings

dreygur/mcp-connect

Repository files navigation

MCP Connect

License: MIT Rust

A powerful, production-ready proxy and multiplexing server for the Model Context Protocol (MCP). MCP Connect enables seamless integration between local MCP clients and remote HTTP servers, providing centralized configuration management, multi-server support, and comprehensive IDE integration.

✨ Features

  • 🔌 Remote Server Support - Connect to multiple remote MCP servers via HTTP/HTTPS
  • 📦 Centralized Configuration - Manage all servers in a single .mcp-connect.json file
  • 🔍 Registry Integration - Search and discover servers from the official MCP Registry
  • 🌐 Custom Registry Sources - Add and manage custom registry sources beyond the official one
  • 🔀 Multiplexing - Access multiple servers through a single connection with namespace routing
  • 🔐 Secure Credentials - Environment variable-based authentication with .env support
  • 💻 IDE Integration - Auto-generate configuration files for Zed, VSCode, and Cursor
  • 📡 Protocol Compliance - Full MCP 2024-11-05 specification support
  • 🔄 Retry & Resilience - Automatic retry logic and connection management
  • 📊 Comprehensive Logging - Debug and production logging modes

🚀 Quick Start

Installation

# From source
git clone https://github.com/dreygur/mcp-connect.git
cd mcp-connect
cargo build --release

# Or from release
# Linux/Mac
curl -fsSL https://raw.githubusercontent.com/dreygur/mcp-connect/main/install.sh | bash
# Windows
irm https://raw.githubusercontent.com/dreygur/mcp-connect/main/install.ps1 | iex


# Install globally
cargo install --path crates/mcp-connect

# Or from github
cargo install --git https://github.com/dreygur/mcp-connect

# Or use pre-built binaries (when available)
# Download from releases page

Basic Usage

# 1. Initialize your project
mcp-connect init

# 2. Add servers from the registry
mcp-connect config add github modelcontextprotocol/github-mcp-server

# 3. Configure credentials in .env
echo "GITHUB_TOKEN=your_token_here" >> .env

# 4. Generate IDE configuration
mcp-connect generate --ide vscode

# 5. Start the server (usually automatic via IDE)
mcp-connect serve

📚 Documentation

Comprehensive documentation is available in the docs/ directory:

🏗️ Architecture

MCP Connect is built as a modular Rust workspace with the following components:

crates/
├── mcp-types/      # Common types, traits, and error definitions
├── mcp-server/     # Server-side MCP implementation (STDIO)
├── mcp-client/     # Client for remote HTTP servers
├── mcp-proxy/      # Message forwarding and routing logic
├── mcp-registry/   # MCP Registry API client
├── mcp-config/     # Configuration management and validation
└── mcp-connect/     # Command-line interface

For detailed architecture information, see ARCHITECTURE.md.

📋 Requirements

  • Rust: 1.75 or later
  • Cargo: Latest stable version
  • OpenSSL: 3.x (or build with static linking)

🎯 Use Cases

Multi-Server Management

Manage multiple remote MCP servers from a single configuration file, avoiding the need to configure each server individually in your IDE.

Custom Registry Sources

Add your own MCP registry sources for private or internal server catalogs.

Development Workflow

Integrate MCP servers into your development environment with automatic configuration generation for popular IDEs.

Production Deployment

Deploy MCP Connect as a service to provide centralized access to multiple MCP servers across your team.

🔧 Configuration Example

{
  "$schema": "https://static.modelcontextprotocol.io/schemas/2025-10-17/mcp-connect-config.schema.json",
  "version": "1.0",
  "envFile": ".env",
  "routing": {
    "method": "namespace-prefix",
    "separator": "/"
  },
  "servers": {
    "github": {
      "name": "io.github.modelcontextprotocol/github-mcp-server",
      "remote": {
        "type": "streamable-http",
        "url": "https://api.githubcopilot.com/mcp",
        "headers": [
          {
            "key": "Authorization",
            "value": "Bearer ${GITHUB_TOKEN}"
          }
        ]
      }
    }
  }
}

🤝 Contributing

We welcome contributions! Please see our Contributing Guide for details.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

🙏 Acknowledgments

  • RMCP - Rust SDK for Model Context Protocol
  • Tokio - Asynchronous runtime for Rust
  • Clap - Command Line Argument Parser
  • Serde - Serialization framework

📞 Support


Built with ❤️ in Rust 🦀

About

A Rust implementation of the Model Context Protocol (MCP) remote proxy that bridges local MCP clients (IDEs/LLMs) with remote MCP servers via HTTP/SSE transport.

Resources

Contributing

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •