home / mcp / weather mcp server

Weather MCP Server

Provides real-time weather data for 12 Chinese cities using wttr.in API without a key, built on the HelloAgents framework.

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "jjyaoao-weather-mcp-server": {
      "command": "python",
      "args": [
        "server.py"
      ]
    }
  }
}

This Weather MCP Server lets you query real-time weather data for Chinese cities through the lightweight HelloAgents framework. It exposes a simple, flexible way to fetch current conditions and integrate weather intelligence into your agents and workflows without requiring an API key.

How to use

You can access weather data from an MCP client in multiple ways. Run the server locally to start serving weather responses, or connect it through HelloAgents or Claude Desktop to embed weather queries into your workflows. You will obtain current conditions, humidity, wind, and more for supported cities.

How to install

Prerequisites: Python 3.8+ and PIP need to be available on your system.

pip install hello-agents requests

Additional setup and usage notes

Run the server directly from your command line to start serving weather data.

python server.py

Configuring Claude Desktop or HelloAgents to use the server

To connect via Claude Desktop, set up a local runtime mapping so the MCP server is invoked when you request weather information. The following configuration snippet shows how to point the client at your local server implementation.

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

Using the server from HelloAgents

You can wrap the MCP server as a tool inside a SimpleAgent so you can ask questions like 北京今天天气怎么样? and have the agent fetch live data.

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("北京今天天气怎么样?")

Supported API endpoints and responses

You can request the following tools from the Weather MCP Server. Each tool returns structured weather data suitable for display or further processing.

get_weather

Fetch the current weather for a specified city. You can provide the city name in Chinese or English.

{
  "city": "北京"
}

list_supported_cities

Return the list of 12 Chinese cities supported by the server.

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

get_server_info

Query basic server information and available tools.

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

Available tools

get_weather

Retrieves the current weather for a specified city, accepting Chinese or English city names.

list_supported_cities

Returns the list of the 12 Chinese cities supported by the server and the total count.

get_server_info

Provides basic server information and the available tools.