T

Tool Guardian

by LuminariSoftwares · io.github.LuminariSoftwares/tool-guardian

MCP router that fronts your other MCP servers behind a few small generic tools, so their tool definitions stay out of the context window and are discovered on demand.

pypi Local · stdio GlamaOfficial MCP Registry High confidence

Install

Add to ~/Library/Application Support/Claude/claude_desktop_config.json

Windows / Linux path
Windows: %APPDATA%\Claude\claude_desktop_config.json
Linux: ~/.config/Claude/claude_desktop_config.json
{
  "mcpServers": {
    "io-github-luminarisoftwares-tool-guardian": {
      "command": "uvx",
      "args": [
        "tool-guardian"
      ],
      "env": {
        "TG_LOOP_GUARD": "<VALUE>",
        "TG_VALIDATE_ARGS": "<VALUE>",
        "TOOL_GUARDIAN_ENV": "<VALUE>",
        "TOOL_GUARDIAN_STATE": "<VALUE>",
        "TOOL_GUARDIAN_CONFIG": "<VALUE>",
        "TOOL_GUARDIAN_LADDER": "<VALUE>",
        "TOOL_GUARDIAN_PRESET": "<VALUE>",
        "TOOL_GUARDIAN_PYTHON": "<VALUE>",
        "TOOL_GUARDIAN_SKILLS": "<VALUE>",
        "TOOL_GUARDIAN_CALL_LOG": "<VALUE>",
        "TOOL_GUARDIAN_HOOK_MODE": "<VALUE>",
        "TOOL_GUARDIAN_PROVE_KEY": "<VALUE>",
        "TOOL_GUARDIAN_PROVE_URL": "<VALUE>",
        "GUARDIAN_NO_UPDATE_CHECK": "<VALUE>",
        "TOOL_GUARDIAN_DESC_WORDS": "<VALUE>",
        "TOOL_GUARDIAN_PROVE_MODEL": "<VALUE>",
        "TOOL_GUARDIAN_CALL_TIMEOUT": "<VALUE>",
        "TOOL_GUARDIAN_CATALOGUE_CHARS": "<VALUE>",
        "TOOL_GUARDIAN_DESCRIBE_DETAIL": "<VALUE>"
      }
    }
  }
}

Restart Claude Desktop to activate the new server.

Add to .cursor/mcp.json (project) or ~/.cursor/mcp.json (global)

Windows / Linux path
Windows: .cursor\mcp.json (project) or %USERPROFILE%\.cursor\mcp.json (global)
Linux: .cursor/mcp.json (project) or ~/.cursor/mcp.json (global)
{
  "mcpServers": {
    "io-github-luminarisoftwares-tool-guardian": {
      "command": "uvx",
      "args": [
        "tool-guardian"
      ],
      "env": {
        "TG_LOOP_GUARD": "<VALUE>",
        "TG_VALIDATE_ARGS": "<VALUE>",
        "TOOL_GUARDIAN_ENV": "<VALUE>",
        "TOOL_GUARDIAN_STATE": "<VALUE>",
        "TOOL_GUARDIAN_CONFIG": "<VALUE>",
        "TOOL_GUARDIAN_LADDER": "<VALUE>",
        "TOOL_GUARDIAN_PRESET": "<VALUE>",
        "TOOL_GUARDIAN_PYTHON": "<VALUE>",
        "TOOL_GUARDIAN_SKILLS": "<VALUE>",
        "TOOL_GUARDIAN_CALL_LOG": "<VALUE>",
        "TOOL_GUARDIAN_HOOK_MODE": "<VALUE>",
        "TOOL_GUARDIAN_PROVE_KEY": "<VALUE>",
        "TOOL_GUARDIAN_PROVE_URL": "<VALUE>",
        "GUARDIAN_NO_UPDATE_CHECK": "<VALUE>",
        "TOOL_GUARDIAN_DESC_WORDS": "<VALUE>",
        "TOOL_GUARDIAN_PROVE_MODEL": "<VALUE>",
        "TOOL_GUARDIAN_CALL_TIMEOUT": "<VALUE>",
        "TOOL_GUARDIAN_CATALOGUE_CHARS": "<VALUE>",
        "TOOL_GUARDIAN_DESCRIBE_DETAIL": "<VALUE>"
      }
    }
  }
}

Cursor usually picks up config changes automatically; if the server does not appear, reload the window.

Add to .mcp.json (project) or ~/.claude.json (global)

Windows / Linux path
Windows: .mcp.json (project) or %USERPROFILE%\.claude.json (global)
Linux: .mcp.json (project) or ~/.claude.json (global)
{
  "mcpServers": {
    "io-github-luminarisoftwares-tool-guardian": {
      "command": "uvx",
      "args": [
        "tool-guardian"
      ],
      "env": {
        "TG_LOOP_GUARD": "<VALUE>",
        "TG_VALIDATE_ARGS": "<VALUE>",
        "TOOL_GUARDIAN_ENV": "<VALUE>",
        "TOOL_GUARDIAN_STATE": "<VALUE>",
        "TOOL_GUARDIAN_CONFIG": "<VALUE>",
        "TOOL_GUARDIAN_LADDER": "<VALUE>",
        "TOOL_GUARDIAN_PRESET": "<VALUE>",
        "TOOL_GUARDIAN_PYTHON": "<VALUE>",
        "TOOL_GUARDIAN_SKILLS": "<VALUE>",
        "TOOL_GUARDIAN_CALL_LOG": "<VALUE>",
        "TOOL_GUARDIAN_HOOK_MODE": "<VALUE>",
        "TOOL_GUARDIAN_PROVE_KEY": "<VALUE>",
        "TOOL_GUARDIAN_PROVE_URL": "<VALUE>",
        "GUARDIAN_NO_UPDATE_CHECK": "<VALUE>",
        "TOOL_GUARDIAN_DESC_WORDS": "<VALUE>",
        "TOOL_GUARDIAN_PROVE_MODEL": "<VALUE>",
        "TOOL_GUARDIAN_CALL_TIMEOUT": "<VALUE>",
        "TOOL_GUARDIAN_CATALOGUE_CHARS": "<VALUE>",
        "TOOL_GUARDIAN_DESCRIBE_DETAIL": "<VALUE>"
      }
    }
  }
}

The server will be available in the next Claude Code session.

Add to .vscode/mcp.json

Windows / Linux path
Windows: .vscode\mcp.json
Linux: .vscode/mcp.json
{
  "servers": {
    "io-github-luminarisoftwares-tool-guardian": {
      "command": "uvx",
      "args": [
        "tool-guardian"
      ],
      "env": {
        "TG_LOOP_GUARD": "<VALUE>",
        "TG_VALIDATE_ARGS": "<VALUE>",
        "TOOL_GUARDIAN_ENV": "<VALUE>",
        "TOOL_GUARDIAN_STATE": "<VALUE>",
        "TOOL_GUARDIAN_CONFIG": "<VALUE>",
        "TOOL_GUARDIAN_LADDER": "<VALUE>",
        "TOOL_GUARDIAN_PRESET": "<VALUE>",
        "TOOL_GUARDIAN_PYTHON": "<VALUE>",
        "TOOL_GUARDIAN_SKILLS": "<VALUE>",
        "TOOL_GUARDIAN_CALL_LOG": "<VALUE>",
        "TOOL_GUARDIAN_HOOK_MODE": "<VALUE>",
        "TOOL_GUARDIAN_PROVE_KEY": "<VALUE>",
        "TOOL_GUARDIAN_PROVE_URL": "<VALUE>",
        "GUARDIAN_NO_UPDATE_CHECK": "<VALUE>",
        "TOOL_GUARDIAN_DESC_WORDS": "<VALUE>",
        "TOOL_GUARDIAN_PROVE_MODEL": "<VALUE>",
        "TOOL_GUARDIAN_CALL_TIMEOUT": "<VALUE>",
        "TOOL_GUARDIAN_CATALOGUE_CHARS": "<VALUE>",
        "TOOL_GUARDIAN_DESCRIBE_DETAIL": "<VALUE>"
      }
    }
  }
}

Reload the VS Code window to activate.

Add to ~/.codeium/windsurf/mcp_config.json

Windows / Linux path
Windows: %USERPROFILE%\.codeium\windsurf\mcp_config.json
Linux: ~/.codeium/windsurf/mcp_config.json
{
  "mcpServers": {
    "io-github-luminarisoftwares-tool-guardian": {
      "command": "uvx",
      "args": [
        "tool-guardian"
      ],
      "env": {
        "TG_LOOP_GUARD": "<VALUE>",
        "TG_VALIDATE_ARGS": "<VALUE>",
        "TOOL_GUARDIAN_ENV": "<VALUE>",
        "TOOL_GUARDIAN_STATE": "<VALUE>",
        "TOOL_GUARDIAN_CONFIG": "<VALUE>",
        "TOOL_GUARDIAN_LADDER": "<VALUE>",
        "TOOL_GUARDIAN_PRESET": "<VALUE>",
        "TOOL_GUARDIAN_PYTHON": "<VALUE>",
        "TOOL_GUARDIAN_SKILLS": "<VALUE>",
        "TOOL_GUARDIAN_CALL_LOG": "<VALUE>",
        "TOOL_GUARDIAN_HOOK_MODE": "<VALUE>",
        "TOOL_GUARDIAN_PROVE_KEY": "<VALUE>",
        "TOOL_GUARDIAN_PROVE_URL": "<VALUE>",
        "GUARDIAN_NO_UPDATE_CHECK": "<VALUE>",
        "TOOL_GUARDIAN_DESC_WORDS": "<VALUE>",
        "TOOL_GUARDIAN_PROVE_MODEL": "<VALUE>",
        "TOOL_GUARDIAN_CALL_TIMEOUT": "<VALUE>",
        "TOOL_GUARDIAN_CATALOGUE_CHARS": "<VALUE>",
        "TOOL_GUARDIAN_DESCRIBE_DETAIL": "<VALUE>"
      }
    }
  }
}

Restart Windsurf (or refresh its MCP servers panel) to activate the new server.

Windsurf Next uses ~/.codeium/windsurf-next/mcp_config.json. Devin Desktop (the Windsurf rebrand) uses ~/.config/devin/mcp_config.json and imports the Windsurf file.

Add to ~/Library/Application Support/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json

Windows / Linux path
Windows: %APPDATA%\Code\User\globalStorage\saoudrizwan.claude-dev\settings\cline_mcp_settings.json
Linux: ~/.config/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json
{
  "mcpServers": {
    "io-github-luminarisoftwares-tool-guardian": {
      "command": "uvx",
      "args": [
        "tool-guardian"
      ],
      "env": {
        "TG_LOOP_GUARD": "<VALUE>",
        "TG_VALIDATE_ARGS": "<VALUE>",
        "TOOL_GUARDIAN_ENV": "<VALUE>",
        "TOOL_GUARDIAN_STATE": "<VALUE>",
        "TOOL_GUARDIAN_CONFIG": "<VALUE>",
        "TOOL_GUARDIAN_LADDER": "<VALUE>",
        "TOOL_GUARDIAN_PRESET": "<VALUE>",
        "TOOL_GUARDIAN_PYTHON": "<VALUE>",
        "TOOL_GUARDIAN_SKILLS": "<VALUE>",
        "TOOL_GUARDIAN_CALL_LOG": "<VALUE>",
        "TOOL_GUARDIAN_HOOK_MODE": "<VALUE>",
        "TOOL_GUARDIAN_PROVE_KEY": "<VALUE>",
        "TOOL_GUARDIAN_PROVE_URL": "<VALUE>",
        "GUARDIAN_NO_UPDATE_CHECK": "<VALUE>",
        "TOOL_GUARDIAN_DESC_WORDS": "<VALUE>",
        "TOOL_GUARDIAN_PROVE_MODEL": "<VALUE>",
        "TOOL_GUARDIAN_CALL_TIMEOUT": "<VALUE>",
        "TOOL_GUARDIAN_CATALOGUE_CHARS": "<VALUE>",
        "TOOL_GUARDIAN_DESCRIBE_DETAIL": "<VALUE>"
      }
    }
  }
}

Cline reloads cline_mcp_settings.json automatically; if the server does not appear, reload the VS Code window.

Open it from Cline's MCP Servers panel → Configure. Roo Code uses a different file and format.

Configuration

Environment variables this server reads. Secrets stay on your machine.

NameRequiredDescription
TG_LOOP_GUARD No Set to 0 to disable the loop guard that warns on the 3rd identical call and refuses it on the 5th.
TG_VALIDATE_ARGS No Set to 0 to disable argument validation (silent fixes of near-miss types, and refusal of invalid calls with an example).
TOOL_GUARDIAN_ENV No Explicit path to a .env file to load. Otherwise a .env is looked for by an upward search starting at the config file's directory (or the cwd) and walking up to 5 parent directories.
TOOL_GUARDIAN_STATE No Path to state.json, where activated groups are remembered across sessions. Empty disables it. Default ~/.tool-guardian/state.json.
TOOL_GUARDIAN_CONFIG No Path to the mcp.json config file. Config is searched in order: --config PATH, $TOOL_GUARDIAN_CONFIG, ./mcp.json, ./.mcp.json, ~/.tool-guardian/mcp.json.
TOOL_GUARDIAN_LADDER No Set to 0 to turn off the output ladder (result shaping) applied to call_tool results.
TOOL_GUARDIAN_PRESET No Set to 'small' for 8k-context local models. It sets TOOL_GUARDIAN_CATALOGUE_CHARS=1500 and TOOL_GUARDIAN_DESC_WORDS=6.
TOOL_GUARDIAN_PYTHON No Python interpreter for the DSH bundle to use. Otherwise a .venv beside the package, then python/python3 on PATH (3.9+).
TOOL_GUARDIAN_SKILLS No One or more folders containing SKILL.md files, separated by ':' on Linux/macOS and ';' on Windows. Enables the list_skills and read_skill tools.
TOOL_GUARDIAN_CALL_LOG No Path to the call log where every router call is appended (argument values never are). Default ~/.tool-guardian/calls.jsonl.
TOOL_GUARDIAN_HOOK_MODE No Set to 'deny' to make the Claude Code PreToolUse hook block a shell call that does a router tool's job and tell Claude which call_tool(...) to use.
TOOL_GUARDIAN_PROVE_KEY No Bearer token for the OpenAI-compatible endpoint used by 'tool-guardian --prove'.
TOOL_GUARDIAN_PROVE_URL No Base URL of an OpenAI-compatible chat endpoint (e.g. http://127.0.0.1:11434/v1) used by 'tool-guardian --prove' to test whether the model drives the router.
GUARDIAN_NO_UPDATE_CHECK No Set to 1 to disable the once-a-day update check.
TOOL_GUARDIAN_DESC_WORDS No Words of a tool, server or skill description shown in catalogue and search lines. Default 12; 6 with TOOL_GUARDIAN_PRESET=small.
TOOL_GUARDIAN_PROVE_MODEL No Model id used by 'tool-guardian --prove'. Default: the first id from GET <url>/models.
TOOL_GUARDIAN_CALL_TIMEOUT No Milliseconds/seconds timeout before a call gets no reply; the router stops the backend and restarts it before the next call. A second failure within 60 s marks the backend DOWN.
TOOL_GUARDIAN_CATALOGUE_CHARS No Each server's block in list_capabilities is cut at this many characters, with a '[+N more tools not shown ...]' line pointing at search_capabilities. Default 0 (no cap); 1500 with TOOL_GUARDIAN_PRESET=small.
TOOL_GUARDIAN_DESCRIBE_DETAIL No Set to 'full' to make describe_tool return the whole tool definition by default instead of the compact form.

Similar servers