Cover image
Try Now
2025-03-16

在中国城市查询天气的MCP服务器

3 years

Works with Finder

1

Github Watches

1

Github Forks

1

Github Stars

China Weather MCP Server

English | 中文

English

Introduction

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.

Features

  • Real-time weather data retrieval for Chinese cities
  • Integration with AMap Weather API
  • Asynchronous request handling
  • Easy-to-use MCP interface

Installation

  1. Ensure Python 3.12 or higher is installed
  2. Install uv:
curl -LsSf https://astral.sh/uv/install.sh | sh
  1. Clone this repository:
git clone https://github.com/DLYZZT/china-weather-mcp-server.git
cd china-weather-mcp-server
  1. Install dependencies with uv:
uv pip install .

Configuration

  1. Get an API key from AMap Developer Platform
  2. Set your API key as an environment variable:
export AMAP_API_KEY="your_api_key_here"

Usage

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 city

License

This project is licensed under the MIT License - see the LICENSE file for details.


中文

简介

中国天气 MCP 服务器是一个基于模型上下文协议(Model Context Protocol,MCP)的服务器,使用高德地图天气 API 提供中国城市的实时天气信息。该服务器使 AI 助手能够访问中国各地的当前天气状况。

特性

  • 获取中国城市的实时天气数据
  • 集成高德地图天气 API
  • 异步请求处理
  • 简单易用的 MCP 接口

安装方法

  1. 确保已安装 Python 3.12 或更高版本
  2. 安装 uv:
curl -LsSf https://astral.sh/uv/install.sh | sh
  1. 克隆此仓库:
git clone https://github.com/DLYZZT/china-weather-mcp-server.git
cd china-weather-mcp-server
  1. 使用 uv 安装依赖:
uv pip install .

配置

  1. 高德开放平台获取 API 密钥
  2. 设置 API 密钥环境变量:
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 文件。

相关推荐

  • NiKole Maxwell
  • I craft unique cereal names, stories, and ridiculously cute Cereal Baby images.

  • Bora Yalcin
  • Evaluator for marketplace product descriptions, checks for relevancy and keyword stuffing.

  • Joshua Armstrong
  • Confidential guide on numerology and astrology, based of GG33 Public information

  • https://suefel.com
  • Latest advice and best practices for custom GPT development.

  • Callycode Limited
  • A geek-themed horoscope generator blending Bitcoin prices, tech jargon, and astrological whimsy.

  • Alexandru Strujac
  • Efficient thumbnail creator for YouTube videos

  • Emmet Halm
  • Converts Figma frames into front-end code for various mobile frameworks.

  • Khalid kalib
  • Write professional emails

  • Elijah Ng Shi Yi
  • Advanced software engineer GPT that excels through nailing the basics.

  • Beniyam Berhanu
  • Therapist adept at identifying core issues and offering practical advice with images.

  • https://maiplestudio.com
  • Find Exhibitors, Speakers and more

  • apappascs
  • 发现市场上最全面,最新的MCP服务器集合。该存储库充当集中式枢纽,提供了广泛的开源和专有MCP服务器目录,并提供功能,文档链接和贡献者。

  • ShrimpingIt
  • MCP系列GPIO Expander的基于Micropython I2C的操作,源自ADAFRUIT_MCP230XX

  • OffchainLabs
  • 进行以太坊的实施

  • huahuayu
  • 统一的API网关,用于将多个Etherscan样区块链Explorer API与对AI助手的模型上下文协议(MCP)支持。

  • deemkeen
  • 用电源组合控制您的MBOT2:MQTT+MCP+LLM

    Reviews

    5 (1)
    Avatar
    user_ThEnOwHr
    2025-04-15

    I've been using mcp-go-sse-server by davidferlay and it's been an incredible experience. The server is robust, highly efficient, and integrates seamlessly with my existing infrastructure. The performance is top-notch, making real-time data synchronization a breeze. Highly recommended for anyone looking for a reliable SSE server solution. Check it out here: https://mcp.so/server/mcp-go-sse-server/davidferlay