Back to MCP directory
publicPublicdnsLocal runtime

CoinGecko Crypto Trader

一个基于CoinGecko API的加密货币市场数据工具,专为Claude Desktop设计,提供实时价格、市场数据、历史图表等功能。

article

README

🚀 加密交易者 MCP 工具用于 Claude 桌面

这是一款专为 Claude 桌面量身打造的 MCP(模型上下文协议)工具,借助 CoinGecko API 为用户提供全面的加密货币市场数据。

🚀 快速开始

有关如何设置和使用此工具的详细指南,请参阅我们 Medium 上的教程: 教程:使用 Claude 桌面与 Crypto Trader MCP 工具获取实时加密货币数据

✨ 主要特性

  • 实时加密货币价格数据
  • 加密货币的详细市场信息
  • 历史价格图表
  • 加密货币搜索功能
  • 跟踪趋势中的加密货币
  • 全球市场统计数据

📦 安装指南

  1. 确保安装了 Python 3.10 或更高版本。
  2. 安装依赖项:
pip install -r requirements.txt

📦 集成到 Claude 桌面

  1. 在 Claude Desktop 中配置您的 MCP 设置,通过添加以下内容到您的 MCP 配置中:
{
    "tools": {
        "crypto_trader_mcp": {
            "type": "process",
            "command": "python3",
            "args": ["path/to/crypto_trader.py"]
        }
    }
}
  1. 确保工具路径在设置中是正确的,并且是绝对路径。

💻 使用示例

基础用法

您可以向 Claude Desktop 提问:

  • “比特币的当前价格是多少?”
  • “显示以太坊的详细市场数据”
  • “过去 30 天狗狗币的价格是多少?”
  • “搜索与 'sol' 相关的加密货币”
  • “今天哪些加密货币在 trending 中?”
  • “现在加密货币市场的总市值是多少?”

高级用法

工具 1: 获取当前价格

{
    "function": "get_current_price",
    "parameters": {
        "symbol": "BTC"
    }
}

工具 2: 显示详细市场数据

{
    "function": "show_market_data",
    "parameters": {
        "symbol": "ETH"
    }
}

📚 详细文档

错误处理

所有工具都包含适当的错误处理,并会在出现问题时返回错误消息:

{
    "error": "获取无效符号 INVALID_SYMBOL 的价格失败"
}

故障排除

如果 MCP 服务器在 Claude Desktop 中无法工作:

  1. 确保服务器正在运行 - 当脚本启动时,您应该看到输出。
  2. 验证设置中的路径是否正确且为绝对路径。
  3. 确保系统 PATH 中包含 Python 3.10+。
  4. 确保所有依赖项已安装。
  5. 尝试重新启动 Claude Desktop。
  6. 检查日志中是否有错误信息。

速率限制

此工具使用免费的 CoinGecko API,该 API 具有速率限制。请注意,频繁请求可能会被 API 限制。

📄 许可证

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