Metadata-Version: 2.4
Name: tool-to-agent-retrieval-mcp
Version: 0.1.1
Summary: MCP server that selects the best-suited downstream agent for a natural language query, distributed via uvx.
Project-URL: Homepage, https://github.com/GusCayresMindsight/tool-to-agent-retrieval-mcp
Project-URL: Repository, https://github.com/GusCayresMindsight/tool-to-agent-retrieval-mcp
Project-URL: Issues, https://github.com/GusCayresMindsight/tool-to-agent-retrieval-mcp/issues
Author: Gustavo Cayres
License: MIT License
        
        Copyright (c) 2026 Gustavo Cayres
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
License-File: LICENSE
Keywords: agent,llm,mcp,model-context-protocol,retrieval,uvx
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.11
Requires-Dist: mcp>=1.0
Provides-Extra: dev
Requires-Dist: pytest-bdd>=7; extra == 'dev'
Requires-Dist: pytest-cov>=6; extra == 'dev'
Requires-Dist: pytest>=8; extra == 'dev'
Requires-Dist: ruff>=0.15.14; extra == 'dev'
Description-Content-Type: text/markdown

# tool-to-agent-retrieval-mcp

An MCP server that selects the best-suited downstream agent for a natural language query
and forwards a tool call to it. Distributed via `uvx`.

## Usage

Add to Claude Desktop (`claude_desktop_config.json`) or Claude Code (`.claude/settings.json`):

```json
{
  "mcpServers": {
    "tool-to-agent-retrieval-mcp": {
      "command": "uvx",
      "args": ["tool-to-agent-retrieval-mcp"]
    }
  }
}
```

Configure your agent corpus in `.mcp-corpus.json` (or `$MCP_CORPUS_PATH`). The server
exposes three tools: `search_tools`, `get_tool_details`, and `invoke_tool`.

## Algorithm

The retrieval algorithm is based on:

> Lumer, S., et al. (2025). **Tool-to-Agent Retrieval: Bridging Tools and Agents for
> Scalable LLM Multi-Agent Systems**. PricewaterhouseCoopers.
> arXiv:2511.01854v2.

A unified catalog C = CT ∪ CA (tool corpus + agent corpus) is built offline and searched
at query time using Algorithm 1: top-N candidates are ranked by similarity, then
deduplicated to return the top-K unique owner agents.

## Development

```
uv run pytest tests/pytest/
```
