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

gold-price-mcp

v1.0.1

Published

MCP server for tracking gold price fluctuations and sending email alerts when prices rise

Readme

🥇 Gold Price MCP Server

一个基于 Model Context Protocol (MCP) 的黄金价格查询和涨幅提醒服务器。支持 Claude Desktop、Cursor 等 AI 客户端。

✨ 功能

| 工具 | 说明 | |------|------| | get_gold_price | 获取当前/指定日期的黄金价格(支持多种货币) | | get_gold_price_change | 查询黄金价格涨跌幅(对比 N 天前) | | send_gold_alert_email | 涨幅超过阈值时自动发送邮件通知 |

🚀 快速开始

1. 获取 API Key

前往 GoldAPI.io 注册账号,获取免费 API Key(100 次/月)。

2. 安装 & 使用

方式一:npx 直接运行(推荐)

npx gold-price-mcp

方式二:全局安装

npm install -g gold-price-mcp
gold-price-mcp

3. 配置环境变量

| 变量 | 必须 | 说明 | |------|------|------| | GOLD_API_KEY | ✅ | GoldAPI.io 的 API Key | | SMTP_HOST | 📧 | SMTP 服务器地址(如 smtp.qq.com) | | SMTP_PORT | 📧 | SMTP 端口(如 465) | | SMTP_USER | 📧 | 发件人邮箱 | | SMTP_PASS | 📧 | SMTP 密码/授权码 |

📧 = 仅在使用邮件通知功能时需要

🔧 在 AI 客户端中配置

Claude Desktop

编辑 ~/Library/Application Support/Claude/claude_desktop_config.json

{
  "mcpServers": {
    "gold-price": {
      "command": "npx",
      "args": ["-y", "gold-price-mcp"],
      "env": {
        "GOLD_API_KEY": "你的API Key",
        "SMTP_HOST": "smtp.qq.com",
        "SMTP_PORT": "465",
        "SMTP_USER": "你的邮箱",
        "SMTP_PASS": "你的授权码"
      }
    }
  }
}

Cursor

在 Cursor 设置的 MCP 部分添加:

{
  "mcpServers": {
    "gold-price": {
      "command": "npx",
      "args": ["-y", "gold-price-mcp"],
      "env": {
        "GOLD_API_KEY": "你的API Key"
      }
    }
  }
}

📖 工具使用示例

配置完成后,你可以直接对 AI 说:

  • "查一下今天的黄金价格"
  • "黄金最近 7 天涨了多少?"
  • "如果黄金今天涨幅超过 2%,发邮件通知我 [email protected]"
  • "用人民币显示今天的金价"

🏗️ 开发

# 克隆项目
git clone <your-repo-url>
cd mcp-test

# 安装依赖
npm install

# 编译
npm run build

# 测试(使用 MCP Inspector)
npx @modelcontextprotocol/inspector node build/index.js

📄 License

MIT