M
Mcpd
by @xandwr
An MCP daemon for automated tool registration.
Created 12/5/2025
Updated 8 days ago
README
Repository documentation and setup instructions
mcpd
A daemon that aggregates multiple MCP (Model Context Protocol) servers into one.
Register any MCP server once with mcpd, then point your MCP client at mcpd. Add or remove servers without reconfiguring your client.
Installation
cargo install mcpd
or for local:
cargo install --path .
Usage
Register a server
mcpd register <name> <command> [args...]
Examples:
# Register a Node.js MCP server
mcpd register filesystem npx -y @anthropic/mcp-filesystem /home/user/documents
# Register a Python server
mcpd register mytools python -m my_mcp_server
# Register with environment variables
mcpd register api-tools node server.js -e API_KEY=sk-xxx -e DEBUG=1
List registered servers
mcpd list
Remove a server
mcpd unregister <name>
Run the daemon
mcpd serve
This starts mcpd in stdio mode, ready to accept MCP connections.
Client Configuration
Point your MCP client at mcpd instead of individual servers.
Claude Code (~/.claude/settings.json):
{
"mcpServers": {
"mcpd": {
"command": "mcpd",
"args": ["serve"]
}
}
}
Claude Desktop (claude_desktop_config.json):
{
"mcpServers": {
"mcpd": {
"command": "mcpd",
"args": ["serve"]
}
}
}
VSCode (Ctrl+Shift+P, search 'MCP', click 'MCP: Add Server', select 'stdio', type mcpd serve)
How It Works
- You register MCP servers with mcpd (stored in
~/.config/mcpd/registry.json) - Your MCP client connects to mcpd
- mcpd spawns registered servers on-demand and proxies requests to them
- Tools are namespaced as
<server>__<tool>to avoid collisions
┌─────────────────┐
│ MCP Client │
│ (Claude, etc.) │
└────────┬────────┘
│ stdio
▼
┌─────────────────┐
│ mcpd │
└──┬─────┬─────┬──┘
│ │ │ stdio (spawned on-demand)
▼ ▼ ▼
┌─────┐┌─────┐┌─────┐
│ srv1││ srv2││ srv3│
└─────┘└─────┘└─────┘
Why mcpd?
- Single config: Add servers to mcpd, not to every client
- Hot-swap: Register/unregister servers without restarting clients
- Namespace isolation: Tools from different servers can't collide
- On-demand: Servers only spawn when their tools are invoked
License
MIT
Quick Setup
Installation guide for this server
Installation Command (package not published)
git clone https://github.com/xandwr/mcpd
Manual Installation: Please check the README for detailed setup instructions and any additional dependencies required.
Cursor configuration (mcp.json)
{
"mcpServers": {
"xandwr-mcpd": {
"command": "git",
"args": [
"clone",
"https://github.com/xandwr/mcpd"
]
}
}
}