@dukai1008/weather
v1.1.1
Published
MCP server for weather information - Get weather data for specific locations
Maintainers
Readme
@dukai1008/weather
MCP (Model Context Protocol) server for weather information - Get weather data for specific locations
Installation
npm install -g @dukai1008/weatherUsage
As an MCP Server
This package is designed to work as an MCP server with AI assistants like Qoder IDE.
Configuration for Qoder IDE
Add this to your MCP configuration:
{
"mcpServers": {
"weather": {
"command": "npx",
"args": ["@dukai1008/weather"]
}
}
}Or if installed globally:
{
"mcpServers": {
"weather": {
"command": "weather-mcp"
}
}
}Direct Usage
# Run the MCP server directly
npx @dukai1008/weather
# Or if installed globally
weather-mcpAvailable Tools
get_weather
Get current weather information for a specified location using real-time data from Open-Meteo API.
Parameters:
location(string, required): The name of the city or location
Example Response:
🌤️ Current Weather in Shanghai:
🌡️ Temperature: 26°C
☁️ Condition: Partly cloudy
💧 Humidity: 70%
💨 Wind Speed: 12 km/h
⏰ Updated: 9/5/2025, 2:30:15 PMget_weather_forecast
Get 7-day weather forecast for a specified location using real-time data from Open-Meteo API.
Parameters:
location(string, required): The name of the city or location
Example Response:
📅 7-Day Weather Forecast for Shanghai:
📍 Thu, Sep 5
🌡️ 22°C - 28°C
☁️ Partly cloudy
💧 68% | 💨 15 km/h
🔹 Fri, Sep 6
🌡️ 20°C - 26°C
☁️ Overcast
💧 75% | 💨 12 km/h
**Supported Locations:**
- Chinese cities: 上海, 北京, 广州, 深圳
- International cities: Shanghai, Beijing, New York, London, Tokyo, Paris, Guangzhou, Shenzhen, Los Angeles, Sydney, Moscow, Delhi
## Features
- ✅ **Real-time weather data** from Open-Meteo API (free, no API key required)
- ✅ **Current weather conditions** with live temperature, humidity, wind speed
- ✅ **7-day weather forecast** with daily predictions and temperature ranges
- ✅ **MCP 2024-11-05 protocol** compliant
- ✅ **Support for both Chinese and English** city names
- ✅ **16+ major cities worldwide** supported
- ✅ **Comprehensive error handling** and graceful degradation
- ✅ **Easy integration** with AI assistants
## Development
```bash
# Clone the repository
git clone <your-repo-url>
cd weather
# Install dependencies (if any)
npm install
# Run locally
node index.jsMCP Protocol Support
This server implements the Model Context Protocol (MCP) specification and supports:
initialize- Server initializationtools/list- List available tools (get_weather, get_weather_forecast)tools/call- Execute weather queries and forecast requestsping- Health check
Data Source: Open-Meteo API - Free weather API with no registration required
License
MIT
