Skip to main content
Glama

MCP Погодный Сервер

npm-версия лицензия версия узла проблемы еженедельные загрузки

Сервер Model Context Protocol (MCP), который предоставляет почасовые и ежедневные прогнозы погоды с использованием API AccuWeather.


Быстрый старт

Вам понадобится ключ API AccuWeather (доступен бесплатный уровень).
Зарегистрируйтесь здесь и создайте приложение, чтобы получить свой ключ.

Экспортируйте свой ключ API как переменную среды:

export ACCUWEATHER_API_KEY=your_api_key_here

Затем запустите сервер MCP Weather напрямую с помощью:

npx -y @timlukahorstmann/mcp-weather

Или для доступа HTTP/REST через супершлюз :

npx -y supergateway --stdio "npx -y @timlukahorstmann/mcp-weather" \
  --port 4004 \
  --baseUrl http://127.0.0.1:4004 \
  --ssePath /messages \
  --messagePath /message \
  --cors "*" \
  --env ACCUWEATHER_API_KEY="$ACCUWEATHER_API_KEY"

Related MCP server: Weather MCP Server

Пример конфигурации сервера MCP

Для интеграции с Claude Desktop или другими MCP-совместимыми клиентами добавьте это в свою конфигурацию (например, claude_desktop_config.json ):

{
  "mcpServers": {
    "weather": {
      "command": "npx",
      "args": ["-y", "@timlukahorstmann/mcp-weather"],
      "env": {
        "ACCUWEATHER_API_KEY": "your_api_key_here"
      }
    }
  }
}

Обзор

Этот сервер MCP позволяет большим языковым моделям (например, Claude) получать доступ к данным о погоде в реальном времени. При интеграции с LLM он позволяет модели:

  • Получайте точные и актуальные прогнозы погоды

  • Предоставить почасовые данные о погоде на ближайшие 12 часов

  • Получите доступ к ежедневным прогнозам погоды на срок до 15 дней.

  • Отображение данных как в метрических (°C), так и в имперских (°F) единицах измерения

  • Просмотр температуры, условий, информации об осадках и других данных о погоде

Предпосылки

  • Node.js ≥18

  • Ключ API AccuWeather (устанавливается через .env или вашу оболочку)

Настраивать

  1. Клонируйте этот репозиторий:

    git clone https://github.com/TimLukaHorstmann/mcp-weather.git
    cd mcp-weather
  2. Установить зависимости:

    npm install
  3. Получите ключ API AccuWeather:

    • Зарегистрируйтесь в API AccuWeather

    • Создайте новое приложение и получите ключ API

  4. Создайте файл .env с вашим ключом API:

    ACCUWEATHER_API_KEY=your_api_key_here
  5. Создайте проект:

    npm run build

Использование с Claude Desktop

  1. Настройте Claude Desktop для использования этого сервера MCP:

    • Открыть рабочий стол Клода

    • Перейдите в Настройки > Разработчик > Изменить конфигурацию.

    • Добавьте следующее в ваш claude_desktop_config.json :

    {
      "mcpServers": {
        "weather": {
          "command": "npx",
          "args": ["-y", "@timlukahorstmann/mcp-weather"],
          "env": {
            "ACCUWEATHER_API_KEY": "your_api_key_here"
          }
        }
      }
    }
  2. Перезагрузить рабочий стол Клода

  3. В новом разговоре включите сервер MCP, нажав на значок вилки и выбрав «погода».

  4. Теперь вы можете попросить Клода дать вам прогноз погоды, например:

    • «Какой почасовой прогноз погоды в Нью-Йорке?»

    • «Дайте мне прогноз погоды в Лондоне на ближайшие 5 дней».

    • «Какая погода будет в Токио на этой неделе по Фаренгейту?»

    • «Будет ли завтра в Сан-Франциско дождь?»

Доступные инструменты

Почасовой прогноз погоды

  • Название инструмента: weather-get_hourly

  • Предоставляет почасовые прогнозы на следующие 12 часов

  • Параметры:

    • sessionId (обязательно): уникальный идентификатор сеанса

    • location (обязательно): Название города или местоположения

    • units (необязательно): «метрические» (по Цельсию, по умолчанию) или «имперские» (по Фаренгейту)

Ежедневный прогноз погоды

  • Название инструмента: weather-get_daily

  • Предоставляет ежедневные прогнозы на срок до 15 дней

  • Параметры:

    • sessionId (обязательно): уникальный идентификатор сеанса

    • location (обязательно): Название города или местоположения

    • days (необязательно): количество прогнозируемых дней (1, 5, 10 или 15; по умолчанию 5)

    • units (необязательно): «метрические» (по Цельсию, по умолчанию) или «имперские» (по Фаренгейту)

Разработка

  • Установка зависимостей разработки: npm install

  • Проведите линтинг вашего кода: npm run lint

  • Сборка: npm run build

  • Запуск тестов: npm test

  • Запуск в режиме разработки: npm run dev

Внося вклад

Вклады приветствуются! Пожалуйста, не стесняйтесь отправлять запрос на включение.

Будущие улучшения

Мы всегда ищем способы улучшить MCP Weather Server. Вот некоторые функции, которые мы рассматриваем для будущих релизов:

  • Расширенные почасовые прогнозы: свыше 12 часов, например, 24 или 48 часов.

  • Оповещения о погоде: интеграция с API оповещений об опасных погодных условиях AccuWeather.

  • Автозаполнение местоположения: улучшенный поиск местоположения с помощью предложений автозаполнения.

  • Исторические данные о погоде: доступ к прошлым погодным условиям.

Если у вас есть идеи для других функций, смело открывайте тему!

Лицензия

Данный проект лицензирован по лицензии MIT — подробности см. в файле LICENSE .

Available Tools

2 tools
weather-get_dailyA

Get daily weather forecast for up to 15 days

ParametersJSON Schema
NameRequiredDescriptionDefault
locationYesThe city or location for which to retrieve the weather forecast.
daysNoNumber of days to forecast (1, 5, 10, or 15). Default is 5.
unitsNoTemperature unit system (metric for Celsius, imperial for Fahrenheit). Default is metric.

TDQS

A3.8/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

There are no annotations, so the description carries the behavioral transparency burden. It communicates a read-only forecast lookup via 'Get' and adds the 15-day maximum, but it does not disclose response shape, potential errors, timezone behavior, or whether any authentication is needed. For a simple read operation this is acceptable but not thorough.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single sentence with no wasted words. It front-loads the verb and resource and immediately gives the key constraint of 15 days.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple weather lookup with three fully documented parameters, the description is largely complete and an agent can invoke the tool correctly. The only notable gap is that there is no output schema and the description does not hint at the shape of the returned forecast payload.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%: location, days, and units are all clearly documented in the input schema. The description adds no additional parameter meaning, which is acceptable because the structured schema already handles the documentation fully.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description explicitly states the action ('Get'), the resource ('daily weather forecast'), and the scope ('up to 15 days'). This clearly distinguishes it from the sibling tool weather-get_hourly without requiring any additional inference.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The word 'daily' and the tool name imply that this is for day-level forecasts rather than hourly ones, which is useful context. However, the description does not explicitly state when to use this tool versus weather-get_hourly or provide any exclusion criteria.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

weather-get_hourlyA

Get hourly weather forecast for the next 12 hours

ParametersJSON Schema
NameRequiredDescriptionDefault
locationYesThe city or location for which to retrieve the weather forecast.
unitsNoTemperature unit system (metric for Celsius, imperial for Fahrenheit). Default is metric.

TDQS

A3.8/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden of behavioral disclosure. It states the scope (hourly, next 12 hours) and implies a read-only operation, but does not mention return format, error behavior, or data source limitations. It is adequate but not rich.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single concise sentence with no filler. It front-loads the core action and scope, making it easy for an agent to process quickly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple two-parameter tool, the description is largely complete: it states the forecast type, granularity, and time window. It does not describe the return payload, but no output schema exists and the tool's purpose is straightforward enough that an agent can infer expected weather data fields.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so both parameters are already documented in the schema. The description adds no additional parameter-level details beyond what the schema provides, so the baseline score of 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a specific verb ('Get') and resource ('hourly weather forecast') with a clear time bound ('next 12 hours'). This clearly distinguishes it from the sibling tool weather-get_daily, which is for daily forecasts.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The time range and 'hourly' granularity imply when to use this tool, but the description never explicitly names the alternative or states when to choose it instead. The guidance is present by inference, not direct instruction.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 2 tool updates
    • First observedweather-get_daily
    • First observedweather-get_hourly

TDQS

B3.2/5.0

Scored across 2 tools

Disambiguation5/5

The two tools have clearly distinct purposes: one provides daily forecasts for up to 15 days, while the other provides hourly forecasts for the next 12 hours. There is no overlap in functionality, and an agent can easily differentiate between them based on the time granularity and forecast duration.

Naming Consistency5/5

Both tools follow a consistent naming pattern with a prefix 'weather-' followed by a verb_noun structure (get_daily, get_hourly). This pattern is predictable and enhances readability, making it easy for agents to understand the tool's purpose at a glance.

Tool Count2/5

With only 2 tools, the server feels under-scoped for a weather domain. While the tools cover forecast retrieval, there are obvious gaps such as current weather conditions, historical data, or location-based searches, making the set too thin for comprehensive weather-related tasks.

Completeness2/5

The tool surface is severely incomplete for a weather server. It lacks essential operations like getting current weather, searching locations, or accessing historical data, which are core to weather applications. Agents will face dead ends when trying to perform basic weather queries beyond forecasts.

Maintenance

ActivityInactive
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • F
    license
    Not graded
    quality
    D
    maintenance
    A Model Context Protocol server that provides current weather information and 3-day forecasts for specified cities using the Open-Meteo API.
    1
    -
  • F
    license
    Not graded
    quality
    C
    maintenance
    A Model Context Protocol server that interfaces with OpenWeatherMap API to provide real-time weather information and forecasts for cities worldwide.
    -