{"repo":"Portkey-AI/mcp-tool-filter","free":true,"listed":false,"github":"https://github.com/Portkey-AI/mcp-tool-filter","clone":"git clone https://github.com/Portkey-AI/mcp-tool-filter.git","description":"Ultra-fast semantic tool filtering for MCP (Model Context Protocol) servers using embedding similarity. Reduce your tool context from 1000+ tools down to the most relevant 10-20 tools in under 10ms.","language":"TeX","stars":48,"topics":[],"license":"MIT","category":"mcp-servers","readme_excerpt":"@portkey-ai/mcp-tool-filter Ultra-fast semantic tool filtering for MCP (Model Context Protocol) servers using embedding similarity. Reduce your tool context from 1000+ tools down to the most relevant 10-20 tools in under 10ms . Features - ⚡ Lightning Fast : Initialize the filter with MCP servers. This precomputes and caches all tool embeddings. Note : Call this once during startup. It's an async operation that may take a few seconds depending on the number of tools. filter(input: FilterInput, options?: FilterOptions): Promise Filter tools based on the input context. Input Types: Options (all optional, override defaults): Returns: getStats() Get statistics about the filter state. clearCache() Clear the context embedding cache. Performance Optimization Built-in Optimizations The library includes several performance optimizations out of the box: 1. 🚀 Loop-Unrolled Dot Product - Vector similarity computation is 6-8x faster through CPU pipeline optimization 2. 📊 Smart Top-K Selection - Hybrid algorithm uses fast built-in sort for typical workloads, switches to heap-based selection for 500+ tools 3. 💾 True LRU Cache - Intelligent cache eviction based on access patterns, not just insertion order 4. 🎯 In-Place Operations - Reduced memory allocations through in-place vector normalization 5. ⚡ Set-Based Lookups - O(1) exclusion checking instead of O(n) array scanning These optimizations are automatic and transparent - no configuration needed! Latency Breakdown Typical performance f","default_branch":null,"files":null,"tree":[],"storefront":"/r/Portkey-AI","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/Portkey-AI/mcp-tool-filter/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}