Get the FREE Ultimate OpenClaw Setup Guide →

mcpd

A ~3MB MCP daemon that exposes any script as a tool for Claude, Cursor & AI assistants

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio pouriya-mcpd docker run --rm -it -p 1995:1995 -v $(pwd)/scripts:/var/lib/mcpd ghcr.io/pouriya/mcpd:latest

How to use

mcpd is an MCP daemon that exposes any executable script as an MCP tool. It scans a directory of scripts, reads each script's metadata from its --help output, and makes those scripts available to MCP clients via a JSON-RPC API over HTTP (including a built-in web dashboard). Once running, you can browse tools in the UI, then call them or inspect their options and stateful resources. You can also connect external assistants (like Claude, Cursor, or OpenAI-based agents) to the MCP endpoint to discover available tools and execute them through standard MCP methods.

To use it with AI assistants, point your MCP client at http://localhost:1995/api/mcp. The server supports methods such as initialize, tools/list, tools/call, resources/list, and resources/read. The web dashboard provides a convenient way to test tools, view metadata, and monitor resources. You can enable authentication and TLS if you require secure access, and you can configure script roots so that any executable placed in the designated directory becomes an MCP tool automatically.

How to install

Prerequisites:

  • Docker (recommended) or a compatible container runtime
  • A directory containing your scripts (the script root)

Step-by-step installation (Docker):

  1. Install Docker on your system according to the official docs for your OS.
  2. Create a directory for your scripts: mkdir -p $(pwd)/scripts
  3. Place or create your executable scripts inside the scripts directory. Each script should expose its options via a --help output so mcpd can describe the tool.
  4. Run the MCP server in a container, mounting the script directory: docker run --rm -it -p 1995:1995 -v "$(pwd)/scripts:/var/lib/mcpd" ghcr.io/pouriya/mcpd:latest
  5. Open http://localhost:1995 in your browser to access the web dashboard, or connect your MCP client to http://localhost:1995/api/mcp.

Alternative (native binary):

  • Download the appropriate binary from the project releases page for your platform.
  • Make it executable (chmod +x ./mcpd).
  • Run with the desired options, ensuring your script root directory is accessible to the process (via a flag or environment variable as documented in the project).

Additional notes

Tips and common issues:

  • Each script should implement a helpful --help output describing its options; mcpd reads this to populate the MCP tool metadata.
  • If you enable authentication, ensure your clients supply the correct credentials or tokens, and consider enabling CAPTCHA for added security.
  • The default MCP endpoint is POST /api/mcp; you can also browse tools and test calls via the built-in web dashboard at http://localhost:1995.
  • If your scripts require environment variables or specific working directories, make sure to surface those in the script's own logic or via script configuration (MCPD supports script-root configuration and per-script parameters).
  • For TLS, set the TLS cert and key paths using the appropriate http-tls-cert-file and http-tls-key-file options.
  • If you modify the script directory after starting mcpd, you may need to reload or restart the server to pick up new tools.

Related MCP Servers

Sponsor this space

Reach thousands of developers