MCP Weather
MCP Weather
README
MCP Weather Server
<p align="center"> <img src="logo.png" alt="MCP Weather Server Logo" width="250"/> </p>
A Model Context Protocol (MCP) server that provides hourly 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_here
Then run the MCP Weather server directly with:
npx -y @timlukahorstmann/mcp-weather
Or, 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"
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 any location
- Access temperature, conditions, and other weather details
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-weather -
Install dependencies:
npm install -
Get 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_here -
Build 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 weather forecast for New York City?"
- "Will it rain in London tomorrow?"
- "How hot will it be in Tokyo this afternoon?"
Development
- Install dev dependencies:
npm install - Lint your code:
npm run lint - Build:
npm run build - Run tests:
npm test - Start 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:
- Daily Forecasts: Option to retrieve a summary for the next few days.
- Extended Hourly Forecasts: Beyond 12 hours, e.g., 24 or 48 hours.
- More Configuration Options: e.g., preferred units (Celsius/Fahrenheit) via input.
If you have ideas for other features, feel free to open an issue!
License
This project is licensed under the MIT License - see the LICENSE file for details.
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.