Skip to main content
Glama
tengzhijian

Weather MCP

by tengzhijian

Wetter-MCP

CI npm version License: MIT

Ein einfach zu bedienendes Wetterabfrage-MCP-Tool, das sowohl den CLI-Modus als auch den MCP-Server-Modus unterstützt.

Funktionen

  • 🌤️ Echtzeit-Wetterabfrage - Aktuelles Wetter für jede Stadt weltweit abrufen

  • 🔧 CLI-Unterstützung - Wetter direkt über die Befehlszeile abfragen

  • 🤖 MCP-Protokoll - Unterstützung für KI-Clients wie Claude und Cursor

  • 🌍 Weltweite Abdeckung - Unterstützung für Städtenamen in verschiedenen Sprachen wie Chinesisch, Englisch usw.

  • Kostenlose API - Nutzt den kostenlosen Wetterdienst von Open-Meteo, kein API-Key erforderlich

  • 📝 Typsicherheit - Umfassende Typunterstützung durch TypeScript + Zod

Related MCP server: Weather MCP Server

Installation

Methode 1: Globale npm-Installation (empfohlen)

npm install -g weather-mcp

Methode 2: Direkte Verwendung mit npx

npx weather-mcp weather 北京

Methode 3: Installation aus dem Quellcode

git clone https://github.com/tengzhijian/weather-mcp.git
cd weather-mcp
npm install
npm run build

CLI-Verwendung

# 查询天气
weather-mcp weather 北京
weather-mcp weather Shanghai

# 查看帮助
weather-mcp --help
weather-mcp --version

Beispielausgabe

{
  "ok": true,
  "data": {
    "city": "北京 (中国)",
    "temperature": 22,
    "humidity": 70,
    "description": "多云",
    "windSpeed": 9.3,
    "updatedAt": "2024-01-15T08:30:00.000Z"
  }
}

MCP-Server-Konfiguration

Claude Desktop

Bearbeiten Sie %APPDATA%/Claude/settings.json (Windows) oder ~/Library/Application Support/Claude/settings.json (Mac):

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

Cursor

Fügen Sie dies unter Cursor Settings → MCP hinzu:

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

Lokale Entwicklungsversion

Wenn Sie aus dem Quellcode ausführen:

{
  "mcpServers": {
    "weather": {
      "command": "node",
      "args": ["/path/to/weather-mcp/dist/index.js", "--mcp"]
    }
  }
}

Verfügbare Tools

getWeather

Fragt Wetterinformationen für eine bestimmte Stadt ab.

Parameter:

  • city (string, erforderlich): Name der Stadt, z. B.: Peking, Shanghai, Guangzhou, London, Tokio

Rückgabe:

  • city: Name der Stadt (inklusive Land)

  • temperature: Temperatur (Celsius)

  • humidity: Luftfeuchtigkeit (Prozent)

  • description: Wetterbeschreibung (sonnig, bewölkt usw.)

  • windSpeed: Windgeschwindigkeit (km/h)

  • updatedAt: Zeitpunkt der Datenaktualisierung

listSupportedCities

Ruft eine Beispiel-Liste unterstützter Städte ab.

Rückgabe:

  • cities: Beispiel-Liste häufiger Städte

  • note: Hinweis (tatsächlich wird jede Stadt weltweit unterstützt)

Anwendungsbeispiele für KI-Clients

Nach der Konfiguration können Sie in Clients wie Claude oder Cursor direkt fragen:

"Wie ist das Wetter heute in Peking?" "Regnet es morgen in Shanghai?" "Frage das Wetter für New York ab"

Die KI ruft automatisch das getWeather-Tool auf, um die Wetterinformationen abzurufen.

Entwicklung

# 安装依赖
npm install

# 开发模式
npm run dev weather 北京

# 运行测试
npm test

# 类型检查
npm run typecheck

# 构建
npm run build

Technologiestack

Projektstruktur

weather-mcp/
├── src/
│   ├── index.ts           # 入口文件
│   ├── cli.ts             # CLI 命令
│   ├── mcp-server.ts      # MCP Server
│   ├── weather-gateway.ts # 天气 API 封装
│   └── version.ts         # 版本号
├── tests/                 # 测试文件
├── .github/workflows/     # GitHub Actions
├── package.json
├── tsconfig.json
└── README.md

CI/CD

Das Projekt nutzt GitHub Actions für die Automatisierung:

  • CI: Führt bei jedem PR und Push automatisch Tests aus (Node.js 18/20/22)

  • Release: Manuell ausgelöste Veröffentlichung auf npm

Lizenz

MIT

Danksagungen

A
license - permissive license
Not graded
quality - not tested
D
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • A
    license
    Not graded
    quality
    D
    maintenance
    An MCP server that provides real-time weather data, hourly forecasts, and daily summaries using the free Open-Meteo API with no API key required. It enables users to search for weather conditions by specific coordinates or city names across multiple measurement units.
    1
    MIT
  • F
    license
    Not graded
    quality
    D
    maintenance
    A production-ready MCP server that provides real-time weather information, forecasts, and alerts to LLM clients using the Open-Meteo API, with support for 26+ global cities, dual transport (STDIO/HTTP), and Docker deployment.
  • A
    license
    Not graded
    quality
    C
    maintenance
    A no-API-key-required MCP server that wraps Open-Meteo APIs to provide geocoding and weather forecast data, enabling city lookups and multi-day forecasts through tools, resources, and prompts.
    MIT
  • F
    license
    Not graded
    quality
    B
    maintenance
    A minimal MCP server that provides current weather and forecasts for any city using the free Open-Meteo API, no API key required.
    11

View all related MCP servers

Related MCP Connectors

  • Hosted MCP server connecting claude.ai, ChatGPT and other AI apps to your own computer

  • MCP server for AI dialogue using various LLM models via AceDataCloud

  • MCP server for GLM chat completions using Zhipu AI models via AceDataCloud

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/tengzhijian/weather-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server