天气查询MCP服务器

为AI助手提供实时天气与5天预报查询能力的MCP服务器,适用于任意城市的位置天气查询和预报场景。

  • by AlekJanevski
  • Python
  • 本地部署
  • 1 星标
  • 更新于
在 GitHub 查看 AlekJanevski/weather-server

使用说明

Weather MCP Server

A Model Context Protocol (MCP) server that provides real-time weather data to AI assistants like Claude. Powered by the free Open-Meteo API — no API key required.

Features

  • Worldwide coverage — works for any city or location globally
  • Current conditions — temperature, humidity, wind speed, and weather description
  • 5-day forecast — daily high/low temperatures, precipitation, and conditions
  • No API key needed — uses the free and open Open-Meteo API

Tool

Tool Description
get_forecast Get current weather and a 5-day forecast for any city or location

Example prompts:

  • "What's the weather in Hattem?"
  • "Will it rain in Amsterdam this week?"
  • "What's the forecast for New York?"

Installation

Prerequisites: Python 3.12+ and uv

git clone https://github.com/your-username/weather-server.git
cd weather-server
uv sync

Connect to Claude Desktop

Add the following to your ~/Library/Application Support/Claude/claude_desktop_config.json:

{
  "mcpServers": {
    "weather-server": {
      "command": "/path/to/uv",
      "args": [
        "--directory",
        "/path/to/weather-server",
        "run",
        "weather-server.py"
      ]
    }
  }
}

Tip: Use the full path to uv (find it with which uv) since Claude Desktop launches with a limited PATH.

Restart Claude Desktop after updating the config.

Tech Stack