How do I verify Montage workspace access with Google GenAI SDK?
The Google GenAI Python SDK documents experimental MCP support by accepting an initialized MCP session as a tool. Its example uses a local stdio server and automatic function calling; it is not a hosted Montage OAuth setup recipe. Use this guide to understand that session bridge and its limits before adapting a separately authorized remote client, rather than assuming a server URL can replace the documented session object.
Using Google GenAI SDK, call only Montage signals_status as the first live operation. Report the actual workspace identity and coverage from the tool response. If authentication, transport, or the tool is unavailable, stop and explain the blocker. Do not start collection, recurring tracking, writes, publishing, messaging, or social actions.Check the experimental feature boundary
Read the SDK's Model Context Protocol support section for the installed google-genai version. Treat the interface as experimental, not a stable cross-version contract. This guide concerns the Python SDK's session integration rather than Google ADK or Gemini CLI. Preserve existing model configuration and do not select a model name merely because an example happens to include it.
Separate the session from model generation
The documented tools=[session] pattern expects an initialized MCP ClientSession. Its sample's stdio_client launches a local weather server; Montage instead requires a separately supported remote Streamable HTTP client targeting https://app.montages.co/mcp. Do not paste the hosted address into StdioServerParameters.command or imply that the GenAI example establishes remote transport and authentication by itself.
Establish remote authorization first
Use the chosen MCP client's own documented OAuth or existing approved credential handling before passing its session onward. The Google SDK does not acquire Montage workspace authorization simply because genai.Client can authenticate model requests. If you cannot supply an authorized remote session, stop at that limitation rather than inventing an OAuth setting in GenerateContentConfig.
Avoid automatic broad tool execution
The experimental example enables automatic function calling through the supplied session. That makes the full catalog's permissions important. Before enabling a generation loop, perform a direct status-only verification through the remote session. Do not assume a natural-language prohibition alone is an enforced tool allowlist or that a visible catalog authorizes the workspace.
Inspect status before handing over the session
Make signals_status the first live Montage operation, validate its arguments from discovery, and inspect the actual workspace response. Only then consider the experimental session bridge under a separately reviewed tool policy. Keep session lifetime and cleanup explicit across asynchronous contexts. This path permits no automatic collection, publication, messaging, or other social action merely because model generation can call MCP tools.
Keep the boundaries clear.
- Built-in Python MCP session support is experimental; the official example is local stdio, not a complete remote OAuth setup.
- Documented setup, not live interoperability certification. A visible tool catalog is not workspace authorization.
- First live operation: read-only signals_status. No automatic collection, recurring tracking, or social actions; broader actions need separate explicit authorization.
Start with a read-only check: ask your agent to report actual source coverage before collecting records or exporting an audience.
Primary references
Documentation reviewed 2026-11-15. Product capabilities, client availability and plans can change. Third-party marks identify their products, not an affiliation.