diy-tools
An MCP server that allows users to dynamically add custom tools/functions at runtime
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
- 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
- Build if the project uses a build step (TypeScript):
npm run build
- Start the server:
npm start
- 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
mcp -code-execution-mode
An MCP server that executes Python code in isolated rootless containers with optional MCP server proxying. Implementation of Anthropic's and Cloudflare's ideas for reducing MCP tool definitions context bloat.
autosteer
Desktop app for multi-workspace Claude Code management
claude-code
MCP Server connects with claude code local command.
create -kit
Scaffold a production-ready Model Context Protocol (MCP) server in seconds.
CogniLayer
Persistent memory for Claude Code & Codex CLI — save ~100K tokens/session. 13 MCP tools, hybrid search, TUI dashboard, crash recovery. Your AI finally remembers.
basecoat-ui
A Model Context Protocol (MCP) server that provides programmatic access to Basecoat CSS components and their usage documentation. This server allows AI assistants to help developers build HTML interfaces using the Basecoat CSS framework.