You get four tools rather than the tools of each app. Your agent uses them to reach every app you have connected. See How MewCP works.
Call a tool directly
Code
call_tool = next(t for t in tools if t.name == "call_tool")result = await call_tool.run_async( args={ "app_maskedId": "google-calendar", "tool_name": "list_events", "args": { "calendar_id": "primary", "time_min": "2026-01-15T00:00:00Z", "time_max": "2026-01-16T00:00:00Z", }, }, tool_context=None,)print(result)
If you have connected more than one account for the same app, add "alias": "work" to select one.
Use with an LLM agent
Pass the toolset to an LlmAgent and ADK calls tools automatically based on the model's decisions:
Code
from google.adk.agents import LlmAgentfrom google.adk.tools.mcp_tool import MCPToolsetfrom google.adk.tools.mcp_tool.mcp_session_manager import StreamableHTTPConnectionParamstoolset = MCPToolset( connection_params=StreamableHTTPConnectionParams( url="https://gateway.mewcp.com/personal/mcp", headers={"Authorization": f"Bearer {MEWCP_API_KEY}"}, ))agent = LlmAgent( model="gemini-2.0-flash", name="assistant", instruction="You are a helpful assistant with access to the user's connected apps.", tools=[toolset],)
B2B: per-user credential routing
To route calls for different audience members, connect to your project toolset's URL with the project's API key, and use a header_provider callable instead of static headers: