Agents

Google ADK

Connect a Google ADK agent to your gateway.

Google ADK loads MCP tools through McpToolset. Point it at your gateway over Streamable HTTP.

Copy the gateway URL, create a Gateway API Key in MCP Gateways, and export both values:

export CODEINTEGRITY_MCP_URL='https://your-host/mcp/{slug}'
export CODEINTEGRITY_API_KEY='ci_mcp_...'
pip install google-adk
import os

from google.adk.agents import Agent
from google.adk.tools.mcp_tool import McpToolset, StreamableHTTPConnectionParams

root_agent = Agent(
    model="gemini-flash-latest",
    name="assistant",
    tools=[
        McpToolset(
            connection_params=StreamableHTTPConnectionParams(
                url=os.environ["CODEINTEGRITY_MCP_URL"],
                headers={
                    "Authorization": f"Bearer {os.environ['CODEINTEGRITY_API_KEY']}"
                },
            )
        )
    ],
)

The gateway exposes search, execute_code, and authorize. Programmatic agents normally authenticate with the Gateway API Key above.