McpToolset, and send its runs to Atlan Trident. ADK emits its own OpenTelemetry spans, so tracing needs no instrumentor. Use this guide when your Python agent runs on Google ADK; the JavaScript @google/adk is not covered.
Preview. This guide uses the Python ADK connection classes documented for remote MCP servers.
Before you begin
Before you start, make sure you have:- Project: a Python agent project using a current Google ADK release.
- Dependencies: framework and MCP dependencies resolved in a committed lockfile.
- MCP connection: the Atlan MCP endpoint in full mode,
https://api.atlan.com/mcp?tools=full, so the framework lists each Atlan tool by name and you can give the agent a narrow set; OAuth support in the runtime; and workspace access to the tools the agent should use. - Tracing:
atlanai[tracing]0.3.4 or later, withATLAN_API_KEY,ATLAN_WORKSPACE_ID, andATLAN_BASE_URLset. See Install atlanai SDK. - Credential: the agent’s own API key from Settings > Identity on its profile. Runs sent with a personal key are filed under that person and do not appear on the agent’s Usage tab.
Connect Atlan MCP tools
1
Configure McpToolset
Configure
McpToolset with Streamable HTTP connection parameters for the Atlan MCP endpoint, and configure the runtime’s OAuth sign-in flow for the connection. Keep credentials out of source code and endpoint URLs.2
Add toolset to agent
Add the toolset to the agent that needs Atlan tools.
McpToolset initializes the connection, lists tools, and converts them into tools the agent can use.3
Verify tools
Start the agent in your normal ADK development environment. Ask it to perform a read-only registry lookup and confirm the selected Atlan tool appears in the run events without an authentication failure.
Trace runs
ADK emits its own OpenTelemetry spans; atlanai SDK exports them without an extra instrumentor. For version compatibility, see Framework integration limitations.1
Initialize tracing
Initialize the logger before the runner starts. Set
lookup_order stands for any tool function.project_name to the name the agent is registered under; it becomes the trace’s service name. init_logger exports every OpenTelemetry span by default, including ADK’s root invocation span, which carries no attributes. With init() or init_logger(capture_all=False), that span and the agent_run spans of ADK releases before 1.16 are missing from the run. Because init_logger also exports HTTP and database spans on the same provider, review Instrument Python providers and apply Control trace privacy before production runs.2
Control captured content
ADK records prompts and responses by default. From ADK 1.17, set
ADK_CAPTURE_MESSAGE_CONTENT_IN_SPANS to false or 0 to leave them out; no other value turns capture off. In ADK 2.x, a telemetry setting on RunConfig overrides the environment variable.3
Verify trace
Run one request with synthetic input, then call
logger.flush(). Open the agent in Atlan Trident, select Usage, select the run in Recent runs, and select Full trace. Confirm the invocation root, the agent step, one model call with its prompt, response, and token usage, and each tool call with its arguments and result.If the run is missing, check that it was sent with the agent’s own API key. If no traces arrive at all, see init() disables tracing and no traces are exported.Troubleshooting
For tracing that does not start or runs that do not arrive, see Install and setup errors. For MCP connection and sign-in failures, see the Google ADK MCP guide in See also.Next steps
- Control trace privacy: mask or suppress content before you trace production runs.
See also
- Google ADK MCP guide: Official ADK docs for remote MCP server connections.
- Framework integration limitations: Known constraints and version compatibility for the ADK integration.
- Traced spans by framework: Span names ADK emits and how they appear in the trace timeline.
- Framework coverage: Which frameworks are supported and what is in Preview.