Skip to main content
Glama
Weather MCP Server

Weather MCP Server

by Eric980305

Weather MCP Server

実際の天気を取得できる MCP サーバーです。HelloAgents フレームワークに基づいて開発されました。

主な機能

  • 🌤️ リアルタイムの天気を取得

  • 🌍 中国の主要12都市に対応

  • 🔄 wttr.in API を使用(API キー不要)

  • 🚀 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 Team

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables real-time weather queries for 12 Chinese cities and global cities using English names via the wttr.in API.
    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 Chinese and global cities via the wttr.in API, providing current conditions such as temperature, humidity, and wind speed.
    MIT
  • A
    license
    Not graded
    quality
    C
    maintenance
    Enables real-time weather queries for Chinese and global cities using the wttr.in API without requiring an API key.
    MIT