Context
ADK's MCP integration via McpToolset works great with local servers. For production agents, connecting to remote HTTP MCP servers that provide real-world data (stock prices, weather, flights, job listings) is a common need but lacks an official example.
Proposed Example
An agent that queries real-world APIs through a remote MCP server:
from google.adk.agents import Agent
from google.adk.tools.mcp_tool import McpToolset, StreamableHTTPConnectionParams
# Connect to remote MCP server with 409 real-world API tools
toolset = McpToolset(
connection_params=StreamableHTTPConnectionParams(
url="https://apibase.pro/mcp"
)
)
tools, exit_stack = await toolset.create_tools()
agent = Agent(
model="gemini-2.0-flash",
name="data-agent",
instruction="You have access to real-world API tools for stocks, weather, flights, and more.",
tools=tools,
)
# Agent calls the right tool based on the question
response = await agent.run("What is the current weather in Tokyo?")
What this demonstrates
StreamableHTTPConnectionParams with a production remote endpoint
- Real-world data retrieval (not toy math/echo examples)
- Agent tool selection — 409 tools, agent picks the relevant one
- No local server setup required — works out of the box
Happy to contribute a PR with the full example if there's interest.
Context
ADK's MCP integration via
McpToolsetworks great with local servers. For production agents, connecting to remote HTTP MCP servers that provide real-world data (stock prices, weather, flights, job listings) is a common need but lacks an official example.Proposed Example
An agent that queries real-world APIs through a remote MCP server:
What this demonstrates
StreamableHTTPConnectionParamswith a production remote endpointHappy to contribute a PR with the full example if there's interest.