mcp-weather
🌤️ Kaushik's Weather MCP Server
 сервер, написанный на TypeScript, подключающий LLM (такие как Claude Desktop, Cursor и пользовательские AI-агенты) к метеорологическим данным National Weather Service (NWS / NOAA) в реальном времени.
🔗 Живое доказательство интеграции
🚀 Проверено в работе с Claude Desktop: Посмотрите живую сессию чата, демонстрирующую получение прогноза в реальном времени, оповещения и диагностику здоровья:
👉 Посмотреть живое доказательство Claude AI Chat
Related MCP server: mcp-weather
✨ Архитектурные особенности
🏗️ Модульная чистая архитектура: Разделена на выделенные сервисные слои (
CacheService,RateLimiterService,NwsClient,Logger,Formatter).📡 Официальные метеорологические бюллетени: Структурированные отчёты о погоде со стандартизированными метаданными и указанием источника.
⚡ Кэширование в памяти (TTL 5 минут): Потокобезопасный кэш в памяти, снижающий трафик к вышестоящему API до 80%.
🛡️ Уровень безопасности Zero-Vibe: Строгая санитизация входных данных, экранирование XSS-сущностей и изолированное ограничение скорости для клиентов (100 запросов/мин).
🔁 Устойчивость и отказоустойчивость: Автоматические повторные попытки с экспоненциальной задержкой для ошибок HTTP
5xx/429и защита от тайм-аутов запросов.🩺 Наблюдаемость и диагностика: Встроенные инструменты
health_check,get_metricsиclear_cacheсо структурированным JSON-логированием.
📁 Структура проекта
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🛠️ MCP-инструменты
Инструмент | Параметры | Описание |
|
| Получает прогнозы на периоды в реальном времени (температура, ветер, условия) для координат США. |
|
| Получает активные предупреждения о суровой погоде, штормовые предупреждения и метеорологические оповещения. |
| None | Возвращает состояние выполнения, время работы, использование кучи, размер кэша и статус подключения к API. |
| None | Выводит диагностику производительности и активные клиентские сегменты ограничения скорости. |
| None | Очищает кэш в памяти и возвращает количество удалённых записей. |
🚀 Начало работы
1. Клонирование и установка
git clone https://github.com/Kaushik2105/mcp-weather.git
cd mcp-weather
npm install2. Сборка
npm run build3. Запуск тестов
npm test🔌 Подключение к Claude Desktop
Добавьте эту конфигурацию в файл конфигурации 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"
]
}
}
}Примечание: Перезапустите Claude Desktop после сохранения конфигурации.
💬 Примеры запросов для Claude
"Покажи официальный бюллетень прогноза от погодного инструмента Каушика для Лос-Анджелеса (Lat: 34.0522, Lon: -118.2437)"
"Есть ли активные предупреждения о погоде для Флориды (FL)?"
"Запусти диагностику здоровья на погодном MCP-сервере Каушика."
👨💻 Автор
Kaushik Karmakar
GitHub: @Kaushik2105
Живое доказательство интеграции: Claude AI Chat
This server cannot be deployed
Maintenance
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.
NOAA weather for AI agents: conditions, forecasts, observed history. 3 tools, free, no key.
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.10 npmISC