Skip to the page
INTEGRATIONS/GOOGLE ADK

Google ADK

An agent built with Google's Agent Development Kit (ADK) can use tradefloor's local MCP server to run simulated markets and evaluate trading strategies. The server has 22 tools. With the session tools a model can trade step by step in a simulated market the server keeps open, and no order reaches a real broker.

Install

pip install "google-adk[mcp]"

Plain google-adk 2.11.0 doesn't install the mcp package, so the imports below fail without the [mcp] extra. The server runs in a separate environment through uvx, which needs uv.

Connect

McpToolset starts the server as a subprocess over stdio. This example lists the tools and calls describe_simulator, with no model and no API key.

import asyncio

from google.adk.tools.mcp_tool import McpToolset
from google.adk.tools.mcp_tool.mcp_session_manager import StdioConnectionParams
from mcp import StdioServerParameters


async def main():
    toolset = McpToolset(
        connection_params=StdioConnectionParams(
            server_params=StdioServerParameters(
                command="uvx",
                args=["--with", "tradefloor[mcp]", "tradefloor", "mcp"],
            ),
            timeout=60,  # the first uvx run downloads tradefloor
        )
    )
    try:
        tools = await toolset.get_tools()
        names = sorted(tool.name for tool in tools)
        print(len(names), "tools:", ", ".join(names[:4]), "...")

        describe = next(tool for tool in tools if tool.name == "describe_simulator")
        result = await describe.run_async(args={}, tool_context=None)
        print("certified preset:", result["structuredContent"]["certified"]["preset"])
    finally:
        await toolset.close()


asyncio.run(main())
22 tools: build_scenario, build_universe, check_envelope, check_job ...
certified preset: pt-v22

ADK 2.11.0 also prints three [EXPERIMENTAL] UserWarnings to stderr.

To give the tools to an agent, pass the toolset in LlmAgent(name=..., model=..., tools=[toolset]). To show the agent only some of the tools, pass tool_filter, a list of tool names, to McpToolset. Running the agent calls the model, so it needs that model's API key.

Tested with

google-adk 2.11.0 with mcp 2.3.0, Python 3.12.14 and uv 0.12.14 on macOS, and tradefloor 0.11.0.