Skip to main content
Glama
Weather MCP Server

Weather MCP Server

by Kisekixy

MCP-сервер погоды

MCP-сервер для получения актуальной информации о погоде, разработанный на базе фреймворка HelloAgents.

Функциональные возможности

  • 🌤️ Запрос погоды в реальном времени

  • 🌍 Поддержка 12 крупных городов Китая

  • 🔄 Использование API wttr.in (без необходимости ключа)

  • 🚀 На базе фреймворка HelloAgents

Related MCP server: Weather MCP Server

Установка

pip install hello-agents requests

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

Прямой запуск

python server.py

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

Отредактируйте файл ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) или %APPDATA%\Claude\claude_desktop_config.json (Windows):

{
  "mcpServers": {
    "weather": {
      "command": "python",
      "args": ["/path/to/server.py"]
    }
  }
}

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

from hello_agents import SimpleAgent, HelloAgentsLLM
from hello_agents.tools import MCPTool

agent = SimpleAgent(name="天气助手", llm=HelloAgentsLLM())
weather_tool = MCPTool(server_command=["python", "server.py"])
agent.add_tool(weather_tool)

response = agent.run("北京今天天气怎么样?")

Инструменты API

get_weather

Получение текущей погоды для указанного города.

Параметры:

  • city (string): Название города (поддерживаются китайский и английский языки)

Пример:

{
  "city": "北京"
}

Возвращаемое значение:

{
  "city": "北京",
  "temperature": 10.0,
  "feels_like": 9.0,
  "humidity": 94,
  "condition": "Light rain",
  "wind_speed": 1.7,
  "visibility": 10.0,
  "timestamp": "2025-10-09 13:25:03"
}

list_supported_cities

Список всех поддерживаемых китайских городов.

Возвращаемое значение:

{
  "cities": ["北京", "上海", "广州", "深圳", "杭州", "成都", "重庆", "武汉", "西安", "南京", "天津", "苏州"],
  "count": 12
}

get_server_info

Получение информации о сервере.

Возвращаемое значение:

{
  "name": "Weather MCP Server",
  "version": "1.0.0",
  "tools": ["get_weather", "list_supported_cities", "get_server_info"]
}

Поддерживаемые города

Пекин, Шанхай, Гуанчжоу, Шэньчжэнь, Ханчжоу, Чэнду, Чунцин, Ухань, Сиань, Нанкин, Тяньцзинь, Сучжоу

Также поддерживается поиск любого города мира по его названию на английском языке.

Лицензия

MIT License

Автор

Команда HelloAgents

Tool Schema Changelog

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

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables real-time weather queries for 12 major Chinese cities and global cities via wttr.in API, with tools like get_weather and list_supported_cities.
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables real-time weather queries for 12 major Chinese cities and global cities using the wttr.in API. Provides tools to get weather, list supported cities, and server info.
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables real-time weather queries for 12 major Chinese cities and global cities using the wttr.in API without an API key, with tools for weather, city listing, and server info.
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      Provides real-time weather queries for 12 major Chinese cities and global cities using the wttr.in API, with tools like get_weather and list_supported_cities.
      1
      MIT