WC

wesbos/currency-conversion-mcp

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

37 stars 5 forks 质量 44 趋势 12

货币转换MCP服务器

概览

一个MCP服务器,利用Frankfurter API提供实时货币兑换和汇率数据。 URL基址是https://currency-mcp.wesbos.com 有两个端点——/mcp 用于可流式 HTTP 和 /sse 用于传统 HTTP+SSE。 目前许多客户端不支持可流式 http,所以你可以用代理使用: 将金额从一种货币换成另一种。 - 从(字符串):源货币代码(3个字母,例如“USD”、“EUR”)- 到(字符串):目标货币代码(3个字母,例如“USD”、“EUR”)- 金额(数字):需转换的金额(正数) - 基本货币代码(字符串,可选):基础货币代码(默认为欧元)- 符号(字符串,可选):逗号分隔货币代码以限制结果 列出所有可用货币及其全名。

概述(AI 翻译)

一个MCP服务器,利用Frankfurter API提供实时货币兑换和汇率数据。

使用

URL基址是https://currency-mcp.wesbos.com

有两个端点——/mcp用于可流式HTTP,/sse用于遗留HTTP+SSE。

目前许多客户端不支持可流式 http,所以你可以用代理使用:

可用工具

convert_currency

将金额从一种货币换成另一种。

参数:

  • from(字符串):源货币代码(3个字母,例如“USD”、“EUR”)
  • to(字符串):目标货币代码(3个字母,例如“USD”、“EUR”)
  • amount(数字):需转换的金额(正数)

示例: 将100美元兑换成欧元

get_latest_rates

查最新的汇率。

参数:

  • base(字符串,可选):基础货币代码(默认为欧元)
  • symbols(字符串,可选):逗号分隔货币代码以限制结果

示例: 获取特定货币的美元汇率

get_currencies

列出所有可用货币及其全名。

参数: 无

get_historical_rates

获取特定日期的历史汇率。

参数:

本页由 AI 翻译,技术细节请以原文为准。

README

MCP Currency Converter Server

An MCP server that provides real-time currency conversion and exchange rate data using the Frankfurter API.

Using

URL base is https://currency-mcp.wesbos.com

There are two endpoints - /mcp for streamable HTTP and /sse for legacy HTTP+SSE.

Right now many clients do not offer support for streamable http, so you can use it with a proxy:

{
  "mcpServers": {
    "currency-conversion": {
      "command": "npx",
      "args": ["mcp-remote", "https://currency-mcp.wesbos.com/sse"]
    }
  },
}

Available Tools

convert_currency

Convert an amount from one currency to another.

Parameters:

  • from (string): Source currency code (3 letters, e.g., “USD”, “EUR”)
  • to (string): Target currency code (3 letters, e.g., “USD”, “EUR”)
  • amount (number): Amount to convert (positive number)

Example: Convert 100 USD to EUR

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

get_latest_rates

Fetch the latest exchange rates.

Parameters:

  • base (string, optional): Base currency code (defaults to EUR)
  • symbols (string, optional): Comma-separated currency codes to limit results

Example: Get USD rates for specific currencies

{
  "base": "USD",
  "symbols": "EUR,GBP,JPY"
}

get_currencies

List all available currencies with their full names.

Parameters: None

get_historical_rates

Get historical exchange rates for a specific date.

Parameters:

  • date (string): Date in YYYY-MM-DD format
  • base (string, optional): Base currency code (defaults to EUR)
  • symbols (string, optional): Comma-separated currency codes to limit results

Example: Get historical EUR rates for January 1, 2024

{
  "date": "2024-01-01",
  "base": "EUR",
  "symbols": "USD,GBP"
}

Data Source

Exchange rate data is provided by the Frankfurter API

在 GitHub 查看完整 README

安装

npx mcp-remote https://currency-mcp.wesbos.com/sse
新手?先看 mcpskill.org 教程 →

配置

{ "mcpServers": { "currency-conversion": { "command": "npx", "args": ["mcp-remote", "https://currency-mcp.wesbos.com/sse"] } }, }