MCP Weather
MCP-Wetterserver
Ein Model Context Protocol (MCP)-Server, der mithilfe der AccuWeather-API stündliche und tägliche Wettervorhersagen bereitstellt.
Schnellstart
Sie benötigen einen AccuWeather-API-Schlüssel (kostenlose Stufe verfügbar).
Melden Sie sich hier an und erstellen Sie eine App, um Ihren Schlüssel zu erhalten.
Exportieren Sie Ihren API-Schlüssel als Umgebungsvariable:
export ACCUWEATHER_API_KEY=your_api_key_hereFühren Sie dann den MCP-Wetterserver direkt mit folgendem Befehl aus:
npx -y @timlukahorstmann/mcp-weatherOder für HTTP/REST-Zugriff über Supergateway :
npx -y supergateway --stdio "npx -y @timlukahorstmann/mcp-weather" \
--port 4004 \
--baseUrl http://127.0.0.1:4004 \
--ssePath /messages \
--messagePath /message \
--cors "*" \
--env ACCUWEATHER_API_KEY="$ACCUWEATHER_API_KEY"Related MCP server: Weather MCP Server
Beispiel für eine MCP-Serverkonfiguration
Zur Integration mit Claude Desktop oder anderen MCP-kompatiblen Clients fügen Sie dies zu Ihrer Konfiguration hinzu (z. B. claude_desktop_config.json ):
{
"mcpServers": {
"weather": {
"command": "npx",
"args": ["-y", "@timlukahorstmann/mcp-weather"],
"env": {
"ACCUWEATHER_API_KEY": "your_api_key_here"
}
}
}
}Überblick
Dieser MCP-Server ermöglicht großen Sprachmodellen (wie Claude) den Zugriff auf Echtzeit-Wetterdaten. Durch die Integration mit einem LLM ermöglicht er dem Modell:
Holen Sie sich genaue und aktuelle Wettervorhersagen
Bereitstellung stündlicher Wetterdaten für die nächsten 12 Stunden
Zugriff auf tägliche Wettervorhersagen für bis zu 15 Tage
Anzeige der Daten sowohl in metrischen (°C) als auch in imperialen (°F) Einheiten
Temperatur, Bedingungen, Niederschlagsinformationen und andere Wetterdetails anzeigen
Voraussetzungen
Node.js ≥18
Ein AccuWeather-API-Schlüssel (festgelegt über
.envoder Ihre Shell)
Aufstellen
Klonen Sie dieses Repository:
git clone https://github.com/TimLukaHorstmann/mcp-weather.git cd mcp-weatherInstallieren Sie Abhängigkeiten:
npm installHolen Sie sich einen AccuWeather-API-Schlüssel:
Registrieren Sie sich bei AccuWeather API
Erstellen Sie eine neue App und erhalten Sie einen API-Schlüssel
Erstellen Sie eine
.envDatei mit Ihrem API-Schlüssel:ACCUWEATHER_API_KEY=your_api_key_hereErstellen Sie das Projekt:
npm run build
Verwendung mit Claude Desktop
Konfigurieren Sie Claude Desktop für die Verwendung dieses MCP-Servers:
Öffnen Sie Claude Desktop
Gehen Sie zu Einstellungen > Entwickler > Konfiguration bearbeiten
Fügen Sie Ihrer
claude_desktop_config.jsonFolgendes hinzu:
{ "mcpServers": { "weather": { "command": "npx", "args": ["-y", "@timlukahorstmann/mcp-weather"], "env": { "ACCUWEATHER_API_KEY": "your_api_key_here" } } } }Starten Sie Claude Desktop neu
Aktivieren Sie in einer neuen Konversation den MCP-Server, indem Sie auf das Steckersymbol klicken und „Wetter“ auswählen.
Jetzt können Sie Claude nach Wettervorhersagen fragen, wie zum Beispiel:
„Wie ist die stündliche Wettervorhersage für New York City?“
„Geben Sie mir die 5-Tage-Vorhersage für London.“
„Wie wird das Wetter in Tokio diese Woche in Fahrenheit sein?“
„Wird es morgen in San Francisco regnen?“
Verfügbare Tools
Stündliche Wettervorhersage
Toolname:
weather-get_hourlyBietet stündliche Vorhersagen für die nächsten 12 Stunden
Parameter:
sessionId(erforderlich): Eindeutige Kennung für die Sitzunglocation(erforderlich): Stadt- oder Ortsnameunits(optional): „metrisch“ (Celsius, Standard) oder „imperial“ (Fahrenheit)
Tägliche Wettervorhersage
Toolname:
weather-get_dailyBietet tägliche Vorhersagen für bis zu 15 Tage
Parameter:
sessionId(erforderlich): Eindeutige Kennung für die Sitzunglocation(erforderlich): Stadt- oder Ortsnamedays(optional): Anzahl der Vorhersagetage (1, 5, 10 oder 15; Standard ist 5)units(optional): „metrisch“ (Celsius, Standard) oder „imperial“ (Fahrenheit)
Entwicklung
Installieren Sie Entwicklungsabhängigkeiten:
npm installLintisieren Sie Ihren Code:
npm run lintErstellen:
npm run buildTests ausführen:
npm testIm Dev-Modus starten:
npm run dev
Beitragen
Beiträge sind willkommen! Senden Sie gerne einen Pull Request.
Zukünftige Verbesserungen
Wir arbeiten ständig daran, den MCP-Wetterserver zu verbessern. Hier sind einige Funktionen, die wir für zukünftige Versionen in Betracht ziehen:
Erweiterte stündliche Vorhersagen: Über 12 Stunden hinaus, z. B. 24 oder 48 Stunden.
Wetterwarnungen: Integration mit der API für Unwetterwarnungen von AccuWeather.
Standort-Autovervollständigung: Verbesserte Standortsuche mit Autovervollständigungsvorschlägen.
Historische Wetterdaten: Zugriff auf vergangene Wetterbedingungen.
Wenn Sie Ideen für andere Funktionen haben, können Sie gerne ein Problem melden!
Lizenz
Dieses Projekt ist unter der MIT-Lizenz lizenziert – Einzelheiten finden Sie in der Datei LICENSE .
Available Tools
2 toolsweather-get_dailyA
Get daily weather forecast for up to 15 days
| Name | Required | Description | Default |
|---|---|---|---|
| location | Yes | The city or location for which to retrieve the weather forecast. | |
| days | No | Number of days to forecast (1, 5, 10, or 15). Default is 5. | |
| units | No | Temperature unit system (metric for Celsius, imperial for Fahrenheit). Default is metric. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
There are no annotations, so the description carries the behavioral transparency burden. It communicates a read-only forecast lookup via 'Get' and adds the 15-day maximum, but it does not disclose response shape, potential errors, timezone behavior, or whether any authentication is needed. For a simple read operation this is acceptable but not thorough.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single sentence with no wasted words. It front-loads the verb and resource and immediately gives the key constraint of 15 days.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple weather lookup with three fully documented parameters, the description is largely complete and an agent can invoke the tool correctly. The only notable gap is that there is no output schema and the description does not hint at the shape of the returned forecast payload.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%: location, days, and units are all clearly documented in the input schema. The description adds no additional parameter meaning, which is acceptable because the structured schema already handles the documentation fully.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description explicitly states the action ('Get'), the resource ('daily weather forecast'), and the scope ('up to 15 days'). This clearly distinguishes it from the sibling tool weather-get_hourly without requiring any additional inference.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The word 'daily' and the tool name imply that this is for day-level forecasts rather than hourly ones, which is useful context. However, the description does not explicitly state when to use this tool versus weather-get_hourly or provide any exclusion criteria.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
weather-get_hourlyA
Get hourly weather forecast for the next 12 hours
| Name | Required | Description | Default |
|---|---|---|---|
| location | Yes | The city or location for which to retrieve the weather forecast. | |
| units | No | Temperature unit system (metric for Celsius, imperial for Fahrenheit). Default is metric. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden of behavioral disclosure. It states the scope (hourly, next 12 hours) and implies a read-only operation, but does not mention return format, error behavior, or data source limitations. It is adequate but not rich.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single concise sentence with no filler. It front-loads the core action and scope, making it easy for an agent to process quickly.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple two-parameter tool, the description is largely complete: it states the forecast type, granularity, and time window. It does not describe the return payload, but no output schema exists and the tool's purpose is straightforward enough that an agent can infer expected weather data fields.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so both parameters are already documented in the schema. The description adds no additional parameter-level details beyond what the schema provides, so the baseline score of 3 applies.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses a specific verb ('Get') and resource ('hourly weather forecast') with a clear time bound ('next 12 hours'). This clearly distinguishes it from the sibling tool weather-get_daily, which is for daily forecasts.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The time range and 'hourly' granularity imply when to use this tool, but the description never explicitly names the alternative or states when to choose it instead. The guidance is present by inference, not direct instruction.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
2 tool updates
- First observed
weather-get_daily - First observed
weather-get_hourly
TDQS
Scored across 2 tools
The two tools have clearly distinct purposes: one provides daily forecasts for up to 15 days, while the other provides hourly forecasts for the next 12 hours. There is no overlap in functionality, and an agent can easily differentiate between them based on the time granularity and forecast duration.
Both tools follow a consistent naming pattern with a prefix 'weather-' followed by a verb_noun structure (get_daily, get_hourly). This pattern is predictable and enhances readability, making it easy for agents to understand the tool's purpose at a glance.
With only 2 tools, the server feels under-scoped for a weather domain. While the tools cover forecast retrieval, there are obvious gaps such as current weather conditions, historical data, or location-based searches, making the set too thin for comprehensive weather-related tasks.
The tool surface is severely incomplete for a weather server. It lacks essential operations like getting current weather, searching locations, or accessing historical data, which are core to weather applications. Agents will face dead ends when trying to perform basic weather queries beyond forecasts.
Maintenance
Related MCP Connectors
Hosted MCP server for Xweather weather data: conditions, forecasts, alerts, and more.
An MCP server for weather information by @kulybaba
An MCP server for weather information by @kulybaba
MCP server for weather with reasoning — umbrella advice, outdoor checks, city comparisons.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceA Model Context Protocol server that provides current weather information and 3-day forecasts for specified cities using the Open-Meteo API.1-
- AlicenseBqualityCmaintenanceA Model Context Protocol server that provides weather information and forecasts based on user location or address input.612 npm8MIT
- AlicenseBqualityDmaintenanceA Model Context Protocol server that provides real-time weather data and forecasts for any city.17 npmISC
- FlicenseNot gradedqualityCmaintenanceA Model Context Protocol server that interfaces with OpenWeatherMap API to provide real-time weather information and forecasts for cities worldwide.-