Package Exports
- @dukai1008/weather
- @dukai1008/weather/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@dukai1008/weather) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
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