Cover image
Try Now
2025-04-07

3 years

Works with Finder

1

Github Watches

0

Github Forks

0

Github Stars

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

相关推荐

  • Joshua Armstrong
  • Confidential guide on numerology and astrology, based of GG33 Public information

  • https://suefel.com
  • Latest advice and best practices for custom GPT development.

  • Emmet Halm
  • Converts Figma frames into front-end code for various mobile frameworks.

  • Elijah Ng Shi Yi
  • Advanced software engineer GPT that excels through nailing the basics.

  • lumpenspace
  • Take an adjectivised noun, and create images making it progressively more adjective!

  • https://maiplestudio.com
  • Find Exhibitors, Speakers and more

  • Yusuf Emre Yeşilyurt
  • I find academic articles and books for research and literature reviews.

  • Carlos Ferrin
  • Encuentra películas y series en plataformas de streaming.

  • https://zenepic.net
  • Embark on a thrilling diplomatic quest across a galaxy on the brink of war. Navigate complex politics and alien cultures to forge peace and avert catastrophe in this immersive interstellar adventure.

  • apappascs
  • Découvrez la collection la plus complète et la plus à jour de serveurs MCP sur le marché. Ce référentiel sert de centre centralisé, offrant un vaste catalogue de serveurs MCP open-source et propriétaires, avec des fonctionnalités, des liens de documentation et des contributeurs.

  • ShrimpingIt
  • Manipulation basée sur Micropython I2C de l'exposition GPIO de la série MCP, dérivée d'Adafruit_MCP230XX

  • ravitemer
  • Un puissant plugin Neovim pour gérer les serveurs MCP (Protocole de contexte modèle)

  • jae-jae
  • MCP Server pour récupérer le contenu de la page Web à l'aide du navigateur sans tête du dramwright.

  • pontusab
  • La communauté du curseur et de la planche à voile, recherchez des règles et des MCP

  • patruff
  • Pont entre les serveurs Olllama et MCP, permettant aux LLM locaux d'utiliser des outils de protocole de contexte de modèle

  • av
  • Exécutez sans effort LLM Backends, API, Frontends et Services avec une seule commande.

  • appcypher
  • Serveurs MCP géniaux - une liste organisée de serveurs de protocole de contexte de modèle

  • chongdashu
  • Activer les clients adjoints AI comme Cursor, Windsurf et Claude Desktop pour contrôler le moteur Unreal à travers le langage naturel à l'aide du Protocole de contexte modèle (MCP).

  • Mintplex-Labs
  • L'application tout-en-un desktop et Docker AI avec chiffon intégré, agents AI, constructeur d'agent sans code, compatibilité MCP, etc.

    Reviews

    4 (1)
    Avatar
    user_Cqkt3Jv7
    2025-04-17

    As a loyal user of mcp-server-proxy, I can confidently say this project by amirilovic is a game-changer for server management. The seamless integration and robust performance truly stand out. It's evident that a lot of thought and effort went into its development. Highly recommended for anyone looking to streamline their server operations. Check it out on GitHub!