Back to MCP directory
publicPublicdnsLocal runtime

crypto-trading-mcp

一个支持多交易所的加密货币价格查询和交易模型协议服务

article

README

🚀 加密货币交易 MCP(模型上下文协议)

MCP 是一个简单的模型上下文协议服务器,可用于多个加密货币交易所的价格查询和交易,为加密货币交易提供便捷服务。

MIT 许可证 代码风格:黑色

项目链接:https://github.com/user-attachments/assets/34f3a431-9370-4832-923e-ab89bf1d4913

🚀 快速开始

需求

  • Python 3.10 或更高版本

支持的交易所

目前支持现货交易,支持的交易所如下:

  • Upbit
  • Gate.io
  • Binance

未来将添加更多交易所。

环境设置

将每个交易所所需的认证信息添加到环境变量中。例如,Upbit 如下所示:

UPBIT_ACCESS_KEY="your-access-key"
UPBIT_SECRET_KEY="your-secret-key"

📦 安装指南

暂未提及安装相关具体命令,此部分跳过。

💻 使用示例

暂未提供代码示例,此部分跳过。

📚 详细文档

开发指南

添加新的交易所

  1. 创建一个新的交易所类,继承自 CryptoExchange 抽象类。
  2. 实现所需的 API 方法。
  3. 编写测试用例。
  4. 在工厂类中注册新交易所。

运行测试

# 安装测试依赖
uv pip install -e ".[test]"

# 运行测试
pytest

📄 许可证

本项目采用 MIT 许可证

help

Runtime guide

cloud

Hosted runtime

Hosted servers run from a provider-managed environment. You usually connect the MCP client to the hosted endpoint or follow the provider's authorization flow, without keeping a local process alive

  1. Open provider connection page
  2. Authorize or copy endpoint
  3. Connect from your MCP client
terminal

Local runtime / other methods

Local servers run on your own machine or infrastructure. You normally copy the server_config into your MCP client, install the required package, and provide env variables from env_schema when needed

  1. Copy server_config
  2. Install required package
  3. Fill env variables and restart client