Skip to main content
Glama
Kaushik2105

mcp-weather

by Kaushik2105

🌤️ Kaushik's Weather MCP Server

TypeScript Model Context Protocol Node.js ![Tests](https://img.shields.io/badge/Tests-Passing-brightgreen.svg Claude Verified License: ISC

Готовый к продакшену Model Context Protocol (MCP) сервер, написанный на 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-инструменты

Инструмент

Параметры

Описание

get_forecast

latitude (number), longitude (number)

Получает прогнозы на периоды в реальном времени (температура, ветер, условия) для координат США.

get_alerts

state (2-letter US code, e.g. CA, NY, TX)

Получает активные предупреждения о суровой погоде, штормовые предупреждения и метеорологические оповещения.

health_check

None

Возвращает состояние выполнения, время работы, использование кучи, размер кэша и статус подключения к API.

get_metrics

None

Выводит диагностику производительности и активные клиентские сегменты ограничения скорости.

clear_cache

None

Очищает кэш в памяти и возвращает количество удалённых записей.


🚀 Начало работы

1. Клонирование и установка

git clone https://github.com/Kaushik2105/mcp-weather.git
cd mcp-weather
npm install

2. Сборка

npm run build

3. Запуск тестов

npm test

🔌 Подключение к Claude Desktop

Добавьте эту конфигурацию в файл конфигурации Claude Desktop:

  • Windows: %APPDATA%\Claude\claude_desktop_config.json

  • macOS: ~/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

A
license - permissive license
Not graded
quality - not tested
B
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

  • F
    license
    B
    quality
    D
    maintenance
    Provides 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.
    2
    1
  • F
    license
    Not graded
    quality
    D
    maintenance
    Provides real-time weather alerts and forecasts from the National Weather Service for US locations, integrating with AI assistants via the Model Control Protocol.
  • F
    license
    Not graded
    quality
    C
    maintenance
    Provides 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.
  • F
    license
    Not graded
    quality
    D
    maintenance
    Provides weather forecasts and alerts for US locations via the National Weather Service API, enabling AI assistants to deliver real-time weather information.
    26

View all related MCP servers

Related MCP Connectors

  • US weather, alerts, earthquakes and elevation for AI agents, from NWS/NOAA and USGS. No API keys.

  • US weather & geo for AI agents: forecasts, alerts, earthquakes, elevation, geocoding. No keys.

  • Get US weather forecasts, active alerts, and current observations.

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

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