Weather MCP Server
A Model Context Protocol (MCP) server that provides weather information and system notifications. This server allows Claude (any other MCP client) to fetch current weather data for any city and send native system notifications (for MacOS only) with the weather information.
Features
- Get Weather: Fetch current weather conditions for any city worldwide
- Send Notifications: Display weather information as native system notifications
- Human-readable: Formats weather data in pleasant, conversational language
Installation
Prerequisites
- Node.js (version 16 or higher)
- npm or yarn package manager
Setup
- Clone or download the project files
- Install dependencies
- Test the server
Adding to Claude Desktop
To use this MCP server with Claude Desktop, you need to add it to Claude's configuration:
1. Locate Claude's Configuration File
macOS:
2. Add the Weather MCP Server
Edit the configuration file and add your weather MCP server to the mcpServers
section:
Important: Replace /path/to/your/weather-mcp/index.js
with the actual absolute path to your project's index.js file.
3. Restart Claude Desktop
After updating the configuration file, restart Claude Desktop for the changes to take effect.
Usage
Once installed and configured, you can use the following commands with Claude:
Get Weather Information
Send Weather Notifications
Available Functions
weather:get_weather
Fetches current weather conditions for a specified city.
Parameters:
city
(string): Name of the city to get weather for
Returns:
- Temperature (°C)
- Weather condition
- Humidity (%)
- Wind speed (m/s)
- Atmospheric pressure (hPa)
weather:send_notification
Displays a system notification with custom title and message.
Parameters:
title
(string): Notification titlemessage
(string): Notification message content
Troubleshooting
Common Issues
- "Command not found" error
- Ensure Node.js is installed and in your PATH
- Verify the path to index.js is correct in the configuration
- Weather data not loading
- Check that your OpenWeatherMap API key is valid
- Ensure the API key is properly set in the environment variables
- Claude not recognizing the MCP server
- Restart Claude Desktop after configuration changes
- Check the JSON syntax in claude_desktop_config.json
- Verify file permissions on the MCP server files
Debug Mode
To run the server in debug mode with verbose logging:
API Rate Limits
The free OpenWeatherMap API tier includes:
- 1,000 calls per day
- 60 calls per minute
For higher usage, consider upgrading to a paid plan.
License
This project is open source and available under the MIT License.
Support
For issues related to:
- MCP Protocol: Check the MCP documentation
- OpenWeatherMap API: Visit OpenWeatherMap support
- Claude Desktop: Contact Anthropic support
Happy weather checking! 🌤️
hybrid server
The server is able to function both locally and remotely, depending on the configuration or use case.
Enables users to fetch current weather conditions for any city worldwide and display weather information as native system notifications on macOS. Provides human-readable weather data including temperature, conditions, humidity, wind speed, and atmospheric pressure.