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

noc-mcp-server

v1.0.2

Published

A Model Context Protocol (MCP) server that provides weather information tools including weather alerts and forecasts for US locations

Readme

NOC MCP Server

一个基于 Model Context Protocol (MCP) 的天气信息服务器,提供美国地区的天气警报和天气预报功能。

功能特性

  • 🌤️ 天气预报: 根据经纬度获取详细的天气预报信息
  • ⚠️ 天气警报: 获取指定州的天气警报信息
  • 🇺🇸 美国地区支持: 基于美国国家气象局 (NWS) API
  • 🚀 MCP 协议: 完全兼容 Model Context Protocol 标准
  • 📦 易于安装: 通过 npm 一键安装

安装

npm install -g noc-mcp-server

使用方法

作为全局命令行工具

安装后,您可以直接运行:

noc-mcp-server

在 MCP 客户端中使用

在您的 MCP 客户端配置文件中添加:

{
  "mcpServers": {
    "weather": {
      "command": "noc-mcp-server",
      "args": []
    }
  }
}

可用工具

1. 获取天气警报 (get_alerts)

获取指定州的天气警报信息。

参数:

  • state (string): 两字母州代码 (例如: CA, NY, TX)

示例:

{
  "name": "get_alerts",
  "arguments": {
    "state": "CA"
  }
}

2. 获取天气预报 (get_forecast)

根据经纬度获取天气预报信息。

参数:

  • latitude (number): 纬度 (-90 到 90)
  • longitude (number): 经度 (-180 到 180)

示例:

{
  "name": "get_forecast",
  "arguments": {
    "latitude": 37.7749,
    "longitude": -122.4194
  }
}

开发

本地开发

  1. 克隆仓库:
git clone https://github.com/yourusername/noc-mcp-server.git
cd noc-mcp-server
  1. 安装依赖:
npm install
  1. 构建项目:
npm run build
  1. 运行服务器:
node build/index.js

项目结构

noc-mcp-server/
├── src/
│   └── index.ts          # 主服务器代码
├── build/                # 编译后的 JavaScript 文件
├── package.json          # 项目配置
├── tsconfig.json         # TypeScript 配置
└── README.md            # 项目说明

技术栈

  • TypeScript: 类型安全的 JavaScript
  • MCP SDK: Model Context Protocol 官方 SDK
  • Zod: 运行时类型验证
  • NWS API: 美国国家气象局 API

系统要求

  • Node.js >= 18.0.0
  • npm 或 yarn

许可证

ISC License

贡献

欢迎提交 Issue 和 Pull Request!

支持的地区

此 MCP server 仅支持美国地区的天气信息,因为它使用的是美国国家气象局 (NWS) 的 API。

更新日志

1.0.0

  • 初始版本发布
  • 支持天气警报查询
  • 支持天气预报查询
  • 基于 MCP 协议标准