Skip to content

About

MCP server for Yandex Weather SmartHome API — temperature, wind, condition for AI agents

Resources

Stars

3 stars

Watchers

0 watching

Forks

Latest commit

 

History

2 Commits

Folders and files

Repository files navigation

mcp-yandex-weather — MCP server for Yandex Weather SmartHome

Model Context Protocol server that provides weather data from Yandex Weather SmartHome API to AI agents (Claude Desktop, Hermes, Cursor, etc.).

Features

  • Current weather — temperature, feels-like, wind speed, condition, icon
  • Daily forecast — up to 2 days (free tier) with night/morning/day/evening parts
  • Hourly forecast — temperature, feels-like, wind speed, condition per hour
  • SmartHome native — designed specifically for the Yandex Pogoda B2B SmartHome tariff

Getting an API key

  1. Go to Yandex Pogoda SmartHome Console
  2. Register (phone number + accept terms)
  3. Copy your API key from the dashboard

SmartHome limitations

Tier Forecast days Parameters Rate
Free today + tomorrow temp, feels_like, wind_speed, condition, icon limited (see agreement)
Commercial depends on plan extended (humidity, pressure, uv, etc.) extended

See the user agreement for details.

Quick start

git clone https://github.com/ivanscm/mcp-yandex-weather.git
cd mcp-yandex-weather

# Create .env with your API key
cp .env.example .env

# Run (stdio mode — for Claude Desktop, Cursor)
uv run server.py

# Or run in HTTP mode for remote access
uv run server.py --http

Configuration examples

Claude Desktop

Add to claude_desktop_config.json:

{
  "mcpServers": {
    "ya-pogoda": {
      "command": "uv",
      "args": ["run", "--directory", "/path/to/mcp-yandex-weather", "server.py"],
      "env": {
        "YANDEX_WEATHER_API_KEY": "your_key_here"
      }
    }
  }
}

Hermes Agent

Add to ~/.hermes/config.yaml:

mcp_servers:
  ya-pogoda:
    command: uv
    args:
      - run
      - "--directory"
      - "/path/to/mcp-yandex-weather"
      - server.py
    env:
      YANDEX_WEATHER_API_KEY: "your_key_here"
    enabled: true

For remote Hermes (NAS), run locally with HTTP:

uv run server.py --http

Then configure Hermes:

mcp_servers:
  ya-pogoda:
    url: "http://192.168.1.100:8000/mcp"
    enabled: true

Cursor

Settings → MCP → Add server:

{
  "mcpServers": {
    "ya-pogoda": {
      "command": "uv",
      "args": ["run", "--directory", "/path/to/mcp-yandex-weather", "server.py"],
      "env": {
        "YANDEX_WEATHER_API_KEY": "your_key_here"
      }
    }
  }
}

MCP Inspector

npx @modelcontextprotocol/inspector uv run server.py

Tools

Tool Parameters Returns
get_current_weather lat, lon, lang (default: ru_RU) temperature, feels_like, wind_speed, condition, icon
get_forecast lat, lon, limit (default: 2), lang daily forecast with parts (night/morning/day/evening)
get_hourly_forecast lat, lon, limit (default: 2), lang hourly forecast array

Resources

  • weather://current/{lat}/{lon} — current weather as JSON

Prompts

  • weather_report(lat, lon, lang) — template for generating a weather report

Development

# Install dev dependencies
pip install -e ".[dev]"

# Run tests
pytest

# Run tests with verbose
pytest -v

License

MIT

About

MCP server for Yandex Weather SmartHome API — temperature, wind, condition for AI agents

Resources

Stars

3 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages