Skip to main content
Glama

JITツール合成 v4

LLMを活用したオンデマンドのツール生成、人間による承認、および安全な実行環境を提供します。

概要

このシステムは、LLMを使用してTypeScriptツールを動的に生成し、実行前に人間の承認を求め、サンドボックス環境で実行します。

Related MCP server: Code Mode MCP Server

アーキテクチャ

┌─────────────┐     ┌──────────────┐     ┌─────────────┐
│ Synthesizer │────▶│   Approval   │────▶│  Sandbox    │
│   (LLM)     │     │ (Human Gate) │     │ (Execution) │
└─────────────┘     └──────────────┘     └─────────────┘
       │                   │                    │
       ▼                   ▼                    ▼
  Generates TS        Waits for            Runs in
  tool code          human approval       isolated env

コンポーネント

ファイル

目的

synthesizer.ts

OpenAI互換のLLMを使用してツールコードを生成

approval.ts

人間による承認ゲート — 実行前に承認が必要

sandbox.ts

生成されたコードのための安全な実行環境

registry.ts

ツールの永続化とストレージ

server.ts

MCPサーバー統合

config.ts

ランタイム設定管理

プロバイダー非依存

このツールはあらゆるOpenAI互換のLLM APIで動作します:

  • OpenRouter — 100以上のモデル (Claude, GPT, Llamaなど)

  • OpenAI — GPT-4o, o3など

  • Ollama — ローカルモデル (Llama, Qwenなど)

  • LM Studio — GUI付きローカルモデル

  • Groq — 高速推論

  • その他 — OpenAI互換のあらゆるAPI

セットアップ

# Install dependencies
npm install

# Copy environment template
cp .env.example .env

LLMプロバイダーの設定

.envを編集してプロバイダーの詳細を設定します:

# 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-versatile

使用方法

ビルド

npm run build

MCP Inspectorでのテスト

すべてが動作することを確認する最も速い方法:

npx @modelcontextprotocol/inspector node dist/server.js

MCPクライアントへの接続

このサーバーはあらゆるMCPクライアントで動作します。設定例:

Claude Desktop — Claude DesktopのMCP設定に追加:

{
  "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.js

VS Code (Copilot):

code --add-mcp '{"name":"jit-tools","type":"stdio","command":"node","args":["/absolute/path/to/jit-tool-synthesis/dist/server.js"]}'

Cursor.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" }
    }
  }
}

ランタイム設定

再起動せずにLLMプロバイダーを変更できます:

# View current config
get_config

# Change model at runtime
set_config model=openai/gpt-5.4

MCPツール

ツール

説明

synthesize_tool

自然言語から新しいツールを生成

test_tool

承認前にサンプルパラメータで保留中のツールをテスト

approve_tool

保留中のツールを有効化

reject_tool

保留中のツールを破棄

execute_tool

承認済みのツールを実行

list_generated_tools

承認済みのツールを一覧表示

get_tool

ツールの詳細を表示

remove_tool

ツールを削除

list_pending

承認待ちのツールを一覧表示

get_config

LLM設定を表示

set_config

ランタイムでLLMプロバイダー/モデルを変更

ワークフロー

  1. リクエスト — ユーザーがツールを要求 (例: 「カラーコンバーターを作成して」)

  2. 合成 — LLMがツールコードを生成

  3. テスト — コミット前にサンプルパラメータで検証

  4. 承認 — 人間がコードを確認し、承認

  5. 実行 — ツールがサンドボックス環境で実行

  6. 保存 — 承認されたツールはセッションをまたいで永続化

環境変数

変数

説明

デフォルト

LLM_API_KEY

プロバイダーのAPIキー

(クラウド利用時は必須)

LLM_BASE_URL

APIエンドポイント

https://openrouter.ai/api/v1

LLM_MODEL

使用するモデル

anthropic/claude-sonnet-4-6

以下もサポート (レガシー): OPENROUTER_API_KEY, OPENAI_API_KEY, OPENAI_BASE_URL, SYNTHESIZER_MODEL

セキュリティ

  • 生成されたコードは分離されたVMサンドボックス内で実行

  • ブロックパターンにより危険なコード (process, require, evalなど) を防止

  • APIキーは設定ファイルに保存されません

ステータス

本番環境対応済み — フェーズ1完了。

Install Server
F
license - not found
C
quality
D
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • A
    license
    A
    quality
    F
    maintenance
    Enables 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.
    5
    10
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables LLMs to interact with MCP servers by writing TypeScript/JavaScript code instead of direct tool calls. Provides a code execution sandbox that accesses MCP servers through HTTP proxy endpoints.
    20
    123
    Apache 2.0
  • F
    license
    A
    quality
    Not graded
    maintenance
    Enables 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
  • A
    license
    A
    quality
    D
    maintenance
    Enables AI-powered generation of production-ready CTP (ConveniencePro Tool Protocol) tools from natural language descriptions, including tool definitions, implementations, tests, and TypeScript validation.
    5
    12
    MIT

View all related MCP servers

Related MCP Connectors

  • Runtime permission, approval, and audit layer for AI agent tool execution.

  • Create and manage AI agents that collaborate and solve problems through natural language interacti…

  • See, price, and control every tool call your AI agents make: policy checks, cost, and audit tools.

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/EyeSeeThru/jit-tool-synthesis'

If you have feedback or need assistance with the MCP directory API, please join our Discord server