Skip to main content
Simple test script that connects to the MCP toolbox server
The source’s manual-loading path constructs MCPToolbox without a selector, so its first load_toolset() call fails. In v2.7.4, auth_token_getters and bound_params are also discarded when the loaded core tools are mapped to Agno MCP functions. Apply the correction below before running that path.
agent.py

Run the Example

1

Set up your virtual environment

2

Install dependencies

3

Export your OpenAI API key

4

Clone Agno

Clone the repository and run the remaining commands from its root:
5

Start MCP Toolbox

Start the demo database and toolbox service on port 5001:
6

Correct manual toolset selection

In run_agent_manual_loading, initialize MCPToolbox with toolsets=["hotel-management", "booking-system"]. Remove auth_token_getters and bound_params from both load_toolset() calls because v2.7.4 does not apply them when invoking the returned MCP functions.
7

Run the example

Run the example from the repository root:
Full source: cookbook/91_tools/mcp/mcp_toolbox_demo/agent.py