Support Tag-Based Tool Filtering in MCP Server
Is your feature request related to a problem? Please describe. When the MCP server registers a large number of tools, the context size grows significantly, which negatively impacts tool selection efficiency and can lead to token limits being hit. This also makes it harder for clients to navigate and select relevant tools.
Describe the solution you'd like Introduce a decorator-based tagging mechanism that allows tools/functions to be annotated with tags. The list_tools() function can then be made configurable to return tools filtered by these tags. This enables dynamic and contextual tool selection without bloating the context unnecessarily.
Describe alternatives you've considered Currently, the workaround is to spin up multiple MCP servers with different sets of tools. However, this breaks the unified client experience — clients end up choosing servers instead of tools, which adds unnecessary operational complexity and undermines the flexibility of a centralized tool registry.
Additional context Actively working on a prototype implementation for this feature.
we have exactly same requirement
See the Namespaces SEP: https://github.com/modelcontextprotocol/modelcontextprotocol/issues/993
now fastMCP support tags, you can use the Middleware to support tag filter. this is a perfect demo: https://github.com/int0x03/scripts/blob/main/python/mcp/mcp_filter_by_tag.py
WIP SEP here: https://github.com/modelcontextprotocol/modelcontextprotocol/issues/1300
Closed to consolidate discussion on protocol SEPs