Weather RAG MCP Server
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
Weather RAG MCP Server
An MCP server that gives AI assistants a get_weather tool. It fetches live weather and air-quality data for a location, indexes it into a local vector store, retrieves the relevant context, and hands it to an LLM to produce a clear, hallucination-free weather report.
How it works
Fetch — current weather and air pollution data for a location are pulled from the OpenWeatherMap API.
Document — the raw JSON is turned into a structured, human-readable weather document.
Index — the document is embedded (via a local Hugging Face sentence-transformer model) and stored in a Chroma vector store, replacing any previous entry.
Retrieve — the most relevant chunks are pulled back out via a retriever.
Generate — the retrieved context is passed to a Groq-hosted LLM, which is prompted to report only what's in the context and say so if something is missing.
This round-trip through a vector store is overkill for a single document, but it keeps the project structured as a genuine RAG pipeline that's easy to extend (e.g. multi-location history, forecasts, caching).
Related MCP server: OpenWeather MCP Server
Project structure
.
├── server.py # MCP server entrypoint, exposes the get_weather tool
├── config.py # Loads and validates environment variables
├── services/
│ └── weather_service.py # Orchestrates fetch -> index -> retrieve -> generate
├── rag/
│ ├── embedding.py # HuggingFace sentence-transformer embedding model
│ ├── vector_store.py # Chroma vector store wrapper
│ ├── retriever.py # Retrieves relevant context from the vector store
│ └── llm.py # Groq LLM + prompt for report generation
└── utils/
└── parser.py # Builds the weather document from API responsesPrerequisites
Python 3.10+
A free OpenWeatherMap API key
A free Groq API key
Setup
Clone the repo and install dependencies:
git clone <your-repo-url> cd Weather_Pred_MCP pip install -r requirements.txtCreate your environment file from the template and fill in your keys:
cp .env.example .envVariable
Required
Default
Description
OPENWEATHER_API_KEYYes
—
API key for OpenWeatherMap
GROQ_API_KEYYes
—
API key for Groq
GROQ_MODELNo
openai/gpt-oss-120bGroq model used for report generation
EMBEDDING_MODELNo
sentence-transformers/all-MiniLM-L6-v2Hugging Face embedding model
CHROMA_DB_DIRNo
./chroma_dbDirectory for the local Chroma vector store
Running the server
python server.pyThis starts the MCP server over stdio.
Using it with an MCP client
A sample client config is included at .vscode/mcp.json:
{
"servers": {
"weather-mcp": {
"type": "stdio",
"command": "python",
"args": ["server.py"]
}
}
}Point any MCP-compatible client (VS Code, Claude Desktop, etc.) at this config, then call the get_weather tool with a location name (e.g. "Mumbai") to get a generated weather report.
Tech stack
FastMCP /
mcp— MCP server frameworkLangChain + langchain-groq — LLM orchestration
Chroma — local vector store
Hugging Face sentence-transformers — embeddings
OpenWeatherMap API — weather & air quality data
License
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Current weather and forecast lookup as an agent tool.
The official Model Context Protocol server for Ambee. It gives any MCP-compatible AI assistant — Claude, ChatGPT, Cursor, VS Code, Ollama, and more direct access to live air quality, pollen, and weather data. To get started, including information on signing up and obtaining your Ambee key, check out the Ambee documentation on https://docs.ambeedata.com
Get current weather for any city and create images from your prompts. Streamline planning, reports…
Global weather via Open-Meteo: forecast, historical, marine, air quality, geocoding, elevation.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceProvides real-time weather information and forecasts, connecting AI assistants with live weather data for current conditions and multi-day forecasts for any location worldwide.-
- AlicenseNot gradedqualityDmaintenanceProvides real-time weather data and forecasts for locations worldwide using the OpenWeatherMap API. It enables AI assistants to retrieve current conditions, temperature, and forecasts through a simple tool-based interface.MIT
- FlicenseNot gradedqualityNot gradedmaintenanceProvides real-time weather, forecasts, historical data, and air quality for AI assistants via the Model Context Protocol.-
- FlicenseDqualityDmaintenanceProvides real-time weather information, enabling AI assistants to retrieve current temperature and weather conditions for any location worldwide.1-