Groq_weather_mcp_server

GauravPatil8/Groq_weather_mcp_server

3.2

If you are the rightful owner of Groq_weather_mcp_server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to dayong@mcphub.com.

The MCP Weather Temperature Server is a Python-based server that provides real-time weather data using natural language queries.

🌤️ MCP Weather Temperature Server

This is a simple MCP (Model Context Protocol) server built using Python, Langchain, LangGraph, and uv that provides real-time weather temperature data using:

  • GROQ API (for LLM-based query understanding)
  • WeatherAPI (for real-time weather data)

🚀 Features

  • Natural language queries like "What's the weather in Tokyo?"
  • GROQ LLM parses the query
  • WeatherAPI fetches the real-time data
  • MCP handles structured agentic interaction

🛠️ Tech Stack

  • Python
  • uv (MCP server runner)
  • langchain
  • langgraph
  • dotenv
  • GROQ API
  • WeatherAPI

🧪 Setup Instructions

  1. Clone this repository
git clone https://github.com/yourusername/mcp-weather-server.git
cd mcp-weather-server
  1. Create a virtual environment (optional but recommended)
uv venv
source .venv/bin/activate  # or `.venv\Scripts\activate` on Windows
  1. Install dependencies
uv pip install -r requirements.txt
  1. Create a .env file in the root folder and add your API keys
GROQ_API_KEY=your_groq_api_key_here
WEATHER_API_KEY=your_weatherapi_key_here
  1. Run the Weather server
python weather_server.py
  1. Run the main file
python main.py

📌 Notes

  • Make sure your .env is correctly configured.
  • The server won't start if the environment variables are missing or invalid.
  • MCP-based servers are great for AI-native workflows. Feel free to extend this with LangGraph nodes for more complex weather workflows (e.g., 7-day forecast, alerts, etc).