mcpr-mcp-runner
v8.0.0
Published
mcpr — configure, manage and call MCP servers from the CLI or API
Maintainers
Readme
MCP Orchestrator
Centralize, manage and expose multiple MCP servers via a unified API and CLI.
Architecture
Client (CLI / API / LLM)
│
Orchestrator
├── Registry — server config store
├── ProcessManager — spawn / stop / auto-restart
├── ClientManager — MCP SDK connections
└── ToolRouter — namespaced tool aggregation
│
┌──────┼──────┐
MCP1 MCP2 MCPnQuick Start
npm install
npm run buildStart the API server
npm start
# → http://127.0.0.1:3000Use the CLI
# List tools
npx ts-node src/cli/index.ts tools
# List servers
npx ts-node src/cli/index.ts servers
# Start a server
npx ts-node src/cli/index.ts start filesystem
# Stop a server
npx ts-node src/cli/index.ts stop filesystem
# Call a tool (JSON input)
npx ts-node src/cli/index.ts call filesystem.read_file --input '{"path":"./README.md"}'After npm run build the binary is available:
mcp tools
mcp call filesystem.read_file --input '{"path":"./README.md"}'HTTP API
All endpoints (except /health) require the header:
Authorization: Bearer <token>The token is set in config/servers.json → api.token.
| Method | Path | Description |
|--------|------|-------------|
| GET | /health | Health check |
| GET | /servers | List servers + status |
| POST | /servers/start | { "name": "..." } |
| POST | /servers/stop | { "name": "..." } |
| POST | /servers/restart | { "name": "..." } |
| POST | /servers/register | Register a new server config |
| GET | /tools | List all namespaced tools |
| POST | /tools/call | { "tool": "fs.readFile", "input": {...} } |
Configuration
Edit config/servers.json:
{
"servers": [
{
"name": "filesystem",
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-filesystem", "/tmp"],
"env": {},
"autoStart": true
}
],
"api": {
"port": 3000,
"host": "127.0.0.1",
"token": "change-me-in-production"
},
"processManager": {
"maxRestarts": 5,
"restartDelayMs": 2000
}
}Roadmap
| Version | Features | |---------|---------| | V1 ✅ | Start/stop, list tools, call tool, auto-restart | | V2 ✅ | REST API, CLI, structured logging | | V3 | LLM auto-tool-selection, load balancing, multi-tenant | | V4 | Web UI, plugin system, distributed deploy |
