Skip to main content
Glama

🌤️ 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/ y app.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: weather-mcp-server

📁 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.txt

2. Ejecutar la interfaz web del chatbot

python app.py

Abre 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)

  1. Abre este directorio del proyecto en Cursor:

    File -> Open Folder -> weather-mcp-chatbot
  2. El archivo .cursor/mcp.json dentro del proyecto se detecta automáticamente en Cursor.

Opción B: Añadir en la configuración de Cursor

  1. En Cursor, abre Configuración (Ctrl + , o Cmd + ,).

  2. Ve a FuncionesServidores MCP.

  3. Haz clic en Añadir nuevo servidor MCP:

    • Nombre: weather

    • Tipo: command (stdio)

    • Comando: python C:\Users\admin\.gemini\antigravity\scratch\weather-mcp-chatbot\weather_mcp_server.py

  4. 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

get_current_weather

city: str, units: str = "metric"

Temperatura en tiempo real, humedad, velocidad del viento y presión

get_weather_forecast

city: str, days: int = 5, units: str = "metric"

Previsión de varios días con máximas y mínimas diarias y probabilidad de lluvia

get_air_quality

city: str

Índice de calidad del aire (AQI de EE. UU. y la UE), niveles de PM2.5, PM10 y ozono

F
license - not found
Not graded
quality - not tested
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

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

View all related MCP servers

Related MCP Connectors

  • Air Quality MCP — wraps air-quality-api.open-meteo.com (free, no auth)

  • OpenWeather MCP — wraps the OpenWeatherMap API (openweathermap.org)

  • Global weather via Open-Meteo: forecast, ERA5 archive, marine, air quality, geocoding, elevation.

View all MCP Connectors

Latest Blog Posts

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/nateksharma4698-oss/weather-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server