How do I verify Montage workspace access with Microsoft Agent Framework?
Microsoft Agent Framework can wrap remote MCP tools for a Python agent using MCPStreamableHTTPTool. Its documentation also covers .NET and Go with different client ownership rules, so this guide stays on the Python path. The useful boundary is application-owned identity: connection-time discovery and later generated tool calls must share the intended principal rather than deriving credentials from model-provided arguments.
Using Microsoft Agent Framework, 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.Select the Python remote tool path
Check your installed Agent Framework and MCP package versions against the Python section of the official guide. Construct MCPStreamableHTTPTool for https://app.montages.co/mcp rather than copying the local MCPStdioTool calculator example. This guide does not install packages or create model credentials. Keep any chosen model backend separate from the authorization used to reach Montage's own workspace tools.
Decide who owns the connection
Passing url creates a framework-owned client that the framework enters, reconnects, and closes. Supplying an already entered mcp_client leaves lifetime management with your application; do not combine that client with URL or transport options that imply framework ownership. Keep the connection alive throughout discovery and execution, then close it predictably. Shared client lifetime must not accidentally become shared user identity.
Bind credentials outside model arguments
The documented static_headers and header_provider paths support authenticated HTTP requests. Supply only an existing approved credential or an implemented compatible OAuth flow; a URL is not a login. Resolve per-user credentials from trusted application context, not model-supplied tool arguments. The page's authentication examples do not mean an arbitrary Azure credential automatically authorizes Montage or that this guide has completed consent.
Set an explicit narrow approval policy
Use allowed_tools to expose only the discovered status name initially. If configuring approval_mode, specify a conservative default as well as any named exceptions; the documentation warns that unmatched tools can otherwise avoid approval. Inspect the catalog without treating it as workspace authorization. Keep discovery bounds and request timeouts finite rather than making a potentially large external catalog unbounded for convenience.
Verify status before the agent loop expands
Make the first live Montage call signals_status and inspect its workspace result before adding broader tool access to an agent run. Preserve transport and authorization errors instead of converting them into an empty successful answer. Dispose of the verification connection when finished. Later collection and social actions need separate human authorization; no model-provider login or successful catalog discovery grants those permissions implicitly.
Keep the boundaries clear.
- This path uses Python MCPStreamableHTTPTool; .NET and Go have separate transport and lifecycle APIs.
- 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.