Skip to main content

Aliyun MCP Weather Skill

A weather query skill for Aliyun Model Context Protocol (MCP), providing simulated weather data for major Chinese cities.

Features

  • get_weather(city): Get weather information for a city
  • Returns structured weather data including temperature, condition, humidity, and wind speed
  • Supports major Chinese cities: Beijing, Shanghai, Guangzhou, Shenzhen
  • Case-insensitive city name matching

Installation

pip install aliyun-mcp-weather-skill-20260130

Usage

Basic Usage

from aliyun_mcp_skill import get_weather

# Get weather for Beijing
weather = get_weather("Beijing")
print(weather)
# Output:
# {
#     "city": "Beijing",
#     "temperature": 22,
#     "condition": "sunny",
#     "humidity": 45,
#     "wind_speed": 10
# }

# Get weather for Shanghai
shanghai_weather = get_weather("shanghai")
print(shanghai_weather)

Aliyun MCP Integration

To use this skill with Aliyun MCP:

  1. Install the package in your MCP server environment
  2. Register the skill as a tool in your MCP server:
from mcp.server.mcpserver import MCPServer
from aliyun_mcp_skill import get_weather

# Create MCP server
mcp = MCPServer("Aliyun Weather Server")

# Register weather tool
@mcp.tool()
def weather(city: str) -> dict:
    """Get weather information for a city"""
    return get_weather(city)

# Run server
mcp.run(transport="streamable-http", json_response=True)
  1. Connect your Aliyun LLM application to the MCP server

Weather Data

The skill provides simulated weather data for the following cities:

City Temperature (°C) Condition Humidity (%) Wind Speed (km/h)
Beijing 22 sunny 45 10
Shanghai 25 cloudy 60 8
Guangzhou 28 rainy 75 12
Shenzhen 27 partly cloudy 70 9

Development

Build the package

python -m build

Upload to PyPI

python -m twine upload dist/*

License

MIT License

Metadata

Release files for aliyun-mcp-weather-skill-20260130 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for aliyun-mcp-weather-skill-20260130 0.1.0
File Size Uploaded Provenance
aliyun_mcp_weather_skill_20260130-0.1.0.tar.gz 3.8 kB Without provenance Details

Release files / aliyun_mcp_weather_skill_20260130-0.1.0.tar.gz

Download URL aliyun_mcp_weather_skill_20260130-0.1.0.tar.gz
Size 3.8 kB
Tags Source
SHA-256 checksum
How to use checksums
9c55c5c5f4480d4ca496e09011957c352291c063b8e8e4d611866c4f4fd82757
BLAKE2b-256 checksum
How to use checksums
c4294d0253e1f63c0a29c0593d6dcf0c1f211d583c8f3a94401ddc969ba27be0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.7

Security for aliyun-mcp-weather-skill-20260130 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Release history Release notifications | RSS feed

This release

0.1.0 This release

1 release file No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page