{"id":"5d58c636-3ecc-4b9b-badc-0de1a769d7f5","slug":"mcp-agent-chatbot","kind":"mcp","name":"mcp-agent-chatbot","summary":"🤖 AI Agent Chatbot using MCP Server, LangChain, and Groq — Fetches real-time weather & crypto data using Open APIs. Built with Python + Streamlit UI.","owner":"Adyl-S","repoUrl":"https://github.com/Adyl-S/mcp-agent-chatbot","license":"MIT","licenseTier":"permissive","trust":"community","stars":1,"match":null,"fewStars":true,"format":"mcp","createdAt":"2025-07-26T10:48:48.000Z","addedAt":"2026-10-21T15:38:14.404Z","logoUrl":"https://avatars.githubusercontent.com/u/101398677?u=ae13924b18ee804aa14029a63aa226176d864e4c&v=4","linkOnly":false,"collection":null,"skillPath":null,"categories":["data-analytics","utilities","cloud-infra"],"tags":[],"runtime":"binary","local":true,"cloudCapable":false,"cloudCapability":"unknown","cloudReadyOnPlatform":false,"needsApiKey":false,"reviewed":false,"syncedAt":"2026-10-23T14:35:13.651Z","sample":false,"url":"https://conduits.dev/tools/mcp-agent-chatbot","language":"Python","transports":["stdio"],"install":{},"requirements":{"env":[],"upstreamMayCharge":false},"tools":null,"readme":"# 🧠 AI Chatbot with LangChain + MCP + Groq + Real APIs\n\nThis is a full-stack intelligent chatbot application built using:\n- **LangChain** for agent orchestration,\n- **Groq** (LLM) for fast reasoning,\n- **MCP (Multi Component Protocol)** for modular tools,\n- Real **Weather** and **Crypto APIs** to provide live data,\n- A **Streamlit** frontend to chat with the agent interactively.\n\n---\n\n## 🔍 What This Project Does\n\n> 🤖 A chatbot agent that can answer questions like:\n- “What is the weather in Tokyo?”\n- “What’s the current price of Bitcoin?”\n- And intelligently decide which tool to call (Weather or Crypto) using reasoning steps.\n\nThis is **not just a mock**. It actually:\n- Fetches live **weather data** from OpenWeatherMap API.\n- Fetches live **crypto data** from CoinGecko API via MCP server.\n\n---\n\n## ✨ Features\n\n- ✅ Modular tools via MCP (Multi-Component Protocol)\n- ✅ Fast LLM inference with Groq (`llama3-70b-8192`)\n- ✅ Custom tool integrations (weather + crypto)\n- ✅ Built from scratch with no prior Python knowledge!\n- ✅ Interactive chatbot frontend (Streamlit)\n- ✅ Loom video ready for demo and LinkedIn showcase\n\n---\n\n## 🛠️ Tech Stack\n\n| Layer         | Tools / Services Used                |\n|--------------|---------------------------------------|\n| LLM          | Groq (via `langchain_groq`)           |\n| Agent        | LangGraph's `create_react_agent()`    |\n| Tool Infra   | MCP (FastMCP + MultiServerMCPClient)  |\n| Frontend     | Streamlit                             |\n| APIs         | OpenWeatherMap, CoinGecko             |\n| Language     | Python (even though I was a MERN dev) |\n\n---\n\n## 🧩 How It Works\n\n### 🔧 1. Weather Tool\n\nA simple Python server using MCP and OpenWeatherMap API.\n\n```python\n@mcp.tool()\ndef get_weather(city: str) -> str:\n    \"\"\"Returns the current weather for a given city.\"\"\"\n````\n\n### 🔧 2. Crypto Tool\n\nRuns as an HTTP MCP server and returns current price of Bitcoin using CoinGecko API.\n\n### 🧠 3. LangChain Agent\n\n* Agent is created using `create_react_agent`.\n* Agent can choose between tools (`weather`, `crypto`) dynamically.\n* LLM backend: **Groq (llama3-70b-8192)** for fast reasoning.\n\n---\n\n## 🚀 Getting Started\n\n### 1. Clone this Repo\n\n```bash\ngit clone https://github.com/your-username/ai-chatbot-mcp.git\ncd ai-chatbot-mcp\n```\n\n### 2. Install Dependencies\n\n```bash\npython -m venv .venv\nsource .venv/bin/activate  # or .venv\\Scripts\\activate on Windows\n\npip install -r requirements.txt\n```\n\nMake sure you have:\n\n* Python 3.10+\n* `groq`, `langchain`, `streamlit`, `requests`, `langchain_groq`, `langgraph`, `dotenv`, etc.\n\n### 3. Setup API Keys\n\nCreate a `.env` file in root folder:\n\n```\nGROQ_API_KEY=your_groq_key_here\n```\n\n### 4. Run Servers\n\nStart the weather tool:\n\n```bash\npython weatherserver.py\n```\n\nMake sure crypto MCP HTTP server is running separately on port `8000`.\n\n### 5. Run the Streamlit Chat App\n\n```bash\nstreamlit run client.py\n```\n\n---\n\n## 🧪 Sample Queries\n\n| Query                           | What Happens Under the Hood        |\n| ------------------------------- | ---------------------------------- |\n| “What is the weather in Paris?” | Agent routes to Weather Tool       |\n| “Price of Bitcoin?”             | Agent routes to Crypto Tool        |\n| “Compare weather and bitcoin”   | Agent calls both and merges result |\n\n---\n\n## 🌐 Connect With Me\n\nIf you liked this project, feel free to:\n\n* ⭐ Star this repo\n* 🧵 Follow me on [Twitter / X](https://x.com/AIwithAdil)\n* 💼 Connect on [LinkedIn](https://www.linkedin.com/in/mohammad-adil-sheikh-a66855171/)\n* 📹 Watch the [Demo on YouTube](https://www.youtube.com/@AI-withAdil)\n\n---\n\n## 📝 Credits\n\n* [Krishnaik’s original MCP tutorial](https://github.com/krishnaik06/MCPSERVERLangchain) – inspired the base setup.\n* MCP, LangChain, LangGraph, Groq, OpenAI, and the OSS ecosystem.\n\n---\n\n## 📂 Project Structure\n\n```\n.\n├── weatherserver.py      # MCP stdio tool for weather\n├── cryptoserver.py       # MCP HTTP tool for crypto\n├── client.py             # LangChain + Groq chatbot with Streamlit\n├── .env                  # API keys\n├── requirements.txt\n└── README.md\n```\n\n---\n\n## 🙌 What I Learned\n\n* Built my **first Python+AI project** from scratch\n* Learned about **LangChain tools, agents, and reasoning**\n* Integrated **real-world APIs** via MCP\n* Created an actual usable **chatbot UI**\n\n---\n\n> 💡 Even though I was a MERN developer with no Python or LangChain background, I successfully built this project by breaking down the steps, understanding each block, and putting it all together. You can too!"}