weather-mcp
🌦️ Asistente Meteorológico MCP RAG
Un asistente meteorológico impulsado por IA, construido con Model Context Protocol (MCP), Retrieval-Augmented Generation (RAG), LangChain, ChromaDB, Groq LLM y OpenWeather API.
El proyecto expone una herramienta MCP personalizada que recupera datos meteorológicos en tiempo real y los combina con un pipeline RAG para generar información meteorológica contextual y en lenguaje natural.
🚀 Características Principales
Servidor MCP personalizado construido con FastMCP
Recuperación meteorológica en tiempo real mediante OpenWeather API
Pipeline de Retrieval-Augmented Generation (RAG) para respuestas contextuales
Almacén vectorial ChromaDB para almacenar y recuperar contexto meteorológico
Incrustaciones (embeddings) de Sentence Transformer usando
all-MiniLM-L6-v2Integración de LLM alojado en Groq a través de LangChain
Integración de herramientas MCP con VS Code / GitHub Copilot
Soporta consultas meteorológicas dinámicas para diferentes ciudades
Gestión segura de claves API mediante variables de entorno
Related MCP server: Weather MCP Server
🧠 Cómo Funciona
User Query
↓
GitHub Copilot / MCP Client
↓
Weather MCP Server
↓
get_weather(location)
↓
OpenWeather API
↓
Weather Data Processing
↓
ChromaDB Vector Store
↓
RAG Retrieval
↓
Groq LLM
↓
Context-Aware Weather Response🛠️ Stack Tecnológico
Lenguaje: Python
IA / GenAI: LLMs, RAG, Prompt Engineering, Sentence Transformers
Frameworks: LangChain, FastMCP
Base de Datos Vectorial: ChromaDB
Proveedor de LLM: Groq
API Externa: OpenWeather API
Protocolo: Model Context Protocol (MCP)
Entorno de Desarrollo: VS Code, Git, GitHub
📂 Estructura del Proyecto
Weather-MCP-RAG-Assistant/
│
├── rag/
│ ├── embedding.py
│ ├── llm.py
│ ├── retriever.py
│ └── vector_store.py
│
├── services/
│ └── weather_service.py
│
├── utils/
│ └── parser.py
│
├── config.py
├── server.py
├── requirements.txt
├── env.example
├── .gitignore
└── README.md⚙️ Configuración
1. Clonar el repositorio
git clone https://github.com/rudraniai/Weather-MCP-RAG-Assistant.git
cd Weather-MCP-RAG-Assistant2. Crear un entorno virtual
python -m venv .venvActívalo en Windows:
.venv\Scripts\activate3. Instalar dependencias
pip install -r requirements.txt4. Configurar variables de entorno
Copia el archivo de entorno de ejemplo:
copy env.example .envAñade tus credenciales a .env:
OPENWEATHER_API_KEY=your_openweather_api_key
GROQ_API_KEY=your_groq_api_key
GROQ_MODEL=your_groq_model
EMBEDDING_MODEL=sentence-transformers/all-MiniLM-L6-v2
CHROMA_DB_DIR=./chroma_dbLas credenciales de API se mantienen fuera del control de versiones usando
.gitignore.
5. Ejecutar el servidor MCP
python server.py🔌 Configuración de MCP
Configura el servidor MCP local en VS Code usando:
{
"servers": {
"weather-mcp": {
"type": "stdio",
"command": "python",
"args": [
"PATH_TO_PROJECT/server.py"
]
}
},
"inputs": []
}Reemplaza PATH_TO_PROJECT con la ruta local a server.py.
Después de la configuración:
Abre la Paleta de Comandos de VS Code.
Selecciona
MCP: List Servers.Selecciona
weather-mcp.Inicia el servidor MCP.
Abre GitHub Copilot Chat y permite la herramienta MCP cuando se solicite.
🎥 Demo del Proyecto
La siguiente demo muestra la herramienta MCP personalizada weather-mcp siendo invocada a través de GitHub Copilot para recuperar y generar información meteorológica contextual.

💬 Ejemplo de Uso
Pregúntale a Copilot:
Use the weather-mcp MCP tool to get the weather in Pune.Otros ejemplos:
Use the weather-mcp MCP tool to get the weather in Mumbai.
Use the weather-mcp MCP tool to get the weather in Nagpur.La información de ejemplo devuelta por el asistente incluye:
Temperatura actual
Temperatura de sensación térmica
Humedad
Velocidad y dirección del viento
Condiciones de nubosidad
Resumen meteorológico
Información sobre calidad del aire cuando está disponible
🔐 Seguridad
Las credenciales sensibles, como las claves API, se almacenan en un archivo local .env.
Los siguientes archivos/directorios están excluidos de Git:
.env
chroma_db/
__pycache__/
.vscode/Nunca subas claves API reales al repositorio.
📌 Lo Que Aprendí
A través de este proyecto, adquirí experiencia práctica en:
Construir y exponer herramientas mediante Model Context Protocol (MCP)
Integrar APIs externas con aplicaciones basadas en LLM
Implementar un pipeline RAG
Trabajar con incrustaciones (embeddings) y bases de datos vectoriales
Usar ChromaDB para recuperación contextual
Conectar LangChain con un LLM alojado
Integrar un servidor MCP personalizado con GitHub Copilot
Gestionar variables de entorno y credenciales API de forma segura
🔮 Mejoras Futuras
Añadir pronóstico meteorológico de varios días
Añadir alertas meteorológicas y recomendaciones
Mejorar la recuperación y la memoria contextual
Añadir fuentes adicionales de datos meteorológicos y ambientales
Construir una interfaz web independiente usando Streamlit o FastAPI
Contenerizar la aplicación usando Docker
👩💻 Autora
Rudrani Gulhane
B.Tech Ingeniería en Ciencias de la Computación — Inteligencia Artificial y Aprendizaje Automático
Interesada en IA/ML, IA Generativa, RAG, LLMs, Agentes de IA y aplicaciones basadas en MCP.
📄 Licencia
Este proyecto está destinado a fines educativos, de portafolio y experimentales.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseBqualityDmaintenanceEnables AI agents to fetch real-time weather data for any location using the OpenWeatherMap API. Demonstrates how to build a simple MCP server that exposes weather information as a tool for LLMs.1GPL 3.0
- FlicenseNot gradedqualityDmaintenanceProvides real-time weather updates and city geocoding by integrating the Nominatim and Open-Meteo APIs. It enables users to retrieve current weather conditions for any location through natural language queries in MCP-compatible clients.15
- AlicenseNot gradedqualityDmaintenanceProvides weather data from OpenWeatherMap API through MCP tools and a REST API with OpenAPI support. Enables LLM agents to retrieve current weather, forecasts, and temperature ranges by city or coordinates.21MIT
- FlicenseNot gradedqualityDmaintenanceEnables AI agents like GitHub Copilot to retrieve real-time weather data for any city using the Open-Meteo API, no API key required.9
Related MCP Connectors
OpenWeather MCP — wraps the OpenWeatherMap API (openweathermap.org)
Open-Meteo MCP — weather forecast + historical reanalysis + sister APIs
WeatherAPI.com MCP — wraps WeatherAPI.com (api.weatherapi.com)
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/rudraniai/Weather-MCP-RAG-Assistant'
If you have feedback or need assistance with the MCP directory API, please join our Discord server