An intelligent chatbot for automating tasks like browser control, web searches, and travel planning.
MCP Chatbot - Intelligent automation through Model Context Protocol integration. Features browser automation, web search, and travel planning with robust error handling. Uses Google Gemini LLM and gracefully handles server failures for reliable operation.
GitHub Repository: https://github.com/naakaarafr/MCP-Chatbot
A powerful chatbot built with Model Context Protocol (MCP) that provides intelligent automation through browser control, web search, and travel planning capabilities.
This chatbot leverages the Model Context Protocol to integrate multiple specialized servers, creating a unified interface for web automation, search, and travel-related tasks. It uses Google's Gemini model as the underlying LLM and can gracefully handle server failures by testing each MCP server individually.
# Python dependencies
pip install asyncio python-dotenv langchain-google-genai mcp-use
# Node.js MCP servers
npm install -g @playwright/mcp
npm install -g @openbnb/mcp-server-airbnb
# Python MCP servers
uvx install duckduckgo-mcp-server
Clone or download the project files:
# Ensure you have both app.py and browser_mcp.json
Install Python dependencies:
pip install -r requirements.txt
Or install individually:
pip install asyncio python-dotenv langchain-google-genai mcp-use
Install MCP servers:
# Playwright for browser automation
npm install -g @playwright/mcp
# Airbnb for travel search
npm install -g @openbnb/mcp-server-airbnb
# DuckDuckGo for web search
uvx install duckduckgo-mcp-server
Set up environment variables:
Create a .env
file in the project root:
GOOGLE_API_KEY=your_google_api_key_here
Configure MCP servers:
The browser_mcp.json
file is already configured with default settings. Modify if needed:
{
"mcpServers": {
"playwright": {
"command": "npx",
"args": ["@playwright/mcp@latest"]
},
"airbnb": {
"command": "npx",
"args": ["-y", "@openbnb/mcp-server-airbnb"]
},
"ddg-search": {
"command": "uvx",
"args": ["duckduckgo-mcp-server"]
}
}
}
python app.py
help
- Show available commands and example queriestools
- List all available MCP toolsquit
or exit
- End the conversation"Take a screenshot of google.com"
"Navigate to wikipedia.org and search for Python"
"Click the login button on the website"
"What's the weather like today?"
"Search for the latest news about AI"
"Find information about renewable energy"
"Find hotels in New York City"
"Search for Airbnb rentals in San Francisco"
"What are the best accommodations in Tokyo?"
"Find the best restaurants in downtown Chicago"
"Help me research Python programming tutorials"
"Take a screenshot of the current stock market trends"
MCPChatbot Class: Main chatbot orchestrator
Server Testing: Individual server validation
Agent Integration: LangChain + MCP integration
The chatbot implements robust error handling:
Edit browser_mcp.json
to add or modify MCP servers:
{
"mcpServers": {
"your-server-name": {
"command": "command-to-run",
"args": ["arg1", "arg2"]
}
}
}
Required in .env
file:
GOOGLE_API_KEY
: Your Google AI API key for Gemini accessModify in app.py
if needed:
self.llm = ChatGoogleGenerativeAI(
model="gemini-2.0-flash-exp", # Model selection
temperature=0.3 # Creativity level
)
"browser_mcp.json not found"
app.py
"No MCP servers are working"
Google API Key Issues
.env
file contains a valid GOOGLE_API_KEY
Installation Issues
pip install uv
The chatbot provides detailed startup information:
This project is licensed under the MIT License - see the LICENSE file for details.
Please check individual MCP server licenses for their respective terms.
For issues related to:
A powerful, Go-based task management server with MCP support, AI editor integration, and a VS Code extension. It supports smart task creation, markdown, and project organization.
Access your WeChat Reading (微信读书) bookshelf, notes, highlights, and reviews.
Provides tech radar recommendations, customer management, product catalog, and invoicing functionality using external JSON data files.
An MCP server that enables LLMs to create or update Notion pages and generate Markdown Books (mdbooks).
Access and manage your VISO TRUST third-party risk program directly through your AI assistant.
Captures screenshots and performs OCR text recognition.
An MCP server that analyzes the screen with OmniParser to automate GUI operations.
A Model Context Protocol server for integrating HackMD's note-taking platform with AI assistants.
Interact with the Folderr API to manage and communicate with Folderr Assistants.
Interact with Fider, an open-source customer feedback tool, to manage user suggestions and feedback.