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

tjweather-mcp

v1.0.0

Published

天机气象API MCP服务器 - 基于Model Context Protocol的气象数据服务

Downloads

12

Readme

tjweather-mcp

npm version License: MIT Node.js Version

天机气象API MCP服务器 - 基于Model Context Protocol的气象数据服务,支持与Claude Code等AI工具集成。

🚀 快速安装

方法1: 全局安装(推荐)

npm install -g tjweather-mcp

方法2: 使用npx(无需安装)

npx tjweather-mcp

方法3: 本地开发

git clone https://github.com/yourusername/tjweather.git
cd tjweather/tjweather-mcp
npm install
npm run build

⚙️ 配置

1. 设置环境变量

创建 ~/.config/tjweather/.env 文件:

# 天机气象API密钥(必需)
API_KEY=your_api_key_here

# API端点地址(可选,有默认值)
JSON_ENDPOINT=https://api.tjweather.com/beta

2. 配置MCP客户端

在Claude Code中添加到配置文件:

{
  "mcpServers": {
    "tjweather": {
      "command": "tjweather-mcp",
      "args": []
    }
  }
}

或者使用npx:

{
  "mcpServers": {
    "tjweather": {
      "command": "npx",
      "args": ["tjweather-mcp"]
    }
  }
}

可用工具

weather_query

查询天机气象预报数据

参数:

  • location (必需): 经纬度坐标,如 "116.23128,40.22077"
  • fields: 气象要素,如 "ws100m,t2m,rh2m"
  • days: 预报天数 (1-45)
  • hours: 预报小时数
  • resolution: 时间分辨率 ("15min" 或 "1h")
  • timezone: 时区 (-12 到 12)
  • grid: 网格大小 ("1", "3", "5", "7")

weather_fields_info

获取支持的气象要素信息

参数:

  • region: 区域类型 ("global" 或 "china")

使用示例

// 查询北京天气
{
  "tool": "weather_query",
  "arguments": {
    "location": "116.23128,40.22077",
    "fields": "ws100m,t2m,rh2m",
    "days": 3
  }
}

// 获取全球要素信息
{
  "tool": "weather_fields_info",
  "arguments": {
    "region": "global"
  }
}