npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

wttr-mcp-server

v1.2.0

Published

一个用于 wttr.in 天气 API 的 MCP 服务器,提供now,3 days天气查询和当前日期时间查询功能。

Downloads

41

Readme

Wttr.in MCP Server

一个基于 Model Context Protocol (MCP) 的天气服务器,通过 wttr.in 免费天气 API 提供天气查询和日期时间查询功能。

A Model Context Protocol server that provides weather forecast and datetime query features through the free wttr.in weather API.

功能特性 / Features

  • 获取实时天气数据 / Get real-time weather data
  • 获取三天天气预报 / Get 3-day weather forecast
  • 支持多种位置格式(城市名、邮政编码、经纬度坐标)/ Support multiple location formats (city name, postal code, coordinates)
  • 获取当前日期时间(支持自定义时区)/ Get current date and time (with timezone support)
  • 完整的中文天气描述 / Full Chinese weather description

工具说明 / API Tools

此 MCP 服务器提供以下两个工具:

get_weather_wttr

获取指定地点的天气预报数据。

参数 / Parameters:

  • location (必填): 需要查询的城市名称、邮政编码或经纬度坐标
    • 示例: 'beijing', '90210', '40.71,-74.00'
  • days (可选): 预报类型,默认为 '3d'
    • 'now' - 获取实时天气
    • '3d' - 获取三天天气预报

返回内容:

  • 实时天气:温度、体感温度、风速、风向、湿度、气压、紫外线指数
  • 三天预报:每日最高/最低温、平均温度、日出日落时间、降水概率等

get_datetime

获取当前日期和时间。

参数 / Parameters:

  • timezone (可选): 时区,默认为 'Asia/Shanghai'
    • 示例: 'America/New_York', 'Europe/London'

返回内容:

  • 指定时区的当前日期和时间

使用方法 / Usage with MCP Host

在 Claude Desktop 中使用 / With Claude Desktop

将以下配置添加到 claude_desktop_config.json:

{
  "mcpServers": {
    "wttr-mcp-server": {
      "command": "npx",
      "args": ["wttr-mcp-server@latest"]
    }
  }
}

本地开发 / Local Development

# 安装依赖
npm install

# 构建项目
npm run build

# 在配置文件中使用本地路径
{
  "mcpServers": {
    "wttr-mcp-server": {
      "command": "node",
      "args": ["/path/to/wttr-mcp-server/dist/index.js"]
    }
  }
}

技术栈 / Tech Stack

  • TypeScript
  • Model Context Protocol SDK
  • Zod (参数验证)
  • wttr.in API (免费天气服务)

许可证 / License

ISC