mcp-weather-server
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-weather-serverWhat's the current weather in London?"
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 weather information and forecasts using the OpenWeatherMap API.
Features
š¤ļø Get current weather conditions for any city
š Get 5-day weather forecasts
š”ļø Temperature, humidity, wind speed, and atmospheric pressure
āļø Weather descriptions and conditions
š Works with cities worldwide
Related MCP server: OpenWeatherMap MCP Server
Tools Available
get_weather
Get current weather conditions for a specified location.
Parameters:
location(required): City name (e.g., "London", "Jakarta", "New York")
Example: "What's the weather in Jakarta?"
get_weather_forecast
Get a 5-day weather forecast for a specified location.
Parameters:
location(required): City namedays(optional): Number of days to forecast (1-5, default: 5)
Example: "What's the 5-day forecast for London?"
Prerequisites
Python 3.7+
OpenWeatherMap API key (free tier available)
Claude Desktop application
Installation
Clone the repository:
git clone https://github.com/your-username/mcp-weather-server.git cd mcp-weather-serverCreate a virtual environment:
python -m venv .venv .venv\Scripts\activate # On Windows # or source .venv/bin/activate # On macOS/LinuxInstall dependencies:
pip install -r requirements.txtGet an API key:
Sign up at OpenWeatherMap
Get your free API key
Set up environment variables:
Copy
.env.exampleto.envAdd your API key to the
.envfile:OPENWEATHER_API_KEY=your_api_key_here
Configuration
Claude Desktop Setup
Locate your Claude Desktop config file:
Windows:
%APPDATA%\Claude\claude_desktop_config.jsonmacOS:
~/Library/Application Support/Claude/claude_desktop_config.jsonLinux:
~/.config/Claude/claude_desktop_config.json
Add the weather server configuration:
{ "mcpServers": { "weather": { "command": "path/to/your/project/.venv/Scripts/python.exe", "args": ["path/to/your/project/minimal_weather_server.py"], "env": { "OPENWEATHER_API_KEY": "your_api_key_here" } } } }Restart Claude Desktop
Testing
Test the server independently:
python test_minimal.pyOr test specific functionality:
python debug_server.pyUsage Examples
Once configured with Claude Desktop, you can ask natural language questions:
"What's the weather in Jakarta?"
"Get me the current weather for London"
"What's the 5-day forecast for Tokyo?"
"How's the weather in Singapore today?"
"Show me the weather forecast for Bandung"
Project Structure
mcp-weather-server/
āāā minimal_weather_server.py # Main MCP server
āāā simple_weather_server.py # Alternative simple server
āāā weather_server.py # Original MCP library version
āāā test_minimal.py # Test script
āāā debug_server.py # Debug utilities
āāā requirements.txt # Python dependencies
āāā .env.example # Environment template
āāā .env # Environment variables (not in git)
āāā .gitignore # Git ignore rules
āāā README.md # This fileAPI Reference
This server uses the OpenWeatherMap API to fetch weather data.
Troubleshooting
Common Issues
"API key not found" error:
Ensure your
.envfile containsOPENWEATHER_API_KEY=your_actual_keyVerify the API key is valid and active
"Server disconnected" in Claude:
Check that file paths in the config are correct
Ensure Python executable path is accurate
Restart Claude Desktop after config changes
"Location not found" error:
Try using different city name variations
Include country name for ambiguous cities (e.g., "London, UK")
Debug Steps
Test the server independently:
python test_minimal.pyCheck server logs in Claude Desktop
Verify API key permissions at OpenWeatherMap
Contributing
Fork the repository
Create a feature branch (
git checkout -b feature/amazing-feature)Commit your changes (
git commit -m 'Add amazing feature')Push to the branch (
git push origin feature/amazing-feature)Open a Pull Request
License
This project is licensed under the MIT License - see the LICENSE file for details.
Acknowledgments
OpenWeatherMap for providing the weather API
Anthropic for Claude and the MCP specification
MCP community for protocol documentation and examples
Support
If you encounter any issues or have questions:
Check the troubleshooting section
Review OpenWeatherMap API docs
Open an issue on GitHub
Made with ā¤ļø for the MCP community
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
- Alicense-qualityDmaintenanceProvides current weather conditions and 5-day forecasts for any location using the OpenWeatherMap API. Supports flexible location queries including city names, coordinates, and zip codes.MIT
- Alicense-qualityDmaintenanceProvides access to real-time weather data, 5-day forecasts, and air quality information for any city using the OpenWeatherMap API.MIT
- Alicense-qualityDmaintenanceProvides access to real-time weather data, 5-day forecasts, air quality information, and weather comparisons across multiple cities using the free OpenWeatherMap API.MIT
- Alicense-qualityDmaintenanceEnables querying real-time weather and 5-day forecasts for any city using the OpenWeatherMap API.154MIT
Related MCP Connectors
OpenWeather MCP ā wraps the OpenWeatherMap API (openweathermap.org)
Global weather API: forecasts, historical data, marine, ski, astronomy and timezone.
Global weather via Open-Meteo: forecast, ERA5 archive, marine, air quality, geocoding, elevation.
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/nandarizkika/mcp-weather-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server