AT

ajbmachon/tool-gating-mcp

Developer tools

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る

6 stars 4 forks 品質 56 トレンド 14

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

概要

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. MCP clients like Claude Desktop must load all servers at startup and cannot dynamically add servers during conversations. When using multiple MCP servers: - : 7 search tools (web, research papers, Twitter, companies, etc.) - : Browser automation tools - : Documentation search tools - : 18+ desktop automation tools Loading all servers directly leads to: - 🚨 : 100+ tools consuming most of the context window - 🔒 : Cannot add servers without restarting Claude - 💸 : More tokens consumed per request - 🎯 : AI struggles to choose from too many options Tool Gating MCP acts as an intelligent proxy that: 1. : Claude Desktop connects only to Tool Gating 2.

README

以下は原文 README の抜粋です。原文を見る。

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
  1. Create and activate virtual environment:
uv venv
source .venv/bin/activate  # On Unix/macOS
# .venv\Scripts\activate  # On Windows
  1. Install dependencies:
uv sync
  1. Install package in development mode:
uv pip install -e .

🏃 Running the Server

As HTTP API Server

# Start the server
tool-gating-mcp
GitHub で README 全文を見る

インストール

npx @slack/mcp-server
MCP 初心者?mcpskill.org のガイドから始めましょう →

設定

{ "mcpServers": { "tool-gating": { "command": "/Users/YOUR_USERNAME/.local/bin/mcp-proxy", "args": ["http://localhost:8000/mcp"] } } }