#7
3 months ago
🦄 12-factor agents: selecting from thousands of MCP tools
MCP is only as great as your ability to pick the right tools. We'll dive into showing how to leverage MCP servers and accurately use the right ones when only a few have actually relevant tools.
Project Details
Open in GitHub🦄 12-factor agents: selecting from thousands of MCP tools
MCP is only as great as your ability to pick the right tools. We'll dive into showing how to leverage MCP servers and accurately use the right ones when only a few have actually relevant tools.
Overview
This session explores how to efficiently select and use the right tools from thousands of available MCP (Model Context Protocol) tools. We'll cover strategies for tool discovery, selection, and integration in production AI agents.
Key Topics
- MCP server architecture and tool discovery
- Strategies for tool selection from large tool sets
- Building efficient tool routing systems
- Managing tool dependencies and conflicts
- Performance considerations with many tools
Running this code
Installing dependencies
# Install dependencies
uv sync
Generate BAML code
# Convert BAML files -> Python
uv run baml-cli generate
Run the code
# Run the tool selection system
python tools.py
Key Files
tools.json
- Contains metadata for 10,674 tools from 1,285 MCP serverstools.py
- Main tool selection and routing logicparse_json_schema.py
- Utilities for parsing tool schemasbaml_src/
- BAML configuration for LLM interactions
Resources
- Session Recording
- MCP Protocol Documentation
- Discord Community
- Sign up for the next session on Luma