Sponsored by Deepsite.site

MCP Server Proxy

Created By
amirilovica year ago
Content

MCP Server Proxy

A proxy server that connects to multiple MCP servers and provides a unified interface for tool access.

Features

  • Connect to multiple MCP servers simultaneously
  • Support for multiple configuration profiles
  • Tool name prefixing with server names
  • Run in either stdio or SSE mode
  • Profile-based configuration management

Configuration

Create configuration files for each profile in the format config.<profile>.json. For example:

// config.developer.json
{
  "mcpServers": {
    "kubernetes": {
      "command": "npx",
      "args": ["mcp-server-kubernetes"]
    }
  }
}
// config.personal.json
{
  "mcpServers": {
    "filesystem": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-filesystem",
        "/Users/mirilale/Desktop"
      ]
    }
  }
}

Installation

npm install

Usage

Command Line Options

The server can be started with various command-line options:

# Start with default settings
node dist/server.js

# Start with a specific profile
node dist/server.js --profile developer
# or
node dist/server.js -p developer

# Start in SSE mode
node dist/server.js --mode sse
# or
node dist/server.js -m sse

# Start in SSE mode with custom port and host
node dist/server.js --mode sse --port 8080 --host 0.0.0.0

# Combine options
node dist/server.js --profile developer --mode sse --port 8080

Available options:

  • -p, --profile <name>: Specify which profile to use (defaults to "default")
  • -m, --mode <mode>: Choose between "stdio" or "sse" mode (defaults to "stdio")
  • --port <number>: Set the port for SSE mode (defaults to 3000)
  • --host <host>: Set the host for SSE mode (defaults to "localhost")

Get help:

node dist/server.js --help

Tool Naming Convention

Tools are prefixed with their server name. For example:

  • A tool named read_file from the filesystem server becomes filesystem_read_file
  • A tool named get_pods from the kubernetes server becomes kubernetes_get_pods

SSE Mode Endpoints

When running in SSE mode, the server exposes the following endpoints:

  • GET /sse: Establishes an SSE connection
  • POST /messages: Handles tool requests (requires sessionId query parameter)

Example SSE client usage:

const eventSource = new EventSource("http://localhost:3000/sse");
eventSource.onmessage = (event) => {
  console.log("Received:", event.data);
};

Error Handling

The server provides detailed error messages including:

  • Profile loading errors
  • Server connection failures
  • Tool not found errors
  • Server disconnection errors

All errors include the current profile name for better context.

Development

# Install dependencies
npm install

# Build the project
npm run build

# Run in development mode
npm run dev:stdio:developer
# or
npm run dev:sse:developer
# Run with mpc inspector
npm run inspect

License

MIT

Recommend Servers
TraeBuild with Free GPT-4.1 & Claude 3.7. Fully MCP-Ready.
ChatWiseThe second fastest AI chatbot™
Amap Maps高德地图官方 MCP Server
Baidu Map百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Howtocook Mcp基于Anduin2017 / HowToCook (程序员在家做饭指南)的mcp server,帮你推荐菜谱、规划膳食,解决“今天吃什么“的世纪难题; Based on Anduin2017/HowToCook (Programmer's Guide to Cooking at Home), MCP Server helps you recommend recipes, plan meals, and solve the century old problem of "what to eat today"
Jina AI MCP ToolsA Model Context Protocol (MCP) server that integrates with Jina AI Search Foundation APIs.
RedisA Model Context Protocol server that provides access to Redis databases. This server enables LLMs to interact with Redis key-value stores through a set of standardized tools.
MiniMax MCPOfficial MiniMax Model Context Protocol (MCP) server that enables interaction with powerful Text to Speech, image generation and video generation APIs.
CursorThe AI Code Editor
EdgeOne Pages MCPAn MCP service designed for deploying HTML content to EdgeOne Pages and obtaining an accessible public URL.
WindsurfThe new purpose-built IDE to harness magic
AiimagemultistyleA Model Context Protocol (MCP) server for image generation and manipulation using fal.ai's Stable Diffusion model.
Tavily Mcp
Zhipu Web SearchZhipu Web Search MCP Server is a search engine specifically designed for large models. It integrates four search engines, allowing users to flexibly compare and switch between them. Building upon the web crawling and ranking capabilities of traditional search engines, it enhances intent recognition capabilities, returning results more suitable for large model processing (such as webpage titles, URLs, summaries, site names, site icons, etc.). This helps AI applications achieve "dynamic knowledge acquisition" and "precise scenario adaptation" capabilities.
BlenderBlenderMCP connects Blender to Claude AI through the Model Context Protocol (MCP), allowing Claude to directly interact with and control Blender. This integration enables prompt assisted 3D modeling, scene creation, and manipulation.
MCP AdvisorMCP Advisor & Installation - Use the right MCP server for your needs
Visual Studio Code - Open Source ("Code - OSS")Visual Studio Code
Serper MCP ServerA Serper MCP Server
Playwright McpPlaywright MCP server
Y GuiA web-based graphical interface for AI chat interactions with support for multiple AI models and MCP (Model Context Protocol) servers.
DeepChatYour AI Partner on Desktop