Daemon
Commands for running the MCP gateway as a background service.
The daemon is the core of MCP Server Manager. It runs a gateway server that:
- Manages all your configured MCP servers
- Provides a single proxy endpoint at
localhost:{port}/mcp - Routes requests from connected clients to your servers
How the Daemon and Gateway Work Together
┌──────────────────────────────────────────────┐
│ Your MCP Servers │
│ (filesystem, github, database, etc.) │
└──────────────┬───────────────────────────────┘
│
┌─────▼─────────┐
│ mcpsm Daemon │
│ (Gateway) │
└─────┬─────────┘
│
┌────────┼────────┐
│ │ │
┌──▼──┐ ┌─▼──┐ ┌──▼───┐
│Claude│ │Cursor│ │ Windsurf│
└──────┘ └──────┘ └────────┘When you connect clients, they communicate with the daemon's gateway server. The daemon manages all your servers and proxies requests between clients and servers.
daemon start
Start the gateway daemon.
mcpsm daemon start [servers...] [options]Options
| Option | Description |
|---|---|
--profile <name> | Start servers from a specific profile |
--foreground | Run in foreground (not as daemon) |
Examples
# Start all enabled servers
mcpsm daemon start
# Start specific servers
mcpsm daemon start filesystem github
# Start with a profile
mcpsm daemon start --profile work
# Run in foreground (useful for debugging)
mcpsm daemon start --foregroundWhat Happens
- Selected servers are spawned
- Gateway server starts on configured port (default: 8850)
- Gateway listens on
localhost:{port}/mcp - Process runs in background
- PID is saved for later management
- Connected clients can now access all running servers through the gateway
daemon stop
Stop the running daemon.
mcpsm daemon stopThis gracefully shuts down:
- All running MCP server processes
- The gateway HTTP server
daemon refresh
Refresh the running daemon configuration without restarting it.
mcpsm daemon refreshUse this after editing servers or tool filters to push changes to the running gateway.
daemon status
Show daemon status.
mcpsm daemon statusOutput
Gateway Status: RUNNING
PID: 12345
Port: 8850
Uptime: 2h 15m
Running Servers:
● filesystem 11 tools
● github 8 toolsOr if not running:
Gateway Status: STOPPEDdaemon logs
View or manage daemon logs.
mcpsm daemon logs [options]Options
| Option | Description |
|---|---|
-f, --follow | Follow log output (like tail -f) |
-n, --lines <n> | Show last n lines (default: 50) |
--clear | Clear log file |
Examples
# View last 50 lines
mcpsm daemon logs
# View last 100 lines
mcpsm daemon logs -n 100
# Follow logs in real-time
mcpsm daemon logs -f
# Clear logs
mcpsm daemon logs --clearLog Location
Logs are stored in ~/.mcp-manager/daemon.log
daemon startup
Manage auto-start on system boot.
mcpsm daemon startup <enable|disable|status>Enable Auto-Start
mcpsm daemon startup enableThis creates:
- macOS: LaunchAgent plist in
~/Library/LaunchAgents/ - Linux: Systemd user service in
~/.config/systemd/user/ - Windows: Startup shortcut
Disable Auto-Start
mcpsm daemon startup disableCheck Status
mcpsm daemon startup statusExample: Production Setup
# Configure daemon
mcpsm settings set port 8080
# Create a production profile
mcpsm profile create production
mcpsm profile add production filesystem
mcpsm profile add production api-server
# Start with profile
mcpsm daemon start --profile production
# Enable auto-start
mcpsm daemon startup enable
# Verify
mcpsm daemon status
mcpsm daemon startup statusTroubleshooting
Daemon Won't Start
# Check logs
mcpsm daemon logs -n 100
# Try foreground mode
mcpsm daemon start --foregroundPort Already in Use
# Change port
mcpsm port 9000
# Restart daemon
mcpsm daemon stop
mcpsm daemon startWhen you change the port, all connected clients are automatically updated with the new port.
Check Process Manually
# macOS/Linux
ps aux | grep mcpsm
# Check port (default 8850)
lsof -i :8850Daemon and Client Connections
When you connect clients using mcpsm clients connect, each client gets a gateway server entry that points to the daemon's gateway:
{
"mcpsm": {
"command": "npx",
"args": ["mcp-server-manager", "daemon", "start"],
"env": {
"MCP_GATEWAY_URL": "http://localhost:{port}/mcp"
}
}
}Keep the daemon running so clients can reach all your servers through the gateway.