
mcp use
使用MCP、LangChain和Groq API构建的交互式AI聊天机器人,支持多种服务集成。
Repository Info
About This Server
使用MCP、LangChain和Groq API构建的交互式AI聊天机器人,支持多种服务集成。
Model Context Protocol (MCP) - This server can be integrated with AI applications to provide additional context and capabilities, enabling enhanced AI interactions and functionality.
Documentation
🧠 MCP Interactive Chatbot with LangChain and Groq
This project is an AI-powered interactive chatbot built using the MCP (Model Context Protocol), LangChain, and Groq's fast LLMs. It enables natural language conversations that can also interact with services like browsers, Airbnb listings, and search engines using MCP.
🚀 Features
- ✅ Asynchronous interactive chat interface
- ✅ Memory-enabled conversational agent powered by LangChain
- ✅ Seamless integration with MCP services (Playwright, DuckDuckGo, Airbnb)
- ✅ Super-fast response via Groq API
- ✅ Simple terminal-based experience with memory management (
clear,exit) - ✅ Scalable setup with modular service integration
🧰 Technologies Used
- Python 3.10+
mcp_useLangChainChatGroqfromlangchain_groqasynciofor non-blocking interactions.envfor managing secrets
📁 Project Structure
mcp_demo/ │ ├── app.py # Main chat interface ├── .env # Stores your GROQ API Key ├── browser_mcp.json # MCP services configuration ├── requirements.txt # Project dependencies
🛠️ Installation
- Clone the Repository
git clone https://github.com/your-username/mcp-demo-chatbot
cd mcp_demo
- Install Dependencies
pip install -r requirements.txt
- Add Your GROQ API Key
Create a .env file in the root directory:
GROQ_API_KEY=your_groq_api_key_here
- Set Up MCP Services
Create a file named browser_mcp.json:
{
"mcpServers": {
"playwright": {
"command": "npx",
"args": ["@playwright/mcp@latest"]
},
"airbnb": {
"command": "npx",
"args": ["-y", "@openbnb/mcp-server-airbnb"]
},
"duckduckgo-search": {
"command": "npx",
"args": ["-y", "duckduckgo-mcp-server"]
}
}
}
Make sure Node.js and npx are installed and accessible from your terminal.
▶️ Running the App
python app.py
Then start chatting! For example:
What is the weather in New York?Search for the latest AI newsFind me Airbnb rentals in Bangalore
You can also:
- Type
clearto reset memory - Type
exitto end the session
⚠️ Troubleshooting
-
Takes too long to respond?
- Ensure MCP services aren't hanging.
- Try restarting the MCP subprocesses or simplify your prompt.
- Check internet connection and firewall settings.
-
FileNotFoundError?
- Confirm that
browser_mcp.jsonis in the same directory asapp.py.
- Confirm that
-
Still not working?
- Print debug logs in
app.pyor reinstall dependencies.
- Print debug logs in
🧪 Sample Output
User: What’s the weather in New York?
AI: Based on recent searches via DuckDuckGo, it's currently 15°C and cloudy in New York.
💻 MCP Services You Can Add
You can extend the chatbot with even more services like:
- YouTube Search
- PDF Readers
- Finance APIs
- Calendar APIs
- Or custom tools you write yourself!
Just add them inside browser_mcp.json and make sure they're callable via MCP.
📦 Example requirements.txt
python-dotenv
mcp_use
langchain
langchain_groq
📝 License
MIT License. See the LICENSE file for details.
🙌 Credits
- MCP Protocol
- LangChain
- Groq API
- DuckDuckGo Search MCP
- Playwright MCP
🌐 Author
Vishwas R
Feel free to connect on LinkedIn or explore other projects on GitHub
Let me know if you’d like to turn this into a GitHub Pages landing page or want badges and shield links added at the top!
Quick Start
Clone the repository
git clone https://github.com/vishwaspw/mcp-useInstall dependencies
cd mcp-use
npm installFollow the documentation
Check the repository's README.md file for specific installation and usage instructions.
Repository Details
Recommended MCP Servers
Discord MCP
Enable AI assistants to seamlessly interact with Discord servers, channels, and messages.
Knit MCP
Connect AI agents to 200+ SaaS applications and automate workflows.
Apify MCP Server
Deploy and interact with Apify actors for web scraping and data extraction.
BrowserStack MCP
BrowserStack MCP Server for automated testing across multiple browsers.
Zapier MCP
A Zapier server that provides automation capabilities for various apps.