Skip to main content
Glama
mcp-tool-search-server
by tayier-ai

MCP Tool Search, 2-Level Skills over MCP & Sandboxed Code Mode

A lightweight, standalone MCP gateway and Python SDK that solves MCP context bloat in IDEs (Antigravity, Cursor, VS Code, Claude Desktop) and provides a native defer_loading payload builder for Anthropic & OpenAI server backends.

  • 2-Level Skills over MCP: skills/list exposes only global server Skills (skill://<server>/global, with SHA-256 integrity digests), while per-tool procedures (skill://<server>/tools/<tool>) load on demand via skills/get or resources/read.

  • Compact Directory Gateway: keeps 400+ tools out of Injection 1 while surfacing available server IDs in initialize.instructions and tool_search_discover.

  • Sandboxed Code Mode: AST-verified Python execution (code_mode_execute) for multi-tool loops without raw intermediate data flooding the LLM context.

  • Native API Builder: BuildDeferredToolsPayloadUseCase converts MCP tools/list into native Anthropic (tool_search_tool_bm25_20251119 + defer_loading: true) or OpenAI ({"type": "tool_search"} + defer_loading: true) tool payloads.


Quick Start (English)

# Install directly from the v1.2.1 GitHub Release wheel (no PyPI account needed):
pip install https://github.com/tayier-ai/tool-search-codemode-mcp/releases/download/v1.2.1/tool_search_codemode_mcp-1.2.1-py3-none-any.whl
# Or run directly from GitHub via uvx:
uvx --from git+https://github.com/tayier-ai/tool-search-codemode-mcp mcp-tool-search-server

# Initialize .mcp.json, .vscode/mcp.json and .claude/settings.json in your project:
mcp-tool-search init --target . --client all --command python
# Or --command uvx (uses git+https://github.com/tayier-ai/tool-search-codemode-mcp)

Installation rapide (Français)

pip install https://github.com/tayier-ai/tool-search-codemode-mcp/releases/download/v1.2.1/tool_search_codemode_mcp-1.2.1-py3-none-any.whl
mcp-tool-search init --target . --client all --command python

La commande init configure .mcp.json, .vscode/mcp.json et .claude/settings.json (ENABLE_TOOL_SEARCH=true) sans écraser vos serveurs MCP déjà présents.


Related MCP server: Code Execution MCP

AI Quick-Setup Prompt (Copy-Paste to Your Coding Agent)

Paste this prompt into Antigravity, Cursor, Claude Code, or VS Code Copilot to let your AI assistant set up and verify the gateway automatically:

Install and configure tool-search-codemode-mcp from https://github.com/tayier-ai/tool-search-codemode-mcp in this workspace:

  1. Run pip install https://github.com/tayier-ai/tool-search-codemode-mcp/releases/download/v1.2.1/tool_search_codemode_mcp-1.2.1-py3-none-any.whl and mcp-tool-search init --target . --client all --command python.

  2. Verify with mcp-tool-search ping that the local .mcp.json and .agents/skills / skills/ folders are indexed.

  3. Keep only daily MCP servers directly enabled in .mcp.json, and discover/invoke remaining tools on demand via tool_search_discover, tool_search_read_skill, and tool_search_invoke.

Author & Engineering Portfolio: www.tayier-ia.fr · GitHub (@tayier-ai)


Python SDK (Native defer_loading for Server Backends)

from canal_sdk_cli.sdk import ToolSearchCodeModeSdk

sdk = ToolSearchCodeModeSdk()
payload = sdk.build_native_tool_search_payload(mcp_tools, provider="anthropic")
# Or provider="openai"

Environment Variables

  • MCP_WORKSPACE_ROOT : Override the workspace directory where .mcp.json and skills/ are discovered (defaults to Path.cwd() when installed as a package).

  • MCP_SKILLS_DIRS : Optional OS-separated (: / ;) extra directories containing <skill>/SKILL.md folders.

Architecture

  • core/domain/ — Pydantic entities & clean Ports (IFleetCatalogPort, IMcpProxyPort, ICodeModeSandboxPort)

  • core/application/ — 7 atomic Use Cases (DiscoverToolsUseCase, InspectWorkflowUseCase, InvokeMcpToolUseCase, ExecuteCodeModePipelineUseCase, ReadSkillResourceUseCase, BuildDeferredToolsPayloadUseCase, InitWorkspaceConfigUseCase)

  • core/infrastructure/ — Zero-import AST catalog scanner, stdio JSON-RPC 2.0 proxy, AST sandbox

  • canal_sdk_cli/ & canal_mcp/ — SDK, CLI (mcp-tool-search), stdio MCP server (mcp-tool-search-server)

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      F
      maintenance
      Provides dynamic, context-aware code assistant skills through hybrid RAG (vector + knowledge graph), enabling runtime skill discovery, automatic toolchain-based recommendations, and on-demand loading from multiple git repositories.
      37 PyPI
      19
      MIT
    • F
      license
      Not graded
      quality
      D
      maintenance
      Enables efficient AI agent operations through sandboxed Python code execution with progressive tool discovery, PII tokenization, and skills persistence, achieving up to 98.7% token reduction by processing data in a sandbox rather than in context.
      -
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables IDEs and coding agents to perform fast deterministic repository queries, symbol and dependency graph navigation, persistent memory recall, skill loading, security scanning, git inspection, and model routing with minimal token usage.
      MIT