Skip to main content
Glama
Javohirxon04

UZCBU MCP Server

by Javohirxon04

UZCBU MCP Server

这是一个模型上下文协议(MCP)服务器,可将乌兹别克斯坦中央银行(CBU.uz)的官方汇率连接到任何兼容 MCP 的 AI 助手(Claude Desktop、Claude Code 等)。

MCP 是 2024-2025 年出现、到 2026 年在 AI 领域广泛普及的开放标准,用于将 AI 模型连接到外部数据和系统。本项目就是为乌兹别克斯坦构建的此类服务器之一。

功能

  • get_all_rates — 返回今天所有货币的官方汇率

  • get_exchange_rate — 返回单一货币(例如 USD)今天的汇率

  • get_historical_rate — 返回指定历史日期的汇率

  • convert_currency — 按官方汇率在两种货币之间进行换算(例如计算 100 USD 等于多少 EUR)

数据来源:cbu.uz 官方开放 JSON API。无需任何 API 密钥或注册。

Related MCP server: Realtime Exchange Rate MCP Server

安装

git clone https://github.com/<sizning-username>/uzcbu-mcp-server.git
cd uzcbu-mcp-server
python -m venv .venv
source .venv/bin/activate  # Windows: .venv\Scripts\activate
pip install -r requirements.txt

手动启动(用于测试)

python -m uzcbu_mcp.server

服务器通过标准 MCP stdio 传输方式启动,并等待来自 MCP 客户端的请求。

连接到 Claude Desktop

打开 Claude Desktop 配置文件(claude_desktop_config.json)并添加以下内容:

{
  "mcpServers": {
    "uzcbu-currency": {
      "command": "python",
      "args": ["-m", "uzcbu_mcp.server"],
      "cwd": "/to'liq/yo'l/uzcbu-mcp-server"
    }
  }
}

重新启动 Claude Desktop。现在,如果您问 Claude“今天美元汇率是多少?”或“把 100 美元换成欧元”,它会自动调用您服务器上的工具。

测试

要在不联网的情况下(使用模拟数据)检查逻辑:

python test_offline.py

项目结构

uzcbu-mcp-server/
├── uzcbu_mcp/
│   ├── __init__.py
│   └── server.py          # MCP server va barcha tool'lar
├── test_offline.py        # Mock ma'lumot bilan offline testlar
├── requirements.txt
├── pyproject.toml
└── README.md

本项目的独特之处

这不仅仅是一个“API 包装器”——它基于 AI 生态系统的新标准 Model Context Protocol 构建,这意味着任何兼容 MCP 的 AI 客户端(不仅仅是某个聊天机器人)都可以使用它。目前,处理乌兹别克斯坦本地数据(官方中央银行汇率)的 MCP 服务器还非常少。

扩展思路

  • 添加其他 CBU 统计数据(通货膨胀、利率)

  • 通过缓存结果(几分钟)来加速

  • 与 Telegram 机器人或 N8N 工作流集成

  • 添加 HTTP/SSE 传输,使其成为可远程运行的服务器

许可证

MIT

Related MCP Connectors

Related MCP Servers

  • F
    license
    Not graded
    quality
    D
    maintenance
    Local service for currency rates and conversion using MCP and agent layer. Accepts user requests, selects appropriate tool, and returns structured responses.
    1
    -
  • A
    license
    A
    quality
    B
    maintenance
    Provides real-time foreign-exchange rates, historical data, and multi-currency lookups to MCP-compatible AI coding assistants like Claude Code and Cursor.
    4
    305 npm
    MIT
  • F
    license
    Not graded
    quality
    C
    maintenance
    Enables real-time currency exchange rate retrieval and conversion for over 200 currencies. Supports operations like getting rates, converting amounts, and comparing currencies through natural language.
    -
  • A
    license
    Not graded
    quality
    C
    maintenance
    Enables currency conversion through natural language in MCP-compatible clients like Claude Desktop, using a configurable conversion tool.
    297 npm
    MIT