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 npm GitHub stars

A 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 with OAuth support.

Works With

Connect your favorite AI agents to remote MCP servers:

Agent Description
Claude Desktop Anthropic's official desktop app
Claude Code Anthropic's CLI coding assistant
Cursor AI-powered code editor
Windsurf Codeium's AI IDE
Zed High-performance code editor
Continue Open-source AI assistant for VSCode/JetBrains

Features

  • Remote Server Support - Connect to multiple remote MCP servers via HTTP/HTTPS
  • OAuth Authentication - Automatic OAuth 2.0 flow with token caching
  • Centralized Configuration - Manage all servers in a single .mcp-connect.json file
  • Registry Integration - Search and discover servers from the official MCP Registry
  • Multiplexing - Access multiple servers through a single connection with namespace routing
  • IDE Integration - Auto-generate configuration for Zed, VSCode, and Cursor

Installation

npx (no install)

npx @dreygur/mcp https://remote.server/mcp

npm (global install)

npm install -g @dreygur/mcp

Shell script (Linux/macOS)

curl -fsSL https://raw.githubusercontent.com/dreygur/mcp-connect/main/scripts/install.sh | bash

PowerShell (Windows)

irm https://raw.githubusercontent.com/dreygur/mcp-connect/main/scripts/install.ps1 | iex

Cargo

# From GitHub
cargo install --git https://github.com/dreygur/mcp-connect

# From crates.io (when published)
cargo install mcp-connect

From source

git clone https://github.com/dreygur/mcp-connect.git
cd mcp-connect
cargo install --path crates/mcp-connect

Pre-built binaries

Download from releases page for:

  • Linux (x86_64)
  • macOS (x86_64, ARM64)
  • Windows (x86_64)

Quick Start

One-off connection (no config needed):

npx @dreygur/mcp https://remote.mcp.server/sse

With auth token:

npx @dreygur/mcp https://api.example.com/mcp --auth-token "your_token"

Multi-server setup:

# Initialize configuration
mcp-connect init

# Add a server from registry
mcp-connect config add github modelcontextprotocol/github-mcp-server

# Configure credentials
echo "GITHUB_TOKEN=your_token" >> .env

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

# Start the server
mcp-connect serve

Documentation

Full documentation is available at dreygur.js.org/mcp-connect

Architecture

crates/
├── mcp-types/      # Common types and traits
├── mcp-server/     # Server-side MCP (STDIO)
├── mcp-client/     # Client for remote HTTP servers
├── mcp-proxy/      # Message forwarding and routing
├── mcp-registry/   # MCP Registry API client
├── mcp-config/     # Configuration management
└── mcp-connect/    # CLI

See ARCHITECTURE.md for details.

Configuration Example

{
  "version": "1.0",
  "envFile": ".env",
  "routing": {
    "method": "namespace-prefix",
    "separator": "/"
  },
  "servers": {
    "github": {
      "name": "github-mcp-server",
      "remote": {
        "type": "streamable-http",
        "url": "https://api.githubcopilot.com/mcp",
        "headers": [
          {
            "key": "Authorization",
            "value": "Bearer ${GITHUB_TOKEN}"
          }
        ]
      }
    }
  }
}

Requirements

  • Node.js 14+ (for npm installation)
  • Rust 1.75+ (for building from source)

Contributing

See Contributing Guide for details.

License

MIT License - see LICENSE for details.

Support

If you find MCP Connect useful, please consider giving it a star on GitHub! It helps others discover the project.

Star on GitHub

Acknowledgments

  • RMCP - Rust SDK for Model Context Protocol
  • Tokio - Asynchronous runtime for 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.

Topics

Resources

Contributing

Stars

Watchers

Forks

Contributors 2

  •  
  •