JIT Tool Synthesis
This server enables on-demand AI-powered tool generation with human approval gates and safe sandboxed execution — allowing you to create, manage, and run dynamically synthesized TypeScript tools using an LLM.
Synthesize tools (
synthesize_tool) — Describe a capability in natural language (with optional example input/output) and the LLM generates a working TypeScript tool, placed in a pending approval queueManage approval workflow — Use
list_pendingto review queued tools,approve_toolto activate them, orreject_toolto discard themExecute tools safely (
execute_tool) — Run approved tools in an isolated VM sandbox with blocked dangerous patternsBrowse and manage tools — Use
list_toolsto see available tools,get_toolfor full details (code, metadata), andremove_toolto delete permanentlyConfigure LLM at runtime — Use
get_configandset_configto view or switch providers (OpenAI, OpenRouter, Ollama, Groq, or any OpenAI-compatible API), models, and base URLs without restarting the server
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@JIT Tool Synthesis Create a tool that fetches the latest top stories from Hacker News"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
JIT Tool Synthesis v4
LLM-powered on-demand tool generation with human-in-the-loop approval and safe execution.
Overview
This system generates TypeScript tools dynamically using an LLM, requires human approval before execution, and runs them in a sandboxed environment.
Related MCP server: code2mcp
Architecture
┌─────────────┐ ┌──────────────┐ ┌─────────────┐
│ Synthesizer │────▶│ Approval │────▶│ Sandbox │
│ (LLM) │ │ (Human Gate) │ │ (Execution) │
└─────────────┘ └──────────────┘ └─────────────┘
│ │ │
▼ ▼ ▼
Generates TS Waits for Runs in
tool code human approval isolated envComponents
File | Purpose |
| Generates tool code using any OpenAI-compatible LLM |
| Human-in-the-loop gate — requires approval before execution |
| Safe execution environment for generated code |
| Tool persistence and storage |
| MCP server integration |
| Runtime configuration management |
Provider-Agnostic
This tool works with any OpenAI-compatible LLM API:
OpenRouter — 100+ models (Claude, GPT, Llama, etc.)
OpenAI — GPT-4o, o3, etc.
Ollama — Local models (Llama, Qwen, etc.)
LM Studio — Local models with GUI
Groq — Fast inference
Any other OpenAI-compatible API
Setup
# Install dependencies
npm install
# Copy environment template
cp .env.example .envConfigure Your LLM Provider
Edit .env with your provider details:
# Option 1: OpenRouter (default - 100+ models)
LLM_API_KEY=your-openrouter-key
LLM_BASE_URL=https://openrouter.ai/api/v1
LLM_MODEL=anthropic/claude-sonnet-4-6
# Option 2: OpenAI direct
LLM_API_KEY=sk-...
LLM_BASE_URL=https://api.openai.com/v1
LLM_MODEL=gpt-5.4
# Option 3: Ollama (local)
LLM_BASE_URL=http://localhost:11434/v1
LLM_MODEL=llama-3.3
# Option 4: Groq
LLM_API_KEY=gsk_...
LLM_BASE_URL=https://api.groq.com/openai/v1
LLM_MODEL=llama-3.3-70b-versatileUsage
Build
npm run buildTest with MCP Inspector
The fastest way to verify everything works:
npx @modelcontextprotocol/inspector node dist/server.jsConnect to MCP Clients
This server works with any MCP client. Example configs:
Claude Desktop — add to your Claude Desktop MCP settings:
{
"mcpServers": {
"jit-tool-synthesis": {
"command": "node",
"args": ["/absolute/path/to/jit-tool-synthesis/dist/server.js"],
"env": {
"LLM_API_KEY": "your-api-key",
"LLM_BASE_URL": "https://openrouter.ai/api/v1",
"LLM_MODEL": "anthropic/claude-sonnet-4-6"
}
}
}
}Claude Code:
claude mcp add jit-tools node /absolute/path/to/jit-tool-synthesis/dist/server.jsVS Code (Copilot):
code --add-mcp '{"name":"jit-tools","type":"stdio","command":"node","args":["/absolute/path/to/jit-tool-synthesis/dist/server.js"]}'Cursor — add to .cursor/mcp.json:
{
"mcpServers": {
"jit-tools": {
"command": "node",
"args": ["/absolute/path/to/jit-tool-synthesis/dist/server.js"],
"env": { "LLM_API_KEY": "your-api-key" }
}
}
}Runtime Configuration
You can change the LLM provider without restarting:
# View current config
get_config
# Change model at runtime
set_config model=openai/gpt-5.4MCP Tools
Tool | Description |
| Generate a new tool from natural language |
| Test a pending tool with sample params before approval |
| Activate a pending tool |
| Discard a pending tool |
| Run an approved tool |
| List all approved tools |
| View tool details |
| Delete a tool |
| List tools waiting for approval |
| View LLM configuration |
| Change LLM provider/model at runtime |
Workflow
Request — User asks for a tool (e.g., "create a color converter")
Synthesize — LLM generates tool code
Test — Validate with sample params before committing
Approve — Human reviews and approves the code
Execute — Tool runs in sandboxed environment
Store — Approved tools persist across sessions
Environment Variables
Variable | Description | Default |
| API key for your provider | (required for cloud) |
| API endpoint | |
| Model to use | anthropic/claude-sonnet-4-6 |
Also supported (legacy): OPENROUTER_API_KEY, OPENAI_API_KEY, OPENAI_BASE_URL, SYNTHESIZER_MODEL
Security
Generated code runs in isolated VM sandbox
Blocked patterns prevent dangerous code (process, require, eval, etc.)
API keys not stored in config file
Status
Production Ready — Phase 1 complete.
Available Tools
8 toolsapprove_toolApprove a synthesized toolD
Inputs: tool_name (required).
execute_toolExecute an approved toolD
Inputs: tool_name (required), params (required).
get_toolGet tool detailsD
Inputs: tool_name (required).
list_pendingList pending toolsB
Returns a list of tools waiting for approval
Inputs: no named parameters.
list_toolsList all available toolsB
Returns a list of all approved and available tools
Inputs: no named parameters.
reject_toolReject a synthesized toolD
Inputs: tool_name (required).
remove_toolRemove an approved toolD
Inputs: tool_name (required).
synthesize_toolSynthesize a new toolB
Describe a capability you need and this will generate a working tool. Returns a pending tool that needs approval before it becomes available.
Inputs: description (required), example_input, example_output.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 8 tools
Most tools have distinct purposes: list_pending and list_tools are clearly different (pending vs. all tools), synthesize_tool creates new tools, and approve_tool/reject_tool/remove_tool handle tool lifecycle. However, get_tool lacks a description, making its distinction from list_tools ambiguous—it might fetch a single tool's details, but this is unclear without context.
All tool names follow a consistent verb_noun pattern with snake_case, such as approve_tool, execute_tool, get_tool, list_pending, list_tools, reject_tool, remove_tool, and synthesize_tool. This uniformity makes the set predictable and easy to understand at a glance.
With 8 tools, this server is well-scoped for managing a tool synthesis and approval workflow. The count supports core operations like listing, creating, approving, rejecting, removing, and executing tools, without being overly sparse or bloated.
The tool set covers a complete lifecycle for tool synthesis: create (synthesize_tool), list (list_pending, list_tools), approve/reject (approve_tool, reject_tool), remove (remove_tool), and execute (execute_tool). A minor gap is the lack of descriptions for tools like get_tool, which might hinder full coverage if it's meant for detailed retrieval, but the core workflow is well-supported.
Maintenance
Related MCP Connectors
Runtime permission, approval, and audit layer for AI agent tool execution.
Ephemeral single-task tool forged from examples, sandbox-proven, task-bound, expiring by design.
Make your own apps and tools: build, edit and publish web apps from a conversation.
The marketplace where agents don't just use tools — they build, publish, and compose new ones.
Related MCP Servers
- AlicenseAqualityFmaintenanceEnables AI models to dynamically create and execute their own custom tools through a meta-function architecture, supporting JavaScript, Python, and Shell runtimes with sandboxed security and human approval flows.510MIT
- FlicenseAqualityNot gradedmaintenanceEnables execution of TypeScript code to call MCP tools instead of direct tool calls, reducing token usage by up to 98% while orchestrating complex multi-tool workflows through secure sandboxed code execution.1-
- AlicenseAqualityDmaintenanceEnables AI-powered generation of production-ready CTP (ConveniencePro Tool Protocol) tools from natural language descriptions, including tool definitions, implementations, tests, and TypeScript validation.517 npmMIT
- AlicenseAqualityCmaintenanceEnables dynamic creation and execution of custom tools/functions in multiple programming languages at runtime, exposing them to MCP clients like Claude.413 npm45MIT