JSPM

@dukai1008/weather

1.1.1
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 7
  • Score
    100M100P100Q44094F
  • License MIT

MCP server for weather information - Get weather data for specific locations

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/weather

Usage

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-mcp

Available 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 PM

get_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.js

MCP Protocol Support

This server implements the Model Context Protocol (MCP) specification and supports:

  • initialize - Server initialization
  • tools/list - List available tools (get_weather, get_weather_forecast)
  • tools/call - Execute weather queries and forecast requests
  • ping - Health check

Data Source: Open-Meteo API - Free weather API with no registration required

License

MIT