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 🙏

© 2026 – Pkg Stats / Ryan Hefner

weather-mcp-server-mariox

v1.0.0

Published

MCP server for querying weather by current IP location using Open-Meteo free API

Readme

Weather MCP Server

一个基于 Model Context Protocol (MCP) 的天气查询服务器,可以查询当前 IP 地址的天气信息。使用免费的 Open-Meteo API,无需注册或 API 密钥。

功能特性

  • 🌍 自动获取当前 IP 位置信息:自动识别用户的地理位置
  • 🌤️ 当前 IP 天气查询:根据当前 IP 地址获取实时天气信息
  • 📍 经纬度天气查询:支持按坐标查询天气信息
  • 📅 天气预报:支持未来7天天气预报
  • 🆓 完全免费:使用 Open-Meteo 免费 API,无需注册

可用工具

  1. get_current_ip_weather - 获取当前IP地址的天气信息
  2. get_weather_by_coordinates - 根据经纬度获取天气信息
  3. get_current_ip_info - 获取当前IP地址的详细信息
  4. get_weather_forecast - 获取天气预报(未来7天)

安装和使用

1. 安装依赖

npm install

2. 启动服务器

# 启动服务器
npm start

# 或者开发模式(自动重启)
npm run dev

MCP 客户端配置

要在支持 MCP 的客户端中使用此服务器,请添加以下配置:

{
  "mcpServers": {
    "weather": {
      "command": "node",
      "args": ["/path/to/your/weather-mcp-server/index.js"]
    }
  }
}

使用示例

查询当前 IP 天气

获取当前IP的天气信息

查询指定坐标天气

查询北京的天气 (纬度: 39.9042, 经度: 116.4074)

获取天气预报

获取未来3天的天气预报

技术栈

  • Node.js 18+
  • @modelcontextprotocol/sdk
  • axios(HTTP 请求)
  • Open-Meteo API(免费天气数据)

API 数据源

  • IP 地理位置信息:ip-api.com(免费服务)
  • 天气数据:Open-Meteo API(完全免费,无需注册)

许可证

MIT License

贡献

欢迎提交 Issues 和 Pull Requests!

更新日志

v1.0.0

  • 初始版本
  • 支持当前 IP 天气查询
  • 支持城市天气查询
  • 支持 IP 信息查询
  • 演示模式支持