Skip to main content
Glama

xrpl-mcp-service

by tedlikeskix

XRPL MCP 服务

模型上下文协议 (MCP) 服务器提供对 XRP 账本 (XRPL) 的全面访问。此服务使 AI 模型能够通过标准化端点与 XRPL 进行交互。

特征

帐户信息

  • xrpl_account_info基本账户信息
  • xrpl_account_balances - XRP 和代币余额(人类可读)
  • xrpl_account_lines - 信任线
  • xrpl_account_offers - 活跃交易报价
  • xrpl_account_nfts - NFT 持有量
  • xrpl_account_tx交易历史记录

去中心化交易所

  • xrpl_order_book - 查看货币对的订单簿
  • xrpl_market_price - 获取当前市场价格
  • xrpl_amm_info - 自动做市商信息

NFT 操作

  • xrpl_nft_offers - 查看 NFT 买入/卖出报价

信托线和付款

  • xrpl_set_trust_line - 建立新的信任线
  • xrpl_remove_trust_line - 删除现有的信任线
  • xrpl_payment_channels支付渠道信息
  • xrpl_find_path - 支付路径查找
  • xrpl_deposit_auth - 检查付款授权

系统

  • xrpl_server_info - 节点状态和信息
  • xrpl_submit_tx - 提交已签名的交易

设置

  1. 创建.env文件:
XRPL_NODE_URL=https://xrplcluster.com
  1. 安装依赖项:
pip install xrpl-py fastapi uvicorn python-dotenv
  1. 运行服务器:
uvicorn main:app --host 0.0.0.0 --port 8000 --reload

API 使用示例

获取账户信息

POST /call-tool/xrpl_account_info { "account": "rsuUjfWxrACCAwGQDsNeZUhpzXf1n1NK5Z" }

获取账户余额

POST /call-tool/xrpl_account_balances { "account": "rsuUjfWxrACCAwGQDsNeZUhpzXf1n1NK5Z" }

设置信任线

POST /call-tool/xrpl_set_trust_line { "wallet_seed": "sXXXXXXXXXXXXXXXXXXXX", "currency": "USD", "issuer": "rvYAfWj5gh67oV6fW32ZzP3Aw4Eubs59B", "limit": "1000" }

获取 AMM 信息

POST /call-tool/xrpl_amm_info { "asset": { "currency": "XRP" }, "asset2": { "currency": "USD", "issuer": "rvYAfWj5gh67oV6fW32ZzP3Aw4Eubs59B" } }

获取市场价格

POST /call-tool/xrpl_market_price { "base_currency": { "currency": "XRP" }, "quote_currency": { "currency": "USD", "issuer": "rvYAfWj5gh67oV6fW32ZzP3Aw4Eubs59B" } }

项目结构

├── main.py # FastAPI application entry point ├── tools/ │ ├── __init__.py │ ├── register_tools.py # Tool registration │ └── xrpl_tools.py # XRPL endpoint implementations

关键组件

  1. xrpl_tools.py
    • 核心 XRPL 交互功能
    • 通过事件循环处理实现异步
    • 错误处理和响应格式
  2. 注册工具
    • MCP 工具注册
    • 端点映射和配置

未来的增强功能

  1. AMM(流动性池)操作
    • 创建池
    • 添加/删除流动性
    • 对矿池参数进行投票
  2. 高级交易
    • 创建/取消优惠
    • 自动交易功能
    • 价格警报
  3. NFT 操作
    • Mint NFT
    • 创建/接受报价
    • 收藏管理

常见问题

  1. 异步事件循环:如果您看到“无法从正在运行的事件循环中调用 asyncio.run()”,请检查 xrpl_tools.py 中的异步实现
  2. 速率限制:考虑在生产环境中实施速率限制

贡献

  1. 分叉存储库
  2. 创建功能分支
  3. 实施您的更改
  4. 提交拉取请求

重要提示

  • 始终使用“已验证”的分类账进行生产
  • 保护钱包种子和私钥
  • 监控交易费用
  • 首先在测试网上进行彻底测试

资源

执照

麻省理工学院

-
security - not tested
F
license - not found
-
quality - not tested

remote-capable server

The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.

模型上下文协议 (MCP) 服务器提供对 XRP 账本 (XRPL) 的全面访问。此服务使 AI 模型能够通过标准化端点与 XRPL 进行交互。

  1. 特征
    1. 帐户信息
    2. 去中心化交易所
    3. NFT 操作
    4. 信托线和付款
    5. 系统
  2. 设置
    1. API 使用示例
      1. 获取账户信息
      2. 获取账户余额
      3. 设置信任线
      4. 获取 AMM 信息
      5. 获取市场价格
    2. 项目结构
      1. 关键组件
        1. 未来的增强功能
          1. 常见问题
            1. 贡献
              1. 重要提示
                1. 资源
                  1. 执照

                    Related MCP Servers

                    • -
                      security
                      A
                      license
                      -
                      quality
                      A Model Context Protocol (MCP) server implementation for the OpenLedger API. This server provides structured context to AI models according to the MCP specification.
                      Last updated -
                      8
                      TypeScript
                      Apache 2.0
                    • -
                      security
                      F
                      license
                      -
                      quality
                      An MCP server that exposes the XTB trading API, allowing users to interact with their XTB trading accounts through the Model Context Protocol to perform operations like account management, market data retrieval, and trade execution.
                      Last updated -
                      1
                      1
                      TypeScript
                    • A
                      security
                      A
                      license
                      A
                      quality
                      A Model Context Protocol (MCP) server designed to easily dump your codebase context into Large Language Models (LLMs).
                      Last updated -
                      1
                      9
                      1
                      JavaScript
                      Apache 2.0
                    • A
                      security
                      F
                      license
                      A
                      quality
                      An all-in-one Model Context Protocol (MCP) server that connects your coding AI to numerous databases, data warehouses, data pipelines, and cloud services, streamlining development workflow through seamless integrations.
                      Last updated -
                      2
                      Python
                      • Apple
                      • Linux

                    View all related MCP servers

                    MCP directory API

                    We provide all the information about MCP servers via our MCP API.

                    curl -X GET 'https://glama.ai/api/mcp/v1/servers/tedlikeskix/xrpl-mcp-service'

                    If you have feedback or need assistance with the MCP directory API, please join our Discord server