汇率全能 MCP Server — 实时汇率/留学预算/跨境定价/结汇建议, 支持28种货币
Project description
💱 mcp-exchange-master
汇率全能 MCP Server — 实时汇率查询、留学预算、跨境电商定价、结汇时机建议,一个 Server 全搞定。
合并自 4 个扣子技能:汇率精算师 / 汇率计算 / 留学汇率精算师 / 跨境电商汇率卫士。
数据源:TianAPI 中国银行外汇牌价,支持 28 种主流货币。
🛠 工具列表
| 工具 | 功能 | 典型场景 |
|---|---|---|
exchange_rate |
实时汇率查询 + 双向换算 | "美元兑人民币多少" "1000英镑换多少人民币" |
exchange_history |
历史汇率走势 + 趋势判断 | "最近美元走势如何" "欧元涨还是跌" |
study_abroad_budget |
留学费用预算 + 汇率换算 | "美国留学一年要多少钱" "5万美元学费换多少人民币" |
cross_border_pricing |
跨境电商多站点定价 | "成本50元的产品在美国站卖多少" |
settlement_advice |
结汇时机建议 | "有1万美元要结汇,现在合适吗" |
📦 安装
pip install mcp-exchange-master
或从源码安装:
git clone https://github.com/yourname/mcp-exchange-master.git
cd mcp-exchange-master
pip install -e .
⚙️ 配置
需要 TianAPI API 密钥(免费注册即得):
export TIANAPI_KEY="your_api_key_here"
🚀 使用
命令行
# STDIO 模式 (默认)
mcp-exchange-master
# 或
python -m mcp_exchange_master
MCP 客户端配置
在 Claude Desktop / Cherry Studio / ChatBox 等 MCP 客户端中添加:
{
"mcpServers": {
"exchange-master": {
"command": "mcp-exchange-master",
"env": {
"TIANAPI_KEY": "your_api_key_here"
}
}
}
}
开发测试
# 安装 FastMCP CLI
pip install "mcp[cli]"
# 交互式测试
mcp dev src/mcp_exchange_master/server.py
# 检查工具列表
mcp inspect src/mcp_exchange_master/server.py
💡 工具详细说明
exchange_rate — 实时汇率 + 换算
# 查汇率
exchange_rate(from_currency="USD", to_currency="CNY")
# 换算金额
exchange_rate(from_currency="USD", to_currency="CNY", amount=5000)
# 双向汇率
exchange_rate(from_currency="美元", to_currency="人民币", bidirectional=True)
支持口语化输入:美元/美金/刀/英镑/人民币/块 等。
study_abroad_budget — 留学预算
study_abroad_budget(
target_country="美国",
tuition=50000,
tuition_currency="USD",
living_cost_monthly=2000,
duration_years=2,
home_currency="CNY"
)
返回学费/生活费换算、年度预算、汇率波动风险区间。
cross_border_pricing — 跨境定价
cross_border_pricing(
cost_cny=50,
target_profit_rate=0.3,
currencies="USD,EUR,GBP,JPY",
platform_rate=0.15,
safety_buffer=0.05
)
返回各币种建议售价、实际利润率、平台费用。
settlement_advice — 结汇建议
settlement_advice(
currency="USD",
amount=10000,
bank="boc"
)
返回银行牌价、结汇建议(立即/部分/观望/暂缓)、建议比例。
🌍 支持货币 (28种)
CNY USD EUR GBP JPY HKD KRW AUD CAD THB CHF SGD NZD MYR PHP RUB IDR SEK NOK DKK INR AED SAR BRL MOP ZAR TRY
📄 许可证
MIT License
💱 mcp-exchange-master (English)
All-in-One Exchange Rate MCP Server — Real-time rates, study abroad budget, cross-border pricing, and settlement advice.
Merged from 4 Coze skills into a single FastMCP Server, powered by TianAPI (Bank of China forex rates), supporting 28 currencies.
Tools
| Tool | Description |
|---|---|
exchange_rate |
Real-time exchange rate query + bidirectional conversion |
exchange_history |
Historical rate trends + direction analysis |
study_abroad_budget |
Study abroad cost budgeting + currency conversion |
cross_border_pricing |
Cross-border e-commerce multi-currency pricing |
settlement_advice |
Forex settlement timing advice based on bank rates |
Install
pip install mcp-exchange-master
Configure
export TIANAPI_KEY="your_api_key" # Free at tianapi.com
MCP Client Config
{
"mcpServers": {
"exchange-master": {
"command": "mcp-exchange-master",
"env": {
"TIANAPI_KEY": "your_api_key"
}
}
}
}
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mcp_exchange_master-0.1.0.tar.gz.
File metadata
- Download URL: mcp_exchange_master-0.1.0.tar.gz
- Upload date:
- Size: 10.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8876ecd557e0a26dc8be246c8597b6beb5a16def80ad2cf1f48db1718e435ac0
|
|
| MD5 |
77cf02bf9b48bd050fa52a4df94fd7ec
|
|
| BLAKE2b-256 |
9fff03887e28d9bbd6fd5bb9282bb7f65503b52738cb1c289f9faf969dccc938
|
File details
Details for the file mcp_exchange_master-0.1.0-py3-none-any.whl.
File metadata
- Download URL: mcp_exchange_master-0.1.0-py3-none-any.whl
- Upload date:
- Size: 12.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c43559736aed2a22e8ce375833d32d8f73ee1505a863d529b383321cc3e8989a
|
|
| MD5 |
b5b4cc9454659a72c47d95e1654644a6
|
|
| BLAKE2b-256 |
8f4329aee8fe0817146ccd79d7766744d3a904bc5cf58b8e2902b8962d08074e
|