China Weather MCP Server is a Model Context Protocol (MCP) server that provides real-time weather information for Chinese cities using the AMap (AutoNavi) Weather API. This server enables AI assistants to access current weather conditions across China.
curl -LsSf https://astral.sh/uv/install.sh | sh
git clone https://github.com/DLYZZT/china-weather-mcp-server.git
cd china-weather-mcp-server
uv pip install .
export AMAP_API_KEY="your_api_key_here"
To use with Claude Desktop, add the following configuration to your Claude Desktop config file:
On Windows: %APPDATA%/Claude/claude_desktop_config.json
On MacOS: ~/Library/Application Support/Claude/claude_desktop_config.json
{
"mcpServers": {
"weather": {
"command": "uv",
"args": [
"--directory",
"path/china-weather-mcp-server",
"run",
"weather.py"
],
"env": {
"AMAP_API_KEY": "your_api_key_here"
}
}
}
}
The server provides the following tool:
get_weather(city: str)
: Get current weather information for a specified Chinese cityThis project is licensed under the MIT License - see the LICENSE file for details.
中国天气 MCP 服务器是一个基于模型上下文协议(Model Context Protocol,MCP)的服务器,使用高德地图天气 API 提供中国城市的实时天气信息。该服务器使 AI 助手能够访问中国各地的当前天气状况。
curl -LsSf https://astral.sh/uv/install.sh | sh
git clone https://github.com/DLYZZT/china-weather-mcp-server.git
cd china-weather-mcp-server
uv pip install .
export AMAP_API_KEY="你的API密钥"
要在 Claude Desktop 中使用,请在 Claude Desktop 配置文件中添加以下配置:
Windows系统:%APPDATA%/Claude/claude_desktop_config.json
MacOS系统:~/Library/Application Support/Claude/claude_desktop_config.json
{
"mcpServers": {
"weather": {
"command": "uv",
"args": [
"--directory",
"path/china-weather-mcp-server",
"run",
"weather.py"
],
"env": {
"AMAP_API_KEY": "你的API密钥"
}
}
}
}
服务器提供以下工具:
get_weather(city: str)
:获取指定中国城市的当前天气信息本项目采用 MIT 许可证 - 详情请参见 LICENSE 文件。
Seamless access to top MCP servers powering the future of AI integration.