@sunwu51/mcp-center
v1.0.8
Published
MCP Server management tool that aggregates multiple MCP servers
Maintainers
Readme
MCP Center
MCP Center is a local MCP gateway with a built-in Web UI. It manages multiple child MCP servers, keeps their configuration in one place, and exposes a single Streamable HTTP MCP endpoint for your client to connect to.
It can aggregate:
- tools
- resources
- resource templates
- prompts
To avoid collisions, every exposed capability is prefixed with the child server name:
- tool:
exa_web_search_exa - resource:
filesystem_file:///tmp/a.txt - prompt:
docs_summarize
Usage Model
Run MCP Center directly with npx, then connect your MCP client to the HTTP endpoint it starts:
- Start
mcp-centerwithnpx @sunwu51/mcp-center - Open the Web UI to add or edit child MCP servers
- Point your MCP client at
http://localhost:3000/mcp
Quick Start
1. Start MCP Center
npx @sunwu51/mcp-centerThis command executes the package's CLI entry directly. No global install is required.
By default it uses ~/.mcp-center/mcp.json. If the file does not exist, it will be created automatically as:
{
"servers": []
}You can also pass a custom config path:
npx @sunwu51/mcp-center --config /path/to/mcp.jsonOr:
npx @sunwu51/mcp-center /path/to/mcp.json2. Open the Web UI
Open:
http://localhost:3000/uiFrom the UI you can:
- add HTTP or stdio child MCP servers
- edit server config
- enable or disable a server
- delete a server
- probe a server before saving to inspect tools/resources/templates/prompts
- selectively enable only part of a server's capabilities
- view connection status and loaded capabilities
3. Connect your MCP client to MCP Center
Use this endpoint:
http://localhost:3000/mcpYour MCP client must support Streamable HTTP transport.
How It Works
MCP Center acts as a proxy in front of multiple child servers:
- child servers can be HTTP MCP servers or local stdio MCP servers
- MCP Center connects to them as a client
- it lists their capabilities and republishes them through one HTTP endpoint
- calls and reads are forwarded to the original child server
Capability filtering is applied per child server:
enabledToolsenabledResourcesenabledResourceTemplatesenabledPrompts
If a filtering field is omitted or empty, MCP Center exposes all items of that type from that child server.
Configuration File
The config file format is:
{
"servers": [
{
"name": "exa",
"url": "https://mcp.exa.ai/mcp",
"httpHeaders": {
"Authorization": "Bearer YOUR_TOKEN"
},
"enabledTools": ["web_search_exa"]
},
{
"name": "filesystem",
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-filesystem",
"/path/to/workspace"
],
"env": {
"NODE_ENV": "production"
},
"enabledTools": ["read_file", "write_file"],
"enabledResources": ["file:///path/to/workspace/README.md"],
"enabledPrompts": ["summarize_file"]
}
]
}Server Fields
Common fields:
name: required, must be uniqueenabled: optional, setfalseto keep the server in config but not connect to itenabledTools: optional string arrayenabledResources: optional string arrayenabledResourceTemplates: optional string arrayenabledPrompts: optional string array
HTTP child server fields:
url: required for HTTP transporthttpHeaders: optional request headers
STDIO child server fields:
command: required for stdio transportargs: optional argument arrayenv: optional environment variables
Client Configuration
The exact client config depends on the client, but the target should be the MCP Center HTTP endpoint:
{
"mcpServers": {
"mcp-center": {
"url": "http://localhost:3000/mcp"
}
}
}If your client expects a transport field, use its Streamable HTTP mode and point it to the same URL.
If you want to launch MCP Center from another tool or script, use the same npx entry:
{
"command": "npx",
"args": [
"-y",
"@sunwu51/mcp-center"
]
}HTTP API
The Web UI uses these routes:
GET /api/servers: list configured serversPOST /api/servers: add a serverPUT /api/servers/:index: update a serverDELETE /api/servers/:index: delete a serverPATCH /api/servers/:index/toggle: enable or disable a serverGET /api/servers/status: get current connection statusGET /api/servers/:name/capabilities: get loaded capabilities for a connected serverPOST /api/probe: temporarily connect to a server config and inspect capabilities before saving
Runtime Behavior
- Default port is
3000 - Set
PORTto change it - The config file is watched for changes
- When the config changes, MCP Center reloads child servers automatically
- Child servers are loaded in parallel
- Failed child servers do not stop the main HTTP service from starting
Example:
PORT=8080 npx @sunwu51/mcp-centerPowerShell:
$env:PORT=8080
npx @sunwu51/mcp-centerDevelopment
Install dependencies:
npm installRun locally:
npm startRun tests:
npm testLicense
MIT
