Feature request. MCP Client improvement - Decrease token use, increase quality: Dynamic tool selection
We need to improve the MCP Client. Currently, all tools are simply listed consuming context window, creating Context Rot, meaning worse results for more tokens/money.
To fix that I think it’s appropriate to implement MCP-RAG on the MCP Client end to pull a list of semantically close tools for each user prompt dynamically.
Suggested embedding model: codestral-embed from Mistral. And Mxbai-rerank-v2 to improve performance for, code, MCP, and tool retrieval.
Some ideas on how https://github.com/modelcontextprotocol/modelcontextprotocol/discussions/845
Suggested Embedded (In-Progress) VectorDBs:
https://github.com/tursodatabase/turso https://github.com/chroma-core/chroma https://github.com/lancedb/lancedb DuckDB with VSS extention
Would appreciate if you vote for this improvement idea to standardize MCP Specification with Delegated Advanced Tool Search in my comment feature here.
MCP-Agent with EmbeddingRouter for semantic tool search and filtering.
https://github.com/lastmile-ai/mcp-agent
MCP-use implemented a tool semantic search mechanism https://github.com/mcp-use/mcp-use
MCP-Universe: Benchmarking Large Language Models with Real-World Model Context Protocol Servers.
Key findings: “Long-Context Challenge
Token count increases rapidly with interaction steps, often leading to context overflow and degraded performance in multi-step tasks requiring extensive reasoning.”
This proves how MCP tool pre-filtering (prior LLM) is important, and as I was saying, especially manifests in multi-steps.
https://mcp-universe.github.io
Cloudflare Turns MCP Tools into TypeScript APIs
Cloudflare proposes converting MCP tools into TypeScript APIs so that LLMs can generate code using them. They aim to address two key issues: managing many tools and chaining multiple calls efficiently while reducing token usage.
🔧 Improves handling of many complex tools
💡 Enables multi-step automation with fewer tokens
https://blog.cloudflare.com/code-mode/