A comprehensive research agent powered by Bright Data's advanced web scraping and data collection tools. Specializes in SEO research, competitor analysis, e-commerce insights, market trends, keyword research, SERP analysis, product monitoring, price tracking, and content optimization.
- Advanced Web Scraping: Access to Bright Data's premium web scraping infrastructure
- Dual AI Agents: Choose between LangGraph (with memory) or ADK (with extended timeouts)
- Slack Integration: Interactive chat interface with agent selection
- SEO Research: Comprehensive keyword research, SERP analysis, and competitor insights
- E-commerce Intelligence: Product monitoring, price tracking, and market analysis
- Actionable Insights: Structured data extraction and business intelligence
- Framework: LangChain + LangGraph
- Model: OpenAI GPT (configurable)
- Memory: Persistent conversation memory with checkpointer
- Timeout: Standard MCP timeout (5 seconds)
- Best For: Interactive conversations requiring context retention
- Framework: Google's Agent Development Kit (ADK)
- Model: Gemini 2.0 Flash
- Memory: Context-aware (last 5 messages)
- Timeout: Extended timeout (60 seconds) for complex operations
- Best For: Long-running web scraping and data collection tasks
- Bright Data Account: Sign up at brightdata.com
- Bright Data MCP Server: Documentation at github.com/brightdata/brightdata-mcp
- OpenAI API Key: Get from platform.openai.com
- Google AI API Key: Get from makersuite.google.com
- Slack Workspace: Admin access to create Slack apps
-
Clone the repository
git clone https://github.com/hollaugo/tutorials.git cd tutorials/bright-mcp-server-overview -
Install dependencies
pip install -r requirements.txt
-
Set up environment variables
cp .env.example .env # Edit .env with your actual API keys -
Install Bright Data MCP server
npm install -g @brightdata/mcp
- Go to api.slack.com/apps
- Click "Create New App" → "From an app manifest"
- Select your workspace
- Copy and paste the content from
slack_app_manifest.json - Click "Create"
- Go to "OAuth & Permissions" in your app settings
- Add the following Bot Token Scopes:
assistant:write chat:write im:history files:write canvases:write - Click "Install to Workspace"
- Copy the Bot User OAuth Token (starts with
xoxb-)
For local development:
- Go to "Socket Mode" in your app settings
- Enable Socket Mode
- Generate an App-Level Token with
connections:writescope
- Go to "Event Subscriptions"
- Enable Events
- Set Request URL to:
https://your-domain.com/slack/events - Subscribe to these bot events:
assistant_thread_started assistant_thread_context_changed message.im
- Go to "App Settings" → "Agents & AI Apps"
- Enable the feature
- Configure your assistant settings
Update your .env file with the obtained values:
# Bright Data API Configuration
BRIGHTDATA_API_KEY=your_brightdata_api_key_here
# OpenAI Configuration (for LangGraph agent)
OPENAI_API_KEY=your_openai_api_key_here
# Google AI Configuration (for ADK agent)
GOOGLE_API_KEY=your_google_api_key_here
# Slack Bot Configuration
SLACK_BOT_TOKEN=xoxb-your-slack-bot-token-here
SLACK_SIGNING_SECRET=your_slack_signing_secret_here
# Server Configuration
PORT=8010python -m slack_app.slack_clientThe server will start on the configured port (default: 8010).
- Start a conversation with your bot in Slack
- Select an AI agent from the dropdown:
- LangGraph (Current): For conversations requiring memory
- ADK (New): For complex data collection tasks
- Ask your questions: The bot will use Bright Data's tools to research and respond
SEO Research:
- "Analyze the top 10 search results for 'best SEO tools 2024'"
- "What are the trending keywords in the digital marketing space?"
- "Compare the SEO strategies of competitor websites"
E-commerce Intelligence:
- "Track pricing trends for iPhone 15 across major retailers"
- "Analyze product reviews for wireless headphones on Amazon"
- "Monitor competitor inventory levels for gaming laptops"
Market Research:
- "What are the latest trends in sustainable fashion?"
- "Analyze social media sentiment around electric vehicles"
- "Research emerging technologies in the fintech space"
bright-mcp-server-overview/
├── adk_agent/ # Google ADK agent implementation
│ ├── __init__.py
│ ├── agent.py # Main ADK agent with extended timeout
│ └── custom_adk_patches.py # Timeout fixes for MCP connections
├── langgraph_agent/ # LangGraph agent implementation
│ ├── __init__.py
│ └── agent.py # Main LangGraph agent with memory
├── slack_app/ # Slack integration
│ └── slack_client.py # Slack bot server and handlers
├── .env.example # Environment variables template
├── .gitignore # Git ignore rules
├── README.md # This file
├── requirements.txt # Python dependencies
└── slack_app_manifest.json # Slack app configuration
The ADK agent includes custom timeout patches to handle long-running operations:
- Default MCP Timeout: 5 seconds
- ADK Extended Timeout: 60 seconds
- Configurable: Modify
timeoutparameter inadk_agent/agent.py
The LangGraph agent includes persistent memory:
- Storage: In-memory with MemorySaver checkpointer
- Context Length: Automatically trimmed to last 20 messages
- Thread-based: Each Slack thread maintains separate memory
LangGraph Agent:
model = ChatOpenAI(model="o3") # Change model hereADK Agent:
model='gemini-2.0-flash-exp' # Change model here-
MCP Connection Timeout
- Ensure Bright Data API key is valid
- Check network connectivity
- Try the ADK agent for longer operations
-
Slack Events Not Received
- Verify webhook URL is accessible
- Check event subscription configuration
- Ensure bot has required permissions
-
Memory Not Working
- Verify thread_id is being passed correctly
- Check MemorySaver configuration
- Try restarting the server
Enable detailed logging by setting:
import logging
logging.basicConfig(level=logging.DEBUG)- Fork the repository
- Create a feature branch:
git checkout -b feature-name - Commit changes:
git commit -am 'Add feature' - Push to branch:
git push origin feature-name - Submit a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Bright Data Platform: brightdata.com
- Bright Data MCP Server: github.com/brightdata/brightdata-mcp
- LangGraph Documentation: langchain-ai.github.io/langgraph
- Google ADK: developers.google.com/ai/adk
- Slack API: api.slack.com
For issues related to:
- Bright Data MCP Server: Bright Data Support or GitHub Issues
- This Implementation: Create an issue in this repository
- Slack API: Slack API Documentation
Built with ❤️ using Bright Data, LangGraph, Google ADK, and Slack
