Skip to the page
INTEGRATIONS/GOOGLE ADK

Google ADK

An agent built with Google's Agent Development Kit (ADK) can use the tradefloor local MCP server to run simulated markets and evaluate trading strategies. The server has 13 tools and places no orders.

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 tradefloor server runs in its own 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())
13 tools: build_scenario, build_universe, check_envelope, check_job ...
certified preset: pt-v20

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]). McpToolset also takes tool_filter, a list of tool names, if the agent should see only some of them. 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.9.1.