Cover image
Try Now
2025-02-25

Un servidor de middleware que permite múltiples instancias aisladas de los mismos servidores MCP coexisten de forma independiente con espacios de nombres y configuraciones únicas.

3 years

Works with Finder

3

Github Watches

6

Github Forks

45

Github Stars

Multiverse MCP Server

A middleware server that enables multiple isolated instances of the same MCP servers to coexist independently with unique namespaces and configurations.

The Multiverse MCP Server creates isolated operational spaces where identical MCP servers can run simultaneously without conflicts. Each "universe" maintains its own configuration, filesystem access, and function naming, enabling developers to run multiple instances of the same server type while maintaining complete separation between different contexts or projects.

Key Features

Run Multiple Instances

Run multiple instances of the same MCP server type independently and simultaneously. Each instance operates in its own isolated universe with separate configurations. This enables scenarios like:

  • Multiple MySQL servers mcp-server-mysql pointing to different databases
  • Multiple Git servers mcp-server-git with different Personal Access Tokens
  • Multiple filesystem servers mcp-server-filesystem accessing different root paths

Automatic Server Restart

Register your MCP server with file watching capability during development. When enabled, the server automatically detects changes in the specified directory and performs a graceful restart, making development and testing seamless.

JSON-based Configuration System

Define your multiverse setup using a simple and flexible JSON configuration format. Each server instance can be configured with its own:

  • Command and arguments
  • Environment variables
  • Path resolution rules
  • File watching settings

Installation

First, ensure you've downloaded and installed the Claude Desktop app and you have npm installed.

Next, add this entry to your claude_desktop_config.json

  • on Mac, found at ~/Library/Application\ Support/Claude/claude_desktop_config.json
  • on Windows, found at C:\Users\<username>\AppData\Roaming\Claude\claude_desktop_config.json

Now add how many multiverse servers you want to run. For example, if you want to run two instances of mcp-server-multiverse, one for your job and one for your side project, you can add the following configuration:

{
  "mcpServers": {
    "job-multiverse": {
      "command": "npx",
      "args": [
        "-y",
        "@lamemind/mcp-server-multiverse@latest",
        "/path/to/your/job-multiverse.json"
      ]
    },
    "side-project-multiverse": {
      "command": "npx",
      "args": [
        "-y",
        "@lamemind/mcp-server-multiverse@latest",
        "/path/to/your/side-project-multiverse.json"
      ]
    }
  }
}

This config allows Claude Desktop to automatically start the mcp-server-multiverse instances when you start the app.

demo.png

Configuration Examples

Create two isolated instances of mcp-server-mysql with different databases

Your job-multiverse.json file

{
  "serverName": "JobMultiverse",
  "functionsPrefix": "job",
  "servers": [
    {
      "command": "npx",
      "args": [
        "-y",
        "@benborla29/mcp-server-mysql"
      ],
      "env": {
        "MYSQL_HOST": "127.0.0.1",
        "MYSQL_PORT": "3306",
        "MYSQL_USER": "root",
        "MYSQL_PASS": "",
        "MYSQL_DB": "my-job-db"
      }
    }
  ]
}

Your side-project-multiverse.json file

{
  "serverName": "SideProjectMultiverse",
  "functionsPrefix": "side-project",
  "servers": [
    {
      "command": "npx",
      "args": [
        "-y",
        "@benborla29/mcp-server-mysql"
      ],
      "env": {
        "MYSQL_HOST": "127.0.0.1",
        "MYSQL_PORT": "3306",
        "MYSQL_USER": "root",
        "MYSQL_PASS": "",
        "MYSQL_DB": "side-project-db"
      }
    }
  ]
}

Create an isolated instance of mcp-server-filesystem

  • The mcp-server-filesystem's functions will be exposed with side-project prefix, e.g. side-project_read_file, side-project_write_file.
  • The root path can be hidden from the client (e.g. Claude Desktop) by using the pathResolution configuration.

Note that pathResolution is optional and is only needed if you want to hide the root path from the client.

Your multiverse.json file

{
  "serverName": "MySideProject",
  "functionsPrefix": "side-project",
  "servers": [
    {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-filesystem@latest",
        "/full/path/to/side-project"
      ],
      "pathResolution": {
        "root": "/full/path/to/side-project",
        "applyTo": [
          "path",
          "paths"
        ]
      }
    }
  ]
}

Automatic server restart on file changes with fileWatch

Your multiverse.json file

{
  "serverName": "MySideProject",
  "functionsPrefix": "side-project",
  "servers": [
    {
      "command": "node",
      "args": [
        "/my-own/mcp-server/i-m-working-on/build/index.js"
      ],
      "fileWatch": {
        "enabled": true,
        "path": "/my-own/mcp-server/i-m-working-on/build/"
      }
    }
  ]
}

Hiding specific functions with the hideFunctions option

You can selectively hide specific functions from wrapped servers using the hideFunctions array. This is useful when you want to use a server but restrict access to certain potentially dangerous or unnecessary functions.

The hideFunctions array accepts a list of function names that should be hidden from the wrapped server. When a function is hidden:

  • It won't be registered with the main MCP server
  • It won't be available to the client (e.g., Claude Desktop)
  • It won't appear in the list of available functions

This feature is particularly useful for:

  • Restricting access to potentially dangerous functions (e.g., delete_repository in GitHub)
  • Simplifying the interface by hiding rarely used functions
  • Creating different permission levels for different server instances
{
  "serverName": "GitHubWithRestrictions",
  "functionsPrefix": "github",
  "servers": [
    {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-github@latest"
      ],
      "env": {
        "GITHUB_PERSONAL_ACCESS_TOKEN": "<your-personal-access-token>"
      },
      "hideFunctions": [
        "create_repository",
        "delete_repository",
        "create_issue"
      ]
    }
  ]
}

In this example, the GitHub server will start normally, but the functions create_repository, delete_repository, and create_issue will be hidden and unavailable to the client.

Disabling specific servers with the enabled flag

You can selectively disable specific servers in your configuration without removing them from the JSON file by setting the enabled flag to false. This is useful for temporarily disabling servers during development or testing.

{
  "serverName": "MySideProject",
  "functionsPrefix": "side-project",
  "servers": [
    {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-filesystem@latest",
        "/full/path/to/side-project"
      ],
      "hideFunctions": [ "write_file" ]
    },
    {
      "enabled": false,
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-github@latest"
      ]
    }
  ]
}

In this example, the first server (filesystem) will start but the function write_file has been hidden, the second server (GitHub) is disabled and won't be started.

Full example of a multiverse.json file

This example demonstrates how to create a multiverse server with multiple instances of different server types.

Note that pathResolution is optional and is only needed if you want to hide the root path from the client.

{
  "serverName": "HugeProjectWithALotOfResources",
  "functionsPrefix": "huge-project",
  "servers": [
    {
      "command": "node",
      "args": [
        "/my-own/mcp-server/i-m-working-on/build/index.js"
      ],
      "fileWatch": {
        "enabled": true,
        "path": "/my-own/mcp-server/i-m-working-on/build/"
      }
    },
    {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-filesystem@latest",
        "/full/path/to/huge-project"
      ],
      "pathResolution": {
        "root": "/full/path/to/huge-project",
        "applyTo": [
          "path",
          "paths"
        ]
      }
    },
    {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-github@latest"
      ],
      "env": {
        "GITHUB_PERSONAL_ACCESS_TOKEN": "<your-personal-access-token>"
      }
    },
    {
      "command": "uvx",
      "args": [
        "mcp-server-git",
        "--repository",
        "/full/path/to/huge-project"
      ],
      "pathResolution": {
        "root": "/full/path/to/huge-project",
        "applyTo": [
          "repo_path"
        ]
      }
    }
  ]
}

To Do

  • Add support for Prompts
  • Add support for Resources
  • Add a GUI for managing multiverse servers

Verified Platforms

  • Windows
  • macOS
  • Linux

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
  • Descubra la colección más completa y actualizada de servidores MCP en el mercado. Este repositorio sirve como un centro centralizado, que ofrece un extenso catálogo de servidores MCP de código abierto y propietarios, completos con características, enlaces de documentación y colaboradores.

  • ShrimpingIt
  • Manipulación basada en Micrypthon I2C del expansor GPIO de la serie MCP, derivada de AdaFruit_MCP230xx

  • pontusab
  • La comunidad de cursor y windsurf, encontrar reglas y MCP

  • jae-jae
  • Servidor MCP para obtener contenido de la página web con el navegador sin cabeza de dramaturgo.

  • ravitemer
  • Un poderoso complemento Neovim para administrar servidores MCP (protocolo de contexto del modelo)

  • patruff
  • Puente entre los servidores Ollama y MCP, lo que permite a LLM locales utilizar herramientas de protocolo de contexto del modelo

  • av
  • Ejecute sin esfuerzo LLM Backends, API, frontends y servicios con un solo comando.

  • chongdashu
  • Habilite clientes asistentes de IA como Cursor, Windsurf y Claude Desktop para controlar el motor irreal a través del lenguaje natural utilizando el Protocolo de contexto del modelo (MCP).

  • wgpsec
  • 一款基于各大企业信息 API 的工具 , 解决在遇到的各种针对国内企业信息收集难题。一键收集控股公司 解决在遇到的各种针对国内企业信息收集难题。一键收集控股公司 ICP 备案、 Aplicación 、小程序、微信公众号等信息聚合导出。支持 MCP 接入

    Reviews

    3 (1)
    Avatar
    user_To1QD7dL
    2025-04-18

    mcp-server-multiverse by lamemind is a revolutionary tool for managing multiple Minecraft servers effortlessly! The seamless integration and user-friendly interface make server administration a breeze. Highly recommend it for anyone looking to enhance their Minecraft server experience. Check it out on GitHub!