---
name: mcpd
description: Manage MCP server lifecycle with mcpd daemon. Start, stop, monitor MCP servers and discover their tools.
triggers:
  - mcp server
  - mcpd
  - start mcp
  - mcp tools
  - mcp servers
---

# mcpd - MCP Server Lifecycle Manager

## Overview

mcpd is a daemon that manages MCP (Model Context Protocol) server processes with intelligent idle detection, auto-start on demand, and tool namespacing.

## Key Commands

| Command | Description |
|---------|-------------|
| `mcpd up` | Start all MCP servers (auto-starts daemon if needed) |
| `mcpd up <name>` | Start specific server(s) |
| `mcpd down` | Stop all servers |
| `mcpd ps` | Show server status |
| `mcpd ps -v` | Show with tool details |
| `mcpd tools` | List all servers and tool counts |
| `mcpd tools <server>` | List tools for a server |
| `mcpd exec <tool>` | Execute a tool |
| `mcpd search <query>` | Semantic search for tools |

## Web Management

Access the web UI at `http://localhost:18423/` when the daemon is running.

## Tool Namespacing

Tools are namespaced as `<server>.<tool>`, e.g. `filesystem.read_file`.

If a tool name is unique across servers, the bare name also works: `read_file`.

## Integration with Claude Code

- The daemon auto-starts when you run any mcpd command
- Servers auto-stop after 5 minutes of inactivity
- Servers auto-start when their tools are invoked
- Use `mcpd exec <server>.<tool> --args '{"key":"value"}'` to invoke tools

## Configuration

Config files are at `~/.mcpd/`:
- `mcpd.yml` - Daemon settings (idle timeout, gateway, etc.)
- `mcpserver.json` - MCP server definitions
