Back to MCP directory
publicPublicdnsLocal runtime

3xpl-mcp

3xpl API的MCP服务器实现,允许LLM通过JSON API与48条区块链数据交互,提供多种区块链查询和聚合工具。

article

README

🚀 3xpl.com JSON API MCP 服务器

本项目是一个以 Model Context Protocol (MCP) 形式呈现的 3xpl API 示例实现,它允许大语言模型(LLM)与 48 条区块链上的数据进行交互。此仓库还可作为 3xpl JSON API 使用的示例,具体细节可在代码中查看。

🚀 快速开始

本项目允许 LLM 与 48 条区块链上的数据交互,以下为你提供详细的安装和配置步骤。

📦 安装指南

克隆仓库并进入项目目录

# 克隆仓库
git clone https://github.com/exekerey/3xpl-mcp.git
cd 3xpl-mcp

创建并激活虚拟环境

uv venv 
source .venv/bin/activate

安装依赖项

uv pip install -e .

MCP 配置

{
  "mcpServers": {
    "3xpl_API": {
      "command": "uv",
      "args": [
        "run",
        "--with",
        "mcp[cli]",
        "mcp",
        "run",
        "{:path_to_cloned}/3xpl_mcp/main.py"
      ],
      "env": {
        "THREEXPL_API_KEY": ""
      }
    }
  }
}

⚠️ 重要提示

请从 3xpl 获取您的 API 密钥以使用主 API。如果配置文件中的 THREEXPL_API_KEY 字段留空,MCP 服务器将使用 sandbox API,该 API 具有速率限制。

✨ 主要特性

可用工具列表

| 名称 | 描述 | 状态 | |---------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------|--------| | resolve_ens_domain | 解析 ENS 域名到普通地址 | ✅ | | detect_blockchains | 获取在指定交易/地址上存在的区块链列表 | ✅ | | get_latest_block | 获取指定区块链的最新块高度 | ✅ |
| get_average_fee_24h_usd | 获取过去 24 小时内指定区块链的平均交易费用(以美元计价)。 | ✅ | | get_mempool_events_count | 获取当前内存池中指定区块链未确认事件(转移、输入/输出,而不是交易)的数量 | ✅ | | get_events_count_24h | 获取过去 24 小时内指定区块链的事件数量(转移、输入/输出,而不是整个交易)。 | ✅ | | get_block_overview | 提取指定区块链中块的简要摘要 | ✅ | | get_address_overview | 提取指定区块链中地址的简要摘要 | ✅ | | get_transaction_overview | 提取指定区块链中交易的简要摘要(待改进)。 | ✅ | | list_blockchains_and_modules | 获取所有区块链及其模块列表,并附带模块描述 | ✅ | | aggregate_block_transactions | 聚合指定块中的交易 | ✅ | | aggregate_transaction_transfers | 聚合交易中的单个转移 | ✅ | | aggregate_address_balances | 聚合地址的余额信息(功能待完善)。 | ✅ | | aggregate_address_transactions | 聚合指定地址确认的交易记录 | ✅ | | aggregate_address_mempool | 聚合指定地址未确认的交易记录 | ✅ |

可用提示

| 名称 | 描述 | |---------------------|---------------------------------------------------------------------------| | get_blockchain_info | 使 LLM 深入挖掘数据,以提供最全面的回答。 |

⚠️ 注意事项

⚠️ 重要提示

  • 如果您遇到任何问题,请确保按照步骤正确设置环境和依赖项。
  • 确保 API 密钥安全,不要将其公开或分享给他人。
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