AMap Weather

v1.0.0APIsstable

基于高德地图 API 的中国城市天气查询 MCP Server

amap-weathermcpai-integration
Share:
13
Stars
0
Downloads
0
Weekly
0/5

What is AMap Weather?

AMap Weather is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to 基于高德地图 api 的中国城市天气查询 mcp server

基于高德地图 API 的中国城市天气查询 MCP Server

This server falls under the APIs and Search & Data Extraction categories on MCPgee, the world's largest MCP server directory with 33,000+ servers.

Features

  • 基于高德地图 API 的中国城市天气查询 MCP Server

Use Cases

Query Chinese city weather data via Amap Maps API.
ACAne0320

Maintainer

LicenseMIT
Languagepython
Versionv1.0.0
UpdatedNov 26, 2025
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx amap-weather

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

How to Set Up and Use AMap Weather

The AMap Weather MCP Server provides real-time weather data and multi-day forecasts for cities across mainland China by integrating with the Amap (AutoNavi/高德地图) Maps API. It exposes three tools — current weather, weather forecast, and city search — allowing AI assistants to answer weather queries in Chinese and English using authoritative geographic and meteorological data. Developers building applications or workflows that need accurate China-specific weather data will find this server essential.

Prerequisites

  • Python 3.9 or later with uv package manager
  • An Amap developer account and API key from https://lbs.amap.com/
  • The mcp[cli] and httpx Python packages
  • An MCP-compatible client such as Claude Desktop
1

Obtain an Amap API key

Register at https://lbs.amap.com/ and create an application to get your AMAP_API_KEY. Enable the Weather Query API in your application's permissions.

2

Clone the repository and set up a virtual environment

Clone the project and create a Python virtual environment using uv.

git clone https://github.com/ACAne0320/amap-weather-mcp-server
cd amap-weather-mcp-server
uv venv
source .venv/bin/activate
3

Install dependencies

Install the MCP CLI and httpx HTTP client library required by the weather server.

uv add "mcp[cli]" httpx
4

Configure your Amap API key

Set the AMAP_API_KEY environment variable. You can export it in your shell or add it to the MCP client configuration's env block.

export AMAP_API_KEY="your_amap_api_key_here"
5

Configure Claude Desktop

Add the server to Claude Desktop's configuration file, passing your API key as an environment variable.

{
  "mcpServers": {
    "amap-weather": {
      "command": "python",
      "args": ["/path/to/amap-weather-mcp-server/weather.py"],
      "env": {
        "AMAP_API_KEY": "your_amap_api_key_here"
      }
    }
  }
}
6

Restart Claude Desktop and test

Restart Claude Desktop to load the new server configuration. Try asking about current weather for a Chinese city to verify the connection.

AMap Weather Examples

Client configuration

Claude Desktop configuration for the AMap Weather server with API key environment variable.

{
  "mcpServers": {
    "amap-weather": {
      "command": "python",
      "args": ["/path/to/amap-weather-mcp-server/weather.py"],
      "env": {
        "AMAP_API_KEY": "your_amap_api_key_here"
      }
    }
  }
}

Prompts to try

Example prompts for querying Chinese city weather through your AI assistant.

- "What is the current weather in Beijing?"
- "Give me a 3-day weather forecast for Shanghai"
- "Search for cities named Guangzhou and show me their current weather"
- "北京市今天天气怎么样?"
- "Is it going to rain in Chengdu this week?"

Troubleshooting AMap Weather

API returns an error about invalid city name

Amap requires administrative division identifiers in city names. Use '北京市' instead of '北京', '上海市' instead of '上海'. Include the 市, 县, or 区 suffix for accurate results.

AMAP_API_KEY not found or authentication fails

Verify the key is correctly set in the env block of your MCP client config. Check your Amap developer console to confirm the Weather Query API is enabled for your application key.

Rate limit errors from the Amap API

Free Amap API keys have daily and per-minute request limits. If exceeded, wait for the limit to reset or upgrade your Amap API plan. Avoid rapid repeated queries during testing.

Frequently Asked Questions about AMap Weather

What is AMap Weather?

AMap Weather is a Model Context Protocol (MCP) server that 基于高德地图 api 的中国城市天气查询 mcp server It connects AI assistants to external tools and data sources through a standardized interface.

How do I install AMap Weather?

Follow the installation instructions on the AMap Weather GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.

Which AI clients work with AMap Weather?

AMap Weather works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.

Is AMap Weather free to use?

Yes, AMap Weather is open source and available under the MIT license. You can use it freely in both personal and commercial projects.

Browse More APIs MCP Servers

Explore all apis servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.

Quick Config Preview

{ "mcpServers": { "amap-weather": { "command": "npx", "args": ["-y", "amap-weather"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

Ready to use AMap Weather?

Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.

33,000+ ServersFree & Open SourceStep-by-Step Guides