Skip to content
Conduit

mcp server

mcp-agent-chatbot

πŸ€– AI Agent Chatbot using MCP Server, LangChain, and Groq β€” Fetches real-time weather & crypto data using Open APIs. Built with Python + Streamlit UI.

Adyl-S/mcp-agent-chatbotcommunitylistedunreviewed

Set up

Runs on your computer. Pick your agent and operating system.

This project does not publish an install method we can turn into a config. Follow the README instead.

README

synced Oct 23, 2026

🧠 AI Chatbot with LangChain + MCP + Groq + Real APIs

This is a full-stack intelligent chatbot application built using:

  • LangChain for agent orchestration,
  • Groq (LLM) for fast reasoning,
  • MCP (Multi Component Protocol) for modular tools,
  • Real Weather and Crypto APIs to provide live data,
  • A Streamlit frontend to chat with the agent interactively.

πŸ” What This Project Does

πŸ€– A chatbot agent that can answer questions like:

  • β€œWhat is the weather in Tokyo?”
  • β€œWhat’s the current price of Bitcoin?”
  • And intelligently decide which tool to call (Weather or Crypto) using reasoning steps.

This is not just a mock. It actually:

  • Fetches live weather data from OpenWeatherMap API.
  • Fetches live crypto data from CoinGecko API via MCP server.

✨ Features

  • βœ… Modular tools via MCP (Multi-Component Protocol)
  • βœ… Fast LLM inference with Groq (llama3-70b-8192)
  • βœ… Custom tool integrations (weather + crypto)
  • βœ… Built from scratch with no prior Python knowledge!
  • βœ… Interactive chatbot frontend (Streamlit)
  • βœ… Loom video ready for demo and LinkedIn showcase

πŸ› οΈ Tech Stack

LayerTools / Services Used
LLMGroq (via langchain_groq)
AgentLangGraph's create_react_agent()
Tool InfraMCP (FastMCP + MultiServerMCPClient)
FrontendStreamlit
APIsOpenWeatherMap, CoinGecko
LanguagePython (even though I was a MERN dev)

🧩 How It Works

πŸ”§ 1. Weather Tool

A simple Python server using MCP and OpenWeatherMap API.

@mcp.tool()
def get_weather(city: str) -> str:
    """Returns the current weather for a given city."""

πŸ”§ 2. Crypto Tool

Runs as an HTTP MCP server and returns current price of Bitcoin using CoinGecko API.

🧠 3. LangChain Agent

  • Agent is created using create_react_agent.
  • Agent can choose between tools (weather, crypto) dynamically.
  • LLM backend: Groq (llama3-70b-8192) for fast reasoning.

πŸš€ Getting Started

1. Clone this Repo

git clone https://github.com/your-username/ai-chatbot-mcp.git
cd ai-chatbot-mcp

2. Install Dependencies

python -m venv .venv
source .venv/bin/activate  # or .venv\Scripts\activate on Windows

pip install -r requirements.txt

Make sure you have:

  • Python 3.10+
  • groq, langchain, streamlit, requests, langchain_groq, langgraph, dotenv, etc.

3. Setup API Keys

Create a .env file in root folder:

GROQ_API_KEY=your_groq_key_here

4. Run Servers

Start the weather tool:

python weatherserver.py

Make sure crypto MCP HTTP server is running separately on port 8000.

5. Run the Streamlit Chat App

streamlit run client.py

πŸ§ͺ Sample Queries

QueryWhat Happens Under the Hood
β€œWhat is the weather in Paris?”Agent routes to Weather Tool
β€œPrice of Bitcoin?”Agent routes to Crypto Tool
β€œCompare weather and bitcoin”Agent calls both and merges result

🌐 Connect With Me

If you liked this project, feel free to:


πŸ“ Credits


πŸ“‚ Project Structure

.
β”œβ”€β”€ weatherserver.py      # MCP stdio tool for weather
β”œβ”€β”€ cryptoserver.py       # MCP HTTP tool for crypto
β”œβ”€β”€ client.py             # LangChain + Groq chatbot with Streamlit
β”œβ”€β”€ .env                  # API keys
β”œβ”€β”€ requirements.txt
└── README.md

πŸ™Œ What I Learned

  • Built my first Python+AI project from scratch
  • Learned about LangChain tools, agents, and reasoning
  • Integrated real-world APIs via MCP
  • Created an actual usable chatbot UI

πŸ’‘ 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!

↑↓ navigate openesc close