MCP Weather
The MCP Weather Server provides real-time weather forecasts using the AccuWeather API.
Fetch Hourly Forecast (up to 12 hours) via the
weather-get_hourlytoolAccess Daily Forecast (up to 15 days) via the
weather-get_dailytoolDisplay Weather Data in metric (°C) or imperial (°F) units
Provide Temperature, Conditions, Precipitation details
Integrate with LLMs like Claude for real-time weather queries
Supports REST Access via supergateway for HTTP/REST integration
Provides hourly weather forecasts using the AccuWeather API, allowing access to real-time weather data including temperature, conditions, and other weather details for any location.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@MCP Weatherwhat's the 5-day forecast for London in Celsius?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
MCP Weather Server
A Model Context Protocol (MCP) server that provides hourly and daily weather forecasts using the AccuWeather API.
Quick Start
You need an AccuWeather API key (free tier available).
Sign up here and create an app to get your key.
Export your API key as an environment variable:
export ACCUWEATHER_API_KEY=your_api_key_hereThen run the MCP Weather server directly with:
npx -y @timlukahorstmann/mcp-weatherOr, for HTTP/REST access via 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
MCP Server Config Example
For integration with Claude Desktop or other MCP-compatible clients, add this to your config (e.g. claude_desktop_config.json):
{
"mcpServers": {
"weather": {
"command": "npx",
"args": ["-y", "@timlukahorstmann/mcp-weather"],
"env": {
"ACCUWEATHER_API_KEY": "your_api_key_here"
}
}
}
}Overview
This MCP server allows large language models (like Claude) to access real-time weather data. When integrated with an LLM, it enables the model to:
Fetch accurate, up-to-date weather forecasts
Provide hourly weather data for the next 12 hours
Access daily weather forecasts for up to 15 days
Display data in both metric (°C) and imperial (°F) units
View temperature, conditions, precipitation information, and other weather details
Available Tools
Hourly Weather Forecast
Tool name:
weather-get_hourlyProvides hourly forecasts for the next 12 hours
Parameters:
location(required): City or location nameunits(optional): "metric" (Celsius, default) or "imperial" (Fahrenheit)
Daily Weather Forecast
Tool name:
weather-get_dailyProvides daily forecasts for up to 15 days
Parameters:
location(required): City or location namedays(optional): Number of forecast days (1, 5, 10, or 15; default is 5)units(optional): "metric" (Celsius, default) or "imperial" (Fahrenheit)
Prerequisites
Node.js ≥18
An AccuWeather API key (set via
.envor your shell)
Setup
Clone this repository:
git clone https://github.com/TimLukaHorstmann/mcp-weather.git cd mcp-weatherInstall dependencies:
npm installGet an AccuWeather API key:
Register at AccuWeather API
Create a new app and obtain an API key
Create a
.envfile with your API key:ACCUWEATHER_API_KEY=your_api_key_hereBuild the project:
npm run build
Usage with Claude Desktop
Configure Claude Desktop to use this MCP server:
Open Claude Desktop
Go to Settings > Developer > Edit Config
Add the following to your
claude_desktop_config.json:
{ "mcpServers": { "weather": { "command": "npx", "args": ["-y", "@timlukahorstmann/mcp-weather"], "env": { "ACCUWEATHER_API_KEY": "your_api_key_here" } } } }Restart Claude Desktop
In a new conversation, enable the MCP server by clicking the plug icon and selecting "weather"
Now you can ask Claude for weather forecasts, such as:
"What's the hourly weather forecast for New York City?"
"Give me the 5-day forecast for London."
"What will the weather be like in Tokyo this week in Fahrenheit?"
"Will it rain in San Francisco tomorrow?"
Development
Install dev dependencies:
npm installLint your code:
npm run lintBuild:
npm run buildRun tests:
npm testStart in dev mode:
npm run dev
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Future Enhancements
We're always looking to improve the MCP Weather Server. Here are some features we're considering for future releases:
Extended Hourly Forecasts: Beyond 12 hours, e.g., 24 or 48 hours.
Weather Alerts: Integration with AccuWeather's severe weather alerts API.
Location Autocomplete: Improved location searching with autocomplete suggestions.
Historical Weather Data: Access to past weather conditions.
If you have ideas for other features, feel free to open an issue!
Changelog
0.4.0
Removed
sessionIdrequirement from all tools as it was not used for anything internallyThis simplifies integrations and reduces confusion for LLM usage
0.3.0 and earlier
Initial releases with basic functionality
License
This project is licensed under the MIT License - see the LICENSE file for details.
Available Tools
2 toolsweather-get_dailyC
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?
With no annotations provided, the description carries full burden for behavioral disclosure. It states the tool 'gets' data (implying read-only) but doesn't mention rate limits, authentication requirements, data freshness, error conditions, or what the forecast includes (e.g., temperature, precipitation). For a weather API tool with zero annotation coverage, this leaves significant behavioral gaps.
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, efficient sentence that communicates the core purpose without unnecessary words. It's appropriately front-loaded with the main action and scope, making it easy to parse quickly. Every word earns its place in this compact formulation.
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 weather forecasting tool with no annotations and no output schema, the description is insufficiently complete. It doesn't explain what data the forecast returns (temperature, conditions, etc.), how results are structured, whether there are usage limits, or authentication requirements. The combination of missing behavioral context and output information creates significant gaps for an agent trying to use this tool effectively.
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?
The description adds no parameter-specific information beyond what's already in the schema (which has 100% coverage). It mentions 'up to 15 days' which aligns with the 'days' parameter enum, but doesn't provide additional context about parameter interactions, defaults, or practical usage examples. With complete schema documentation, the baseline score of 3 is appropriate.
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 clearly states the action ('Get daily weather forecast') and scope ('for up to 15 days'), providing a specific verb+resource combination. However, it doesn't explicitly differentiate from its sibling 'weather-get_hourly' beyond the 'daily' vs 'hourly' naming, missing an opportunity to clarify the distinction in forecast granularity.
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 description provides no guidance on when to use this tool versus its sibling 'weather-get_hourly' or any alternatives. It mentions 'up to 15 days' but doesn't explain when to choose different day counts or why one might prefer daily over hourly forecasts, leaving usage context entirely implicit.
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 provided, the description carries full burden for behavioral disclosure. It states the tool's function but omits critical behavioral details such as rate limits, authentication requirements, error handling, or response format (e.g., JSON structure, timestamps). For a tool with no annotations, this leaves significant gaps in understanding how it behaves operationally.
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, efficient sentence that front-loads the core purpose without unnecessary words. Every part ('Get hourly weather forecast for the next 12 hours') contributes directly to understanding the tool's function, making it highly concise and well-structured for quick comprehension.
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?
Given the tool's low complexity (2 parameters, no output schema, no annotations), the description covers the basic purpose adequately. However, it lacks details on behavioral aspects (e.g., rate limits, auth) and output format, which are important for a tool with no annotations. It's minimally viable but has clear gaps in providing a complete operational context.
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?
The schema description coverage is 100%, with both parameters ('location' and 'units') well-documented in the schema. The description adds no additional parameter semantics beyond what the schema provides (e.g., it doesn't clarify location formats or unit defaults further). Baseline score of 3 is appropriate as the schema handles parameter documentation adequately.
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 clearly states the specific action ('Get hourly weather forecast') and resource ('weather'), with precise temporal scope ('for the next 12 hours'). It distinguishes from the sibling tool 'weather-get_daily' by specifying hourly vs daily forecasts, making the purpose unambiguous and differentiated.
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 description implies usage context through 'hourly' and 'next 12 hours', suggesting it's for short-term forecasts. However, it lacks explicit guidance on when to use this tool versus the sibling 'weather-get_daily' (e.g., for daily vs hourly needs) or any prerequisites/exclusions, leaving usage decisions partially inferred rather than clearly stated.
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. Dates show when Glama detected each change.
2 tool updates
- First observed
weather-get_daily - First observed
weather-get_hourly
TDQS
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.
1An 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.6218MIT
- AlicenseBqualityDmaintenanceA Model Context Protocol server that provides real-time weather data and forecasts for any city.123ISC
- FlicenseNot gradedqualityCmaintenanceA Model Context Protocol server that interfaces with OpenWeatherMap API to provide real-time weather information and forecasts for cities worldwide.-
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/TimLukaHorstmann/mcp-weather'
If you have feedback or need assistance with the MCP directory API, please join our Discord server