weather-mcp
🌤️ Weather MCP Server & Chatbot Interface for Cursor
Un proyecto de Python simple y completo que implementa un servidor meteorológico del Model Context Protocol (MCP) listo para Cursor IDE, junto con una interfaz web de chatbot para probar y conversar con el agente meteorológico.
🌟 Características
🌐 Servidor MCP (
weather_mcp_server.py): Construido con FastMCP sobre el transporte stdio. Expone herramientas meteorológicas a Cursor y a otros clientes MCP.⚡ Clima gratuito en tiempo real (
weather_service.py): Con la tecnología de Open-Meteo. No se requieren claves de API. Funciona para cualquier ciudad del mundo.🤖 Agente meteorológico (
agent.py): Convierte consultas en lenguaje natural (por ejemplo, "Clima en Tokio", "Previsión de 5 días para Londres", "Calidad del aire en París") en invocaciones de herramientas.💻 Interfaz de chatbot moderna (
static/yapp.py): Interfaz web con modo oscuro y estilo glassmorphism, tarjetas meteorológicas, tablas de previsión e insignias de ejecución de herramientas.🔌 Integración con Cursor (
.cursor/mcp.json): JSON preconfigurado para la configuración de Cursor.
Related MCP server: bridgemcp-server-weather
📁 Estructura del proyecto
weather-mcp-chatbot/
│── .cursor/
│ └── mcp.json # Cursor MCP configuration
│── weather_service.py # Free Open-Meteo weather & geocoding integration
│── weather_mcp_server.py # MCP Server (stdio transport for Cursor)
│── agent.py # Weather agent NLP & tool caller
│── app.py # FastAPI web server & chat endpoint
│── static/
│ ├── index.html # Chatbot UI
│ ├── style.css # Modern dark-mode styling
│ └── app.js # Chatbot frontend logic
│── test_mcp.py # Automated test suite
│── requirements.txt # Python dependencies
└── README.md # Documentation & quickstart🚀 Inicio rápido
1. Instalar dependencias
pip install -r requirements.txt2. Ejecutar la interfaz web del chatbot
python app.pyAbre tu navegador y navega hasta: http://127.0.0.1:8000
3. Ejecutar las pruebas automatizadas
python test_mcp.py🔌 Cómo conectar con Cursor
Cursor puede conectarse directamente a tu servidor MCP de Python para ofrecer datos meteorológicos en tiempo real dentro de Cursor Chat / Composer.
Opción A: Usar .cursor/mcp.json (recomendada)
Abre este directorio del proyecto en Cursor:
File -> Open Folder -> weather-mcp-chatbotEl archivo
.cursor/mcp.jsondentro del proyecto se detecta automáticamente en Cursor.
Opción B: Añadir en la configuración de Cursor
En Cursor, abre Configuración (
Ctrl + ,oCmd + ,).Ve a Funciones → Servidores MCP.
Haz clic en Añadir nuevo servidor MCP:
Nombre:
weatherTipo:
command(stdio)Comando:
python C:\Users\admin\.gemini\antigravity\scratch\weather-mcp-chatbot\weather_mcp_server.py
Haz clic en Guardar y verifica el indicador de estado verde.
Uso en Cursor Chat:
En Cursor Composer o en el chat de Cursor, ahora puedes preguntar:
"¿Cuál es el clima actual en Tokio?"
"Consulta la previsión de 5 días para Berlín usando @weather"
"¿Cuál es la calidad del aire en París?"
Cursor llamará a las herramientas MCP (get_current_weather, get_weather_forecast, get_aire_quality)) para obtener los datos en vivo.
🛠️ Herramientas MCP disponibles
Nombre de la herramienta | Parámetros | Descripción |
|
| Temperatura en tiempo real, humedad, velocidad del viento y presión |
|
| Previsión de varios días con máximas y mínimas diarias y probabilidad de lluvia |
|
| Índice de calidad del aire (AQI de EE. UU. y la UE), niveles de PM2.5, PM10 y ozono |
This server cannot be deployed
Maintenance
Related MCP Connectors
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
Weather, code search, currency & Solana trust scoring as MCP tools. Free, no API key needed.
Global weather via Open-Meteo: forecast, historical, marine, air quality, geocoding, elevation.
Weather MCP — wraps Open-Meteo API (free, no auth)
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables querying current weather, 7-day forecast, UV index, and air quality for any city using the free Open-Meteo API, without requiring an API key.22 npm-
- AlicenseNot gradedqualityCmaintenanceProvides weather data including current conditions, forecasts, and summaries via Open-Meteo with no API key required, enabling natural language queries through an MCP interface.MIT
- FlicenseAqualityCmaintenanceProvides current weather data for any city using the Open-Meteo API, exposed as an MCP tool for integration with MCP clients.1-
- AlicenseAqualityCmaintenanceEnables real-time weather forecasts for any city using the Open-Meteo API, with automatic geocoding and no API keys required.112 npmMIT