💱 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
Metadata
Release files for mcp-exchange-master 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| mcp_exchange_master-0.1.0.tar.gz | 10.6 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| mcp_exchange_master-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 23.3 kB
Release files / mcp_exchange_master-0.1.0.tar.gz
| Download URL | mcp_exchange_master-0.1.0.tar.gz |
|---|---|
| Size | 10.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8876ecd557e0a26dc8be246c8597b6beb5a16def80ad2cf1f48db1718e435ac0
|
|
BLAKE2b-256 checksum How to use checksums |
9fff03887e28d9bbd6fd5bb9282bb7f65503b52738cb1c289f9faf969dccc938
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.12
|
Release files / mcp_exchange_master-0.1.0-py3-none-any.whl
| Download URL | mcp_exchange_master-0.1.0-py3-none-any.whl |
|---|---|
| Size | 12.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c43559736aed2a22e8ce375833d32d8f73ee1505a863d529b383321cc3e8989a
|
|
BLAKE2b-256 checksum How to use checksums |
8f4329aee8fe0817146ccd79d7766744d3a904bc5cf58b8e2902b8962d08074e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.12
|
Security for mcp-exchange-master 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.