> ## Documentation Index
> Fetch the complete documentation index at: https://docs.brightdata.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Google ADK integration

> Connect Google Agent Development Kit (ADK) to the Bright Data MCP server (30 tools) for Gemini-powered agents with web search and structured extraction.

> [card] [Building an AI startup?](https://brightdata.com/ai/ai-startups-program)
>
> You might be eligible for our Startup Program. Get fully funded access to the infrastructure you're reading about right now (up to \$20K value).

## Remote MCP

**1. Get your API token**

1. Go to [Bright Data user settings](https://brightdata.com/cp/setting/users)
2. Copy your API token (it looks like: `2dceb1aa0***************************`)

**2. Install required packages**

```shell theme={null}
pip install google-adk
```

**3. Configure your MCP server**

```python expandable theme={null}
from google.adk.agents import Agent
from google.adk.tools.mcp_tool.mcp_session_manager import StreamableHTTPServerParams
from google.adk.tools.mcp_tool.mcp_toolset import MCPToolset

BRIGHTDATA_API_KEY = "YOUR_API_KEY"

root_agent = Agent(
model="gemini-2.5-pro",
name="brightdata_agent",
instruction="""Help users access web data using Bright Data""",
tools=[
    MCPToolset(
        connection_params=StreamableHTTPServerParams(
            url=f"https://mcp.brightdata.com/mcp?token={BRIGHTDATA_API_KEY}",
        ),
    )
],
)
```

**4. Set up environment variables (optional)**

For better security, you can store your API token as an environment variable:

```python theme={null}
import os
BRIGHTDATA_API_KEY = os.getenv("BRIGHTDATA_API_KEY")
```

Then create a `.env` file in your project directory:

```env theme={null}
BRIGHTDATA_API_KEY=your_brightdata_api_key_here
```

**5. Test it works**

1. Replace `YOUR_API_KEY` with your Bright Data API key
2. Run your Google ADK script
3. You should see the agent execute web searches and provide comprehensive responses

**6. Monitor usage**

1. View your API usage at [My Zones](https://brightdata.com/cp/zones) in your Bright Data dashboard
2. Your free tier includes 5,000 requests per month

## Local MCP Server

**1. Get your API token**

1. Go to [Bright Data user settings](https://brightdata.com/cp/setting/users)
2. Copy your API token (it looks like: `2dceb1aa0***************************`)

**2. Install required packages**

```shell theme={null}
pip install google-genai
npm install -g @brightdata/mcp
```

**3. Configure your local MCP server**

```python expandable theme={null}
from google.adk.agents import Agent
from google.adk.tools.mcp_tool.mcp_session_manager import StdioConnectionParams
from google.adk.tools.mcp_tool.mcp_toolset import MCPToolset
from mcp import StdioServerParameters

BRIGHTDATA_API_KEY = "YOUR_API_KEY"

root_agent = Agent(
model="gemini-2.5-pro",
name="brightdata_agent",
instruction="Help users access web data using Bright Data",
tools=[
    MCPToolset(
        connection_params=StdioConnectionParams(
            server_params = StdioServerParameters(
                command="npx",
                args=[
                    "@brightdata/mcp",
                ],
                env={
                    "API_TOKEN": BRIGHTDATA_API_KEY,
                }
            ),
            timeout=300,
        ),
    )
],
)
```

**4. Test it works**

1. Replace `YOUR_API_KEY` with your Bright Data API key
2. Run your Google ADK script with the local MCP server
3. The agent will use the locally installed MCP server to access all available tools

**5. Monitor usage**

1. View your API usage at [My Zones](https://brightdata.com/cp/zones) in your Bright Data dashboard
2. Your free tier includes 5,000 requests per month

## Available Tools

The Bright Data MCP server provides access to powerful web scraping capabilities:

All 30 tools are enabled by default, including search, scraping, pre-built scrapers and browser automation.

[View complete tool documentation](https://docs.brightdata.com/products/mcp-server/tools.md)

[Visit Google ADK docs ](https://google.github.io/adk-docs/)
