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

@mcpcn/mcp-exchange-rate

v1.0.2

Published

这是一个基于 Model Context Protocol (MCP) 的汇率转换工具,允许 AI 模型查询实时汇率数据并进行货币转换计算。

Downloads

16

Readme

汇率转换工具

这是一个基于 Model Context Protocol (MCP) 的汇率转换工具,允许 AI 模型查询实时汇率数据并进行货币转换计算。

功能特点

  • 实时汇率转换:支持全球 160+ 种货币之间的实时汇率转换
  • 货币代码和名称转换:可以在货币代码(如 USD)和货币名称(如 美元)之间进行转换
  • 简单易用的接口:提供直观的工具接口,便于 AI 模型调用

环境配置

注意:需要在阿里云市场申请"极速汇率"API的APPCODE作为API密钥。

使用方法

{
  "mcpServers": {
    "mcp-server/exchange-rate": {
      "command": "node",
      "args": [
        "mcp-exchange-rate/dist/index.js"
      ],
      "env": {
        "key": "API的APPCODE作为API密钥"
      },
      "autoApprove": [
        "exchange_rate_convert",
        "currency_convert"
      ]
    }
  }
}

工具功能

该工具提供两个主要功能:

  1. 汇率转换 (exchange_rate_convert)

    • 输入:源货币代码、金额和目标货币代码
    • 输出:转换结果,包含汇率信息
  2. 货币代码转换 (currency_convert)

    • 输入:货币名称或代码
    • 输出:对应的货币代码或名称

示例

汇率转换示例

输入:

{
  "from": "USD",
  "amount": "100",
  "to": "CNY"
}

输出:

{
  "from": "USD",
  "to": "CNY",
  "fromname": "美元",
  "toname": "人民币",
  "rate": "7.2536",
  "camount": "725.36"
}

货币代码转换示例

输入:

{
  "text": "美元"
}

输出:

转换结果: USD

支持的货币

该工具支持超过160种全球货币,包括但不限于:

  • CNY (人民币)
  • USD (美元)
  • EUR (欧元)
  • JPY (日元)
  • HKD (港币)
  • GBP (英镑)
  • 以及更多...

技术实现

  • 基于 Model Context Protocol (MCP) SDK 构建
  • 使用阿里云市场的极速汇率 API 获取实时汇率数据
  • 通过 stdio 传输实现与 AI 模型的通信

注意事项

  • API 调用受到阿里云市场的限制,请注意使用频率
  • 汇率数据可能会有延迟,不适用于高频交易场景

许可证

MIT