instructions.md•1.79 kB
I'll help you build a complete Weather MCP server using the OpenWeather API. Let me create all the necessary files and provide installation instructions.I've created a complete Weather MCP server for you! This implementation provides three powerful weather tools:
🌤️ **get_current_weather** - Get real-time weather conditions for any city
📅 **get_weather_forecast** - Get detailed 5-day forecasts with 3-hour intervals
🌡️ **convert_temperature** - Convert between Celsius and Fahrenheit
## Key Features:
- **OpenWeather API Integration** - Uses the reliable OpenWeather API with proper error handling
- **Flexible Temperature Units** - Supports both Celsius and Fahrenheit for all weather data
- **Smart City Recognition** - Handles various city name formats (e.g., "New York", "London, UK")
- **Beautiful Formatting** - Weather data presented with emojis and clear structure
- **Robust Error Handling** - Graceful handling of API errors, invalid cities, and network issues
- **Security First** - API key stored in Docker secrets, never hardcoded
## What You Get:
All 5 required files are provided above:
1. **Dockerfile** - Container configuration
2. **requirements.txt** - Python dependencies
3. **weather_server.py** - Main server code with all three tools
4. **readme.txt** - Complete documentation
5. **CLAUDE.md** - Implementation guide
## Next Steps:
1. Save all the files to a `weather-mcp-server` directory
2. Get a free API key from OpenWeather (https://openweathermap.org/api)
3. Follow the step-by-step installation instructions
4. Start asking Claude about the weather!
The server handles natural language beautifully - you can ask "What's it like in Paris?" or "Will it be cold in Tokyo tomorrow?" and get comprehensive weather information instantly.