MCPTools functionality to filter tools by toolset or tool name, allowing agents to load only the specific database tools they need.
Prerequisites
You’ll need the following to use MCPToolbox:Quick Start
Get started with MCPToolbox instantly using our fully functional demo.Verification
To verify that your docker/podman setup is working correctly, you can check the database connection:Basic Example
Here’s the simplest way to use MCPToolbox (after running the Quick Start setup):How MCPToolbox Works
MCPToolbox solves the tool overload problem. Without filtering, your agent gets overwhelmed with too many database tools: Without MCPToolbox (50+ tools):- MCP Toolbox Server exposes 50+ database tools
- MCPToolbox connects and loads ALL tools internally
- Filters to only the
hotel-managementtoolset (3 tools) - Agent sees only the 3 relevant tools and stays focused
Advanced Usage
Multiple Toolsets
Load tools from multiple related toolsets:cookbook/14_tools/mcp/mcp_toolbox_for_db.py
Custom Authentication and Parameters
For production scenarios with authentication:Manual Connection Management
For explicit control over connections:Toolkit Params
Only one of
toolsets or tool_name can be specified. The implementation validates this and raises a ValueError if both are provided.Toolkit Functions
Demo Examples
The complete demo includes multiple working patterns:- Basic Agent: Simple hotel assistant with toolset filtering
- AgentOS Integration: Integration with AgentOS control plane
- Workflow Integration: Using MCPToolbox in Agno workflows
- Type-Safe Agent: Implementation with Pydantic models
include_tools or exclude_tools to modify the list of tools the agent has access to. Learn more about selecting tools.