Weather MCP
Wetter-MCP
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-mcpMethode 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 buildCLI-Verwendung
# 查询天气
weather-mcp weather 北京
weather-mcp weather Shanghai
# 查看帮助
weather-mcp --help
weather-mcp --versionBeispielausgabe
{
"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ädtenote: 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 buildTechnologiestack
TypeScript - Typsicheres JavaScript
MCP SDK - Model Context Protocol
Commander.js - CLI-Framework
Zod - Schema-Validierung
Vitest - Test-Framework
Open-Meteo - Kostenlose Wetter-API
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.mdCI/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
Danksagungen
Wetterdaten werden durch die kostenlose API von Open-Meteo bereitgestellt
Befolgt die Spezifikationen des Model Context Protocol
This server cannot be installed
Maintenance
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
- AlicenseNot gradedqualityDmaintenanceAn 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.1MIT
- FlicenseNot gradedqualityDmaintenanceA 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.
- AlicenseNot gradedqualityCmaintenanceA 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
- FlicenseNot gradedqualityBmaintenanceA minimal MCP server that provides current weather and forecasts for any city using the free Open-Meteo API, no API key required.11
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
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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