MCP Server Enables Claude to Create and Run Custom Tools at Runtime

A developer has built an MCP server that allows Claude to create, update, and run new tools at runtime without requiring redeployment. Unlike standard MCP setups where tools are fixed at deploy time, this system enables dynamic tool creation.
Core Architecture
The server implements five core MCP tools:
- List Tools — returns available tools
- Get Tool — fetches full tool definition including code
- Create Tool — stores a new tool in a database registry
- Update Tool — modifies an existing tool
- Run Tool — executes any stored tool by name
Tool Execution Process
The Run Tool meta-tool works as follows:
- Looks up the requested tool in a MySQL table
- Fetches its code
- Passes parameters as context
- Runs it in a Deno subprocess with restricted permissions
- Returns the result
Sandbox Implementation
The developer evaluated Node VM, isolated-vm, and Docker before choosing Deno for sandboxing. Deno was selected because:
- Clean permission model with granular network/filesystem/subprocess control
- Native npm support
- TypeScript built-in
- ~50ms cold start vs 500ms+ for Docker
The sandbox uses these flags: --allow-net --deny-read --deny-write --deny-run --deny-ffi. This allows tool code to make HTTP requests and use npm packages, but prevents filesystem access or process spawning.
Tool Code Format
Tool code is JavaScript/TypeScript that receives a context object for parameters. Example from the source:
const response = await fetch(`https://api.example.com/${context.city}`);
const data = await response.json();
return { temp: data.temp, conditions: data.weather[0].description };
Self-Extension Capability
The system enables a self-extension loop: Claude identifies it needs a capability → creates the tool → uses it immediately → updates it if the result isn't right. This allows the system to become more capable over time without developer intervention.
The implementation is built on n8n as the MCP server with MySQL for tool storage and has been running in production for a few months.
📖 Read the full source: r/ClaudeAI
👀 See Also

CSS Modern Features Agent Skill: Enforce Modern CSS Practices in AI Coding Agents
An agent skill that enforces 57+ modern CSS features across color, layout, selectors, animation, typography, positioning, and component patterns, compatible with Claude Code, Cursor, Windsurf, Codex, Cline, and GitHub Copilot.

GitAgent: An Open Standard for Portable AI Agents in Git Repos
GitAgent is an open specification that defines AI agents through three core files in a git repository: agent.yaml for configuration, SOUL.md for personality/instructions, and SKILL.md for capabilities. The CLI allows running any agent repo directly with commands like npx @open-gitagent/gitagent run -r https://github.com/user/agent -a claude.

Claude Code LSP: Enabling Language Server Protocol for Faster, More Accurate Code Navigation
Claude Code ships without LSP enabled by default, but enabling it transforms code navigation from 30-60 second grep searches to 50ms queries with 100% accuracy. The setup requires a flag discovered through a GitHub issue rather than official documentation.

ClaudeMeter: Open-Source macOS Menu Bar App for Real-Time Claude Usage Tracking
ClaudeMeter is a free, open-source macOS menu bar app for Claude Max subscribers that displays session and weekly usage percentages, reset timers, and pace indicators without interrupting workflow. The entire app was built using Claude (Claude Code/Opus) for Swift code, Supabase backend, and Edge Functions.