mcp-weather
🌤️ Kaushik's Weather MCP Server
Un servidor Model Context Protocol (MCP) listo para producción, construido en TypeScript, que conecta LLMs (como Claude Desktop, Cursor y agentes de IA personalizados) con datos meteorológicos en tiempo real del National Weather Service (NWS / NOAA).
🔗 Prueba de integración en vivo
🚀 Verificado funcionando con Claude Desktop: Echa un vistazo a la sesión de chat en vivo que demuestra la recuperación de pronósticos en tiempo real, alertas y diagnósticos de salud:
👉 Ver prueba de chat en vivo de Claude AI
Related MCP server: mcp-weather
✨ Aspectos destacados de la arquitectura
🏗️ Arquitectura limpia y modular: Desacoplada en capas de servicio dedicadas (
CacheService,RateLimiterService,NwsClient,Logger,Formatter).📡 Boletines meteorológicos oficiales: Informes meteorológicos estructurados con metadatos estandarizados y atribución al proveedor.
⚡ Caché en memoria (TTL de 5 minutos): Caché en memoria segura para subprocesos que reduce el tráfico de API ascendente hasta en un 80%.
🛡️ Capa de seguridad Zero-Vibe: Saneamiento estricto de entradas, escape de entidades XSS y limitación de velocidad aislada por cliente (100 req/min).
🔁 Resiliencia y tolerancia a fallos: Reintentos automáticos con retroceso exponencial para errores HTTP
5xx/429y protecciones de tiempo de espera de solicitudes.🩺 Observabilidad y diagnósticos: Herramientas integradas
health_check,get_metricsyclear_cachecon registro JSON estructurado.
📁 Estructura del proyecto
weather/
├── src/
│ ├── config/ # Central configuration & runtime constants
│ ├── services/ # Core business logic (Cache, RateLimiter, NwsClient, Formatter, Logger)
│ ├── tools/ # MCP Tool handlers (alerts, forecast, diagnostics)
│ ├── types/ # Strongly typed TypeScript interfaces
│ ├── utils/ # Input sanitization and security helpers
│ └── index.ts # Server bootstrap, transport initialization & graceful shutdown
├── tests/
│ ├── unit/ # Unit test suites (utils, sanitizer, cache)
│ ├── integration/ # Upstream NWS API integration & retry tests
│ ├── performance/ # Cache throughput & rate-limiting load tests
│ ├── security/ # XSS, injection prevention & boundary tests
│ └── basic.test.ts # Comprehensive test runner
├── build/ # Compiled ES module JavaScript distribution
├── package.json
└── tsconfig.json🛠️ Herramientas MCP
Herramienta | Parámetros | Descripción |
|
| Recupera pronósticos por períodos en tiempo real (temperaturas, vientos, condiciones) para coordenadas de EE. UU. |
|
| Obtiene alertas meteorológicas severas activas, avisos y advertencias meteorológicas. |
| Ninguno | Devuelve el estado de salud del runtime, tiempo de actividad, uso de memoria heap, tamaño de caché y estado de conexión con la API. |
| Ninguno | Genera diagnósticos de rendimiento y cubos de clientes con limitación de velocidad activa. |
| Ninguno | Vacía la caché en memoria y devuelve el número de entradas purgadas. |
🚀 Comenzando
1. Clonar e instalar
git clone https://github.com/Kaushik2105/mcp-weather.git
cd mcp-weather
npm install2. Compilar
npm run build3. Ejecutar la suite de pruebas
npm test🔌 Conexión con Claude Desktop
Añade esta configuración a tu archivo de configuración de Claude Desktop:
Windows:
%APPDATA%\Claude\claude_desktop_config.jsonmacOS:
~/Library/Application Support/Claude/claude_desktop_config.json
{
"mcpServers": {
"kaushik-weather": {
"command": "node",
"args": [
"c:/Workholic/LawSikho/POCs/weather/weather/build/index.js"
]
}
}
}Nota: Reinicia Claude Desktop después de guardar la configuración.
💬 Ejemplos de indicaciones para Claude
"Muéstrame el boletín oficial de pronóstico de la herramienta meteorológica de Kaushik para Los Ángeles (Lat: 34.0522, Lon: -118.2437)"
"¿Hay alguna alerta meteorológica activa para Florida (FL)?"
"Ejecuta un diagnóstico de verificación de salud en el servidor MCP meteorológico de Kaushik."
👨💻 Autor
Kaushik Karmakar
GitHub: @Kaushik2105
Prueba de integración en vivo: Claude AI Chat
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
Related MCP Connectors
US NWS weather alerts and 5-day forecasts for AI agents. $0.01 per call.
US weather & geo for AI agents: forecasts, alerts, earthquakes, elevation, geocoding. No keys.
US weather & geo for AI agents: forecasts, alerts, earthquakes, elevation, geocoding. No keys.
Get US weather forecasts, active and recent alerts, and current observations.
Related MCP Servers
- FlicenseBqualityDmaintenanceProvides real-time US weather alerts and forecasts by integrating with the National Weather Service API. It enables AI assistants to fetch state-specific alerts and detailed local forecasts using geographic coordinates.21-
- FlicenseNot gradedqualityDmaintenanceProvides real-time weather alerts and forecasts from the National Weather Service for US locations, integrating with AI assistants via the Model Control Protocol.-
- FlicenseNot gradedqualityDmaintenanceProvides real-time weather alerts and forecasts for US locations by integrating with the National Weather Service API. Supports both server and client interactions with optional LLM summarization.-
- AlicenseNot gradedqualityDmaintenanceProvides weather forecasts and alerts for US locations via the National Weather Service API, enabling AI assistants to deliver real-time weather information.28 npmISC