Skip to main content
MCPToolbox enables Agents to connect to Google’s MCP Toolbox for Databases with advanced filtering capabilities. It extends Agno’s 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:
Our default setup will also require you to have Docker or Podman installed, to run the MCP Toolbox server and database for the examples.

Quick Start

Get started with MCPToolbox instantly using our fully functional demo.
This starts a PostgreSQL database with sample hotel data and an MCP Toolbox server that exposes database operations as filtered tools.

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):
With MCPToolbox (3 relevant tools):
The flow:
  1. MCP Toolbox Server exposes 50+ database tools
  2. MCPToolbox connects and loads ALL tools internally
  3. Filters to only the hotel-management toolset (3 tools)
  4. 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: You can use include_tools or exclude_tools to modify the list of tools the agent has access to. Learn more about selecting tools.

Developer Resources

For more information about MCP Toolbox for Databases, visit the official documentation.