Tool Gating MCP

by ajbmachon

403 downloads
Not rated
GitHub

About

Implements a tool gating and discovery system to preserve LLM context and focus while having access to many MCP servers

Details

Author
ajbmachon
Downloads
403
Categories
Other

- Proxy architecture routes calls to multiple backend MCP servers
- Dynamic tool discovery via semantic search across all servers
- Smart provisioning loads only relevant tools within token budgets
- Transparent execution routes tool calls to the correct backend
- 90%+ reduction in context usage compared to loading all servers
- Zero configuration – Claude Desktop only needs Tool Gating MCP

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name Tool Gating MCP
    Command (node, npx, python, etc.)

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

Install Python 3.12+ and uv, clone the repo, create a virtual environment, install dependencies, and run tool-gating-mcp (HTTP API server) or integrate it as a native MCP server using mcp-proxy. Configure Claude Desktop to point to Tool Gating MCP; then use built-in tools like discover_tools, provision_tools, and register_tool.

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "tool gating mcp": {
            "tool-gating-mcp": {
                "command": "uv",
                "args": [
                    "venv"
                ]
            }
        }
    }
}

McpServers

{
    "tool-gating-mcp": {
        "command": "uv",
        "args": [
            "venv"
        ]
    }
}

Tool Gating MCP

An intelligent proxy/router for Model Context Protocol (MCP) that enables Claude Desktop and other MCP clients to dynamically discover and use tools from multiple MCP servers while maintaining a single connection point. This system prevents context bloat by intelligently selecting only the most relevant tools for each task.

🎯 The Problem

MCP clients like Claude Desktop must load all servers at startup and cannot dynamically add servers during conversations. When using multiple MCP servers:
- Exa server: 7 search tools (web, research papers, Twitter, companies, etc.)
- Puppeteer: Browser automation tools
- Context7: Documentation search tools
- Desktop Commander: 18+ desktop automation tools

Loading all servers directly leads to:
- 🚨 Context bloat: 100+ tools consuming most of the context window
- πŸ”’ Static configuration: Cannot add servers without restarting Claude
- πŸ’Έ Increased costs: More tokens consumed per request
- 🎯 Poor tool selection: AI struggles to choose from too many options

πŸ’‘ The Solution

Tool Gating MCP acts as an intelligent proxy that:
1. Single Connection: Claude Desktop connects only to Tool Gating
2. Backend Management: Maintains connections to multiple MCP servers
3. Smart Discovery: Finds relevant tools across all servers using semantic search
4. Dynamic Provisioning: Loads only needed tools within token budgets
5. Transparent Routing: Executes tools on appropriate backend servers

Example: Instead of configuring 10 MCP servers with 100+ tools, configure just Tool Gating. Then dynamically discover and use only the 2-3 tools you need.

πŸš€ Features

- Proxy Architecture: Single MCP server that routes to multiple backend servers
- Dynamic Tool Discovery: Find tools across all servers without manual configuration
- Semantic Search: Natural language queries to find the right tools
- Smart Provisioning: Load only relevant tools within token budgets
- Transparent Execution: Route tool calls to appropriate backend servers
- Native MCP Server: Direct integration with Claude Desktop via mcp-proxy
- Cross-Server Intelligence: Unified view of tools from Puppeteer, Exa, Context7, etc.
- Token Optimization: 90%+ reduction in context usage vs. loading all servers
- Zero Configuration: Claude Desktop needs only Tool Gating configuration

πŸ“‹ Prerequisites

- Python 3.12+
- uv package manager

πŸ”§ Installation

1. Clone the repository:

git clone https://github.com/yourusername/tool-gating-mcp.git
cd tool-gating-mcp

2. Create and activate virtual environment:
```bash
uv venv
source .venv/bin/activate # On Unix/macOS

No reviews yet β€” be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.