Tools Filter
Fetch only relevant tools for the current conversation and save cost while increasing the precision of your LLM Response
What is Tools Filter?
Tools Filter is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to fetch only relevant tools for the current conversation and save cost while increasing the precision of your llm response
Fetch only relevant tools for the current conversation and save cost while increasing the precision of your LLM Response
This server falls under the Developer Tools category on MCPgee, the world's largest MCP server directory with 33,000+ servers.
Features
- Fetch only relevant tools for the current conversation and s
Use Cases
Maintainer
Works with
Installation
Manual Installation
npx toolsfilterConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
How to Set Up and Use Tools Filter
ToolsFilter (OppieAI) is a Precision-driven Tool Recommendation (PTR) MCP service that solves the tool-overload problem in LLM applications: when agents have access to hundreds of tools, accuracy drops and token costs spike. ToolsFilter acts as an intelligent middleware layer — given the current conversation and a list of available tools, it returns only the 3-5 most relevant tools using a multi-stage pipeline of semantic search, BM25 hybrid retrieval, cross-encoder reranking, and an XGBoost learning-to-rank model. Research shows this approach eliminates up to 236x token overhead while achieving perfect Precision@1 and MRR scores in evaluation.
Prerequisites
- Python 3.11 or later
- Docker and Docker Compose for running the vector database and Redis cache
- An API key for an embedding provider: Voyage AI, OpenAI, or Cohere
- An MCP-compatible client or integration point that can call the ToolsFilter REST API
Clone the repository
Clone the OppieAI ToolsFilter repository from GitHub.
git clone https://github.com/OppieAI/ToolsFilter.git
cd ToolsFilterCreate a virtual environment and install dependencies
Set up an isolated Python environment and install the required packages.
python -m venv venv
source venv/bin/activate
pip install -r requirements.txtConfigure environment variables
Create a .env file with your embedding provider API key and other settings. Voyage AI is the default primary embedding model.
# .env
PRIMARY_EMBEDDING_MODEL=voyage-2
VOYAGE_API_KEY=your_voyage_api_key
# Or use OpenAI:
# PRIMARY_EMBEDDING_MODEL=text-embedding-3-small
# OPENAI_API_KEY=your_openai_api_key
FALLBACK_EMBEDDING_MODEL=text-embedding-3-small
MAX_TOOLS_TO_RETURN=10
SIMILARITY_THRESHOLD=0.7Start the supporting services with Docker Compose
Launch Qdrant (vector database) and Redis (caching) using the included Docker Compose file.
docker-compose up -dStart the ToolsFilter API server
Launch the FastAPI application. It will be available at http://localhost:8000.
uvicorn src.main:app --host 0.0.0.0 --port 8000 --reloadRegister your tools and start filtering
POST your available tools to the register endpoint, then call the filter endpoint with conversation messages to get back only the relevant tools for the current context.
# Register tools
curl -X POST http://localhost:8000/api/v1/tools/register \
-H 'Content-Type: application/json' \
-d '{"tools": [{"type": "function", "name": "grep", "description": "Search file contents"}]}'
# Filter for current conversation
curl -X POST http://localhost:8000/api/v1/tools/filter \
-H 'Content-Type: application/json' \
-d '{"messages": [{"role": "user", "content": "Search for Python files"}], "available_tools": [...]}' Tools Filter Examples
Client configuration
ToolsFilter runs as a standalone REST service rather than a direct MCP stdio server. MCP clients that support HTTP-based tool filtering can point to it directly.
{
"mcpServers": {
"toolsfilter": {
"url": "http://localhost:8000",
"type": "http"
}
}
}API usage example
Example of calling the filter endpoint from Python to get relevant tools for a conversation turn.
import requests
response = requests.post(
"http://localhost:8000/api/v1/tools/filter",
json={
"messages": [
{"role": "user", "content": "Search for Python files in the project"}
],
"available_tools": [
{"type": "function", "name": "grep", "description": "Search file contents by pattern"},
{"type": "function", "name": "find", "description": "Find files by name"}
]
}
)
print(response.json())
# Returns: {"recommended_tools": [{"tool_name": "find", "confidence": 0.95}, ...]}
Troubleshooting Tools Filter
Embedding API errors or rate limit failures on startup
Set FALLBACK_EMBEDDING_MODEL and the corresponding API key in .env. ToolsFilter will automatically switch to the fallback when the primary embedding provider returns errors or hits rate limits.
Tool filter returns empty or irrelevant results
Lower the SIMILARITY_THRESHOLD in .env (default 0.7) if relevant tools are being filtered out. Also make sure your tools were registered via the /api/v1/tools/register endpoint before calling /filter — tools must be indexed into the Qdrant vector store first.
Docker services (Qdrant or Redis) fail to start
Make sure Docker Desktop is running and ports 6333 (Qdrant) and 6379 (Redis) are not already in use. Run 'docker-compose logs' to see specific error messages and address port conflicts.
Frequently Asked Questions about Tools Filter
What is Tools Filter?
Tools Filter is a Model Context Protocol (MCP) server that fetch only relevant tools for the current conversation and save cost while increasing the precision of your llm response It connects AI assistants to external tools and data sources through a standardized interface.
How do I install Tools Filter?
Follow the installation instructions on the Tools Filter GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.
Which AI clients work with Tools Filter?
Tools Filter works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.
Is Tools Filter free to use?
Yes, Tools Filter is open source and available under the NOASSERTION license. You can use it freely in both personal and commercial projects.
Tools Filter Alternatives — Similar Developer Tools Servers
Looking for alternatives to Tools Filter? Here are other popular developer tools servers you can use with Claude, Cursor, and VS Code.
Ecc
★ 188.2kThe agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.
Javaguide
★ 155.8kJava 面试 & 后端通用面试指南,覆盖计算机基础、数据库、分布式、高并发、系统设计与 AI 应用开发
Gemini CLI
★ 104.5kA secure MCP server that wraps the Google Gemini CLI, allowing clients to query Gemini models using local OAuth sessions without requiring an API key. It provides tools for model interaction and diagnostics with built-in protection against command in
Awesome MCP Servers
★ 87.3k⭐ Curated list of Model Context Protocol (MCP) servers - tools that extend Claude Desktop, Cursor, Windsurf, and other MCP clients with custom capabilities.
MCP Servers
★ 86.0kModel Context Protocol Servers
CC Switch
★ 77.5kA cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Gemini CLI & Hermes Agent. Only official website: ccswitch.io
Browse More Developer Tools MCP Servers
Explore all developer tools servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.
Set Up Tools Filter in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
Ready to use Tools Filter?
Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.