Cover image
Try Now
2025-04-14

A simple integration of Bright Data MCP with new Agent framework by google

3 years

Works with Finder

0

Github Watches

0

Github Forks

0

Github Stars

Web Search Agent using Google ADK and Bright Data MCP

This repository contains a web search agent built with Google's Agent Development Kit (ADK) and Bright Data's Model Context Protocol (MCP). The agent can search the web and retrieve information based on user queries.

Prerequisites

  • Python 3.12 or later
  • Node.js and npm (for Bright Data MCP)
  • Google Gemini API key
  • Bright Data account with active Web Unblocker API zone (For Browser capabilities, Scraping Browser zone is required as well)

Installation

1. Clone the repository

git clone https://github.com/MeirKaD/MCP_ADK.git
cd MCP_ADK

2. Create and activate a virtual environment

# For macOS/Linux
python -m venv .venv
source .venv/bin/activate

# For Windows
python -m venv .venv
.venv\Scripts\activate

3. Install the required packages

pip install google-adk google-generativeai python-dotenv

4. Install Bright Data MCP package

npm install -g @brightdata/mcp

5. Set up environment variables

Create a .env file in the root directory by copying the .env.template:

cp .env.template .env

Then, edit the .env file and add your Google Gemini API key:

GOOGLE_GENAI_USE_VERTEXAI="False"
GOOGLE_API_KEY="YOUR_GEMINI_API_KEY"

6. Configure Bright Data MCP credentials

Edit the web_search_agent/agent.py file and replace the placeholders with your Bright Data credentials:

"API_TOKEN": "YOUR_BRIGHT_DATA_API_TOKEN",
"WEB_UNLOCKER_ZONE": "unblocker",
"BROWSER_AUTH": "brd-customer-YOUR_CUSTOMER_ID-zone-scraping_browser:YOUR_PASSWORD"

Running the Agent with ADK Web Interface

1. Start the ADK Web Server

adk web

This will start a local web server, typically at http://localhost:8000.

2. Access the Web Interface

Open your browser and navigate to http://localhost:8000 to interact with your agent through the ADK web interface.

How the Agent Works

The agent is built using Google's Agent Development Kit (ADK) and uses Gemini 2.0 Flash as the underlying model. It leverages Bright Data's Model Context Protocol (MCP) to perform web searches and retrieve information from websites.

The agent initializes the MCP toolset asynchronously when the first request is received, connecting to Bright Data's services to enable web search capabilities.

Features

  • Web search using Bright Data MCP
  • Information retrieval from websites
  • Answering questions based on web content
  • Automatic cleanup of resources when the agent terminates

Customization

You can customize the agent's behavior by modifying the web_search_agent/agent.py file:

  • Change the model by updating the model parameter
  • Modify the agent's description and instructions
  • Add additional tools or capabilities

Troubleshooting

If you encounter issues:

  1. Ensure your Google Gemini API key is valid
  2. Check your Bright Data credentials
  3. Verify that Node.js and npm are correctly installed
  4. Make sure you have the correct version of Python and all required packages

License

MIT

Acknowledgements

  • Google Agent Development Kit (ADK)
  • Bright Data MCP

相关推荐

  • av
  • Effortlessly run LLM backends, APIs, frontends, and services with one command.

  • 1Panel-dev
  • 🔥 1Panel provides an intuitive web interface and MCP Server to manage websites, files, containers, databases, and LLMs on a Linux server.

  • WangRongsheng
  • 🧑‍🚀 全世界最好的LLM资料总结(数据处理、模型训练、模型部署、o1 模型、MCP、小语言模型、视觉语言模型) | Summary of the world's best LLM resources.

  • rulego
  • ⛓️RuleGo is a lightweight, high-performance, embedded, next-generation component orchestration rule engine framework for Go.

  • sigoden
  • Easily create LLM tools and agents using plain Bash/JavaScript/Python functions.

  • hkr04
  • Lightweight C++ MCP (Model Context Protocol) SDK

  • RockChinQ
  • 😎简单易用、🧩丰富生态 - 大模型原生即时通信机器人平台 | 适配 QQ / 微信(企业微信、个人微信)/ 飞书 / 钉钉 / Discord / Telegram / Slack 等平台 | 支持 ChatGPT、DeepSeek、Dify、Claude、Gemini、xAI、PPIO、Ollama、LM Studio、阿里云百炼、火山方舟、SiliconFlow、Qwen、Moonshot、ChatGLM、SillyTraven、MCP 等 LLM 的机器人 / Agent | LLM-based instant messaging bots platform, supports Discord, Telegram, WeChat, Lark, DingTalk, QQ, Slack

  • dmayboroda
  • On-premises conversational RAG with configurable containers

  • paulwing
  • A test repository created using MCP service

  • evilsocket
  • The Simple Agent Development Kit.

  • tawago
  • Artifact2MCP Generator allows generation of MCP server automatically & dynamically given smart contract's compiled artifact (chain‑agnostic)

    Reviews

    2.5 (11)
    Avatar
    user_CTYw6DKc
    2025-04-23

    I've been using MCP_ADK developed by MeirKaD for a while now, and it has significantly improved my workflow. The user-friendly interface and efficient functionalities make it a standout tool in the market. The welcome information at the start URL is very helpful for new users. Highly recommend for anyone looking to streamline their applications!

    Avatar
    user_FQPnZAD9
    2025-04-23

    As an avid user of MCP_ADK, I am genuinely impressed with its capabilities. Created by MeirKaD, this application has significantly streamlined my development process. Whether you're a beginner or an expert, MCP_ADK offers a user-friendly interface and powerful tools that cater to all skill levels. Highly recommended for anyone looking to enhance their productivity!

    Avatar
    user_RvtVrCX6
    2025-04-23

    As a dedicated user of MCP_ADK by MeirKaD, I can confidently say it's a game-changer for developers! Its seamless integration and intuitive interface have significantly boosted my productivity. The detailed documentation and responsive support make it an invaluable resource in my toolkit. Highly recommend it to anyone looking to streamline their development process!

    Avatar
    user_ajio3V4L
    2025-04-23

    The MCP_ADK by MeirKaD is an outstanding product that has significantly improved my workflow. It's user-friendly and incredibly efficient. The clear welcome message and easy-to-follow start URL make onboarding a breeze. If you're looking for a top-notch application, MCP_ADK is definitely worth considering. Highly recommended!

    Avatar
    user_R2yTGW3R
    2025-04-23

    As a dedicated user of MCP apps, I found MCP_ADK by MeirKaD to be exceptional. This tool is intuitive and powerful, seamlessly enhancing my workflow. Its well-structured features and ease of use make it a must-have. Highly recommended for anyone looking to streamline their development process!

    Avatar
    user_D6jVtjNQ
    2025-04-23

    MCP_ADK by MeirKaD is an excellent toolkit! It provides an intuitive and efficient way to develop applications with ease. Highly recommend this to anyone looking to speed up their development process and maintain high code quality. A must-have for serious developers!

    Avatar
    user_MTL7fVVZ
    2025-04-23

    The MCP_ADK by MeirKaD is an exceptional tool! As a dedicated MCP application user, I find its features incredibly useful and innovative. It's intuitive, user-friendly, and has significantly enhanced my productivity. Highly recommend this application to anyone looking to streamline their workflow!

    Avatar
    user_q1ajdYeu
    2025-04-23

    MCP_ADK by MeirKaD is a fantastic development kit that offers a comprehensive set of tools for MCP applications. The start URL and welcoming message make initial setup a breeze, and the overall user experience is smooth and intuitive. Highly recommended for developers looking to streamline their workflow!

    Avatar
    user_W8JFgeP1
    2025-04-23

    As a dedicated user of MCP applications, I find MCP_ADK by MeirKaD to be an exceptional tool. It seamlessly integrates with my workflow, offering robust functionalities that make development tasks significantly more manageable. The simplicity and efficiency of this tool are unmatched, and I highly recommend it to anyone looking to optimize their application development process.

    Avatar
    user_mISSHLdP
    2025-04-23

    MCP_ADK by MeirKaD is a fantastic tool for developers. The features are well-integrated, making development processes more efficient and enjoyable. Highly recommend it for anyone looking to streamline their workflow with powerful functionalities.

    Avatar
    user_Y12FLsJ7
    2025-04-23

    As a dedicated user of MCP applications, I must say that MCP_ADK created by MeirKaD has exceeded my expectations. The seamless integration and user-friendly interface make it an essential tool for anyone looking to enhance their productivity. The welcome information is clear and helpful, and the support through the initial setup via the start URL is fantastic. I highly recommend MCP_ADK for its efficiency and reliability.