mcpd

Crates.iomcpd
lib.rsmcpd
version1.0.1
created_at2025-12-06 00:19:10.283929+00
updated_at2025-12-06 00:30:37.447432+00
descriptionAggregates multiple MCP servers behind a single endpoint
homepage
repositoryhttps://github.com/xandwr/mcpd
max_upload_size
id1969444
size54,305
Xander (xandwr)

documentation

README

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"]
    }
  }
}

How It Works

  1. You register MCP servers with mcpd (stored in ~/.config/mcpd/registry.json)
  2. Your MCP client connects to mcpd
  3. mcpd spawns registered servers on-demand and proxies requests to them
  4. 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

Commit count: 0

cargo fmt