A middleware server that enables multiple isolated instances of the same MCP servers to coexist independently with unique namespaces and configurations.
npm install @lamemind/mcp-server-multiversemcp-server-mysql pointing to different databases
mcp-server-git with different Personal Access Tokens
mcp-server-filesystem accessing different root paths
claude_desktop_config.json
~/Library/Application\ Support/Claude/claude_desktop_config.json
C:\Users\\AppData\Roaming\Claude\claude_desktop_config.json
mcp-server-multiverse, one for your job and one for your side project, you can add the following configuration:
json
{
"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
$3
Your job-multiverse.json file
~~~JSON
{
"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
~~~JSON
{
"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"
}
}
]
}
~~~
$3
- 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
~~~JSON
{
"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"
]
}
}
]
}
~~~
$3
Your multiverse.json file
~~~JSON
{
"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/"
}
}
]
}
~~~
$3
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
~~~JSON
{
"serverName": "GitHubWithRestrictions",
"functionsPrefix": "github",
"servers": [
{
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-github@latest"
],
"env": {
"GITHUB_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.
$3
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.
~~~JSON
{
"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.
$3
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.
~~~JSON
{
"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": ""
}
},
{
"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`