
MCP_ADK
Google将Bright Data MCP与新代理框架的简单集成
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:
- Ensure your Google Gemini API key is valid
- Check your Bright Data credentials
- Verify that Node.js and npm are correctly installed
- Make sure you have the correct version of Python and all required packages
License
MIT
Acknowledgements
- Google Agent Development Kit (ADK)
- Bright Data MCP
相关推荐
😎简单易用、🧩丰富生态 -大模型原生即时通信机器人平台| 适配QQ / 微信(企业微信、个人微信) /飞书 /钉钉 / discord / telegram / slack等平台| 支持chatgpt,deepseek,dify,claude,基于LLM的即时消息机器人平台,支持Discord,Telegram,微信,Lark,Dingtalk,QQ,Slack
Reviews

user_CTYw6DKc
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!

user_FQPnZAD9
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!

user_RvtVrCX6
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!

user_ajio3V4L
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!

user_R2yTGW3R
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!

user_D6jVtjNQ
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!

user_MTL7fVVZ
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!

user_q1ajdYeu
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!

user_W8JFgeP1
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.

user_mISSHLdP
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.

user_Y12FLsJ7
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.