Get the FREE Ultimate OpenClaw Setup Guide →

diy-tools

An MCP server that allows users to dynamically add custom tools/functions at runtime

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio hesreallyhim-diy-tools-mcp npx -y diy-tools-mcp \
  --env LOG_LEVEL="info (default) or debug" \
  --env MCP_CONFIG_FILE="path/to/config.json (optional, if your deployment uses a custom config file)"

How to use

DIY Tools MCP Server lets you register custom tools at runtime and expose them through the MCP protocol so Claude or other MCP clients can invoke them. Tools can be written in multiple languages (Python, JavaScript, Bash, etc.) and registered by providing the function code or a path to a file along with a JSON schema describing input parameters and the expected return. The server handles validation, execution, persistence, and integration with MCP, making it easy to extend Claude's capabilities with user-defined utilities without rebuilding a full MCP server. Built-in commands allow you to add, remove, list, and inspect tools, plus you can view the source of registered functions directly from the server.

To get started, run the server using your preferred installation method, then use the provided commands to manage tools. Once registered, tools appear in the tool registry and can be invoked via MCP requests by name. The server also supports persisting registered tools to disk so they load automatically on restart, and it validates parameter schemas to ensure type safety and predictable error handling.

How to install

Prerequisites

  • Node.js 14+ (recommended for best compatibility)
  • Git
  • npm or yarn

Install and run

  1. Clone or install the MCP server package (example uses npm):
git clone https://github.com/hesreallyhim/diy-tools-mcp.git
cd diy-tools-mcp
npm install
  1. Build if the project uses a build step (TypeScript):
npm run build
  1. Start the server:
npm start
  1. Optional development with auto-reload:
npm run dev

If you prefer to run directly via npx without installing, you can use:

npx -y diy-tools-mcp

Additional notes

Tips and notes:

  • If you enable file-based functions, ensure proper security checks and sandboxing to prevent arbitrary code execution risks.
  • Use the provided examples in the README to understand how to structure a tool registration payload with name, language, code or codePath, and a JSON Schema for parameters.
  • Tools are persisted across restarts; ensure your persistence path is writable by the process.
  • You can specify entryPoint to select which function to call when a file exports multiple functions.
  • If you encounter issues with multi-language execution, verify that the runtime for the target language is installed and accessible to the server (e.g., Python, Node, Bash interpreters).
  • Set appropriate environment variables for logging (e.g., LOG_LEVEL) and for custom configuration (e.g., MCP_CONFIG_FILE).
  • When using npx, the server will be downloaded and executed in memory; for production, pin a specific version or install locally to avoid network-related variability.

Related MCP Servers

Sponsor this space

Reach thousands of developers