@florent-uzio/xrpl-mcp

中文文档
2.0.1发布于 2026/11/11MITES Module零依赖构建来源已验证近 30 天下载 2231

MCP server exposing XRP Ledger tools and token issuance workflows

原始使用文档
文档目录5 节
  1. Use it from Claude Code
  2. Networks and secrets
  3. Workflows
  4. Add a tool
  5. Development

xrpl-mcp

An MCP server, @florent-uzio/xrpl-mcp, that lets an AI client such as Claude Code query and transact on the XRP Ledger. It runs over stdio and is built with Mastra and xrpl.js. See GLOSSARY.md for the vocabulary.

  • Over 120 tools:
    • query the ledger (accounts, ledgers, transactions, order books, AMMs, NFTs, vaults, servers, fees)
    • submit the XRPL transaction types (payments, trust lines, DEX offers, AMMs, NFTs, MPTs, escrows, checks, payment channels, credentials, vaults, lending, oracles, batches, confidential MPTs)
    • create and fund wallets
    • convert units and currency codes
  • 4 workflows for multi-step setups on test networks: IOU issuance, MPT issuance, confidential MPT and lending setup.

Use it from Claude Code

You only need Node.js 22.13 or later. No model API key is required: Claude Code does the reasoning and calls the tools.

claude mcp add xrpl -- npx -y @florent-uzio/xrpl-mcp@latest

Then ask Claude things like "What is the balance of rXXX on mainnet?" or "Issue an MPT on testnet with 2 holders".

@latest makes npx check npm each time Claude Code starts the server, so a new release loads in your next session, or when you reconnect xrpl from /mcp. To stay on one version, pin it instead, e.g. @florent-uzio/[email protected].

To run the server from a clone of this repo instead:

claude mcp add xrpl -- npm --prefix "$(pwd)" run --silent mcp

Networks and secrets

  • Mainnet is the default. Say "testnet" or "devnet", or give a wss:// URL, to use another network. Every known network is listed in src/helpers/networks.ts.
  • Seeds are refused outside test networks, before any connection is made. On mainnet, sign the transaction yourself and submit the blob with submitSignedBlob.
  • Flow records keep what a session creates (wallets, MPT IDs, keys, hashes), so a later session can reuse it. saveFlowRecord refuses seeds and private keys on mainnet.
VariablePurpose
XRPL_RECORDS_DIRFolder for flow records. Defaults to ~/.xrpl-mcp/records.
XRPL_EXTRA_TEST_NETWORKSComma-separated URLs of other test networks where seeds are allowed, e.g. a local node. Pass it to the MCP server with claude mcp add xrpl --env XRPL_EXTRA_TEST_NETWORKS=ws://localhost:6006 -- npx -y @florent-uzio/xrpl-mcp@latest.

Workflows

The server exposes each workflow as run_<name>.

WorkflowNetworkWhat it does
iou-issuancetestnet, devnetFunds an issuer and holders, configures the issuer, creates the trust lines and sends the token to each holder.
mpt-issuancetestnet, devnetFunds an issuer and holders, creates the MPT issuance (flags, scale, metadata), opts the holders in and sends them the token.
confidential-mptdevnetCreates or reuses a confidential MPT, registers the ElGamal keys, converts a holder balance to confidential, then optionally sends and converts back.
lending-setupdevnetCreates a transferable MPT, a closed-ended vault, a deposit, a loan broker and its first-loss cover. The loan itself is created afterwards with signLoanSet.

The input of each workflow is described in its schema, in src/workflows/*.types.ts.

Add a tool

Transaction tools use the factory. It adds network and seed, refuses seeds outside test networks, hex-encodes every currency code, then autofills, signs and submits the transaction:

// src/tools/transactions/payment/payment.ts
import { Payment } from 'xrpl'
import { useTransactionToolFactory } from '../factory'
import { xrplPaymentSchema } from './payment.types'

const { createTransactionTool } = useTransactionToolFactory({ inputSchema: xrplPaymentSchema })

export const submitPaymentTool = createTransactionTool<Payment>({
  toolId: 'submitPayment',
  description: 'Submit a Payment transaction to send XRP, tokens or MPTs. ...',
  // Optional: reshape the input into the transaction
  buildTransaction: payment => ({ ...payment, Amount: payment.DeliverMax ? undefined : payment.Amount }) as Payment,
  // Optional: throw to refuse the transaction before it is signed
  validateTransaction: params => {
    if (params.Amount === undefined && params.DeliverMax === undefined) {
      throw new Error('Provide Amount (API v1) or DeliverMax (API v2)')
    }
  },
})

Query tools use defineMethodTool (src/tools/methods/shared/method-tool.ts), with the id, the xrpld command and the request and result schemas.

Export the new tool from its folder's index.ts. src/catalog.ts picks up every tool exported from src/tools, so the server exposes it.

The server exposes each tool under its id, so the id is the name the model sees. Name the export after the id with a Tool suffix (submitPaymentTool for submitPayment): a test checks it. Never rename a published tool: it breaks every client that calls it (see docs/adr/0001-tool-names-are-camelcase-ids.md).

Development

npm test               # unit tests
npm run typecheck      # tsc
npm run format         # prettier
npm run build          # bundle the server into dist/

Domain terms are in GLOSSARY.md. Releases of the MCP package follow RELEASING.md.

版本与发布记录

@florent-uzio/xrpl-mcp 共发布 11 个版本,首次发布于 2026/10/26;过去 12 个月发布了 11 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
2.0.1latest2026/11/114 天前
2.0.02026/11/114 天前
1.3.12026/11/114 天前
1.3.02026/11/0312 天前
1.2.12026/11/0213 天前
1.2.02026/11/0213 天前

关于 @florent-uzio/xrpl-mcp 的常见问题

@florent-uzio/xrpl-mcp 是什么?

MCP server exposing XRP Ledger tools and token issuance workflows

如何安装 @florent-uzio/xrpl-mcp?

在项目目录运行 npm install @florent-uzio/xrpl-mcp,或使用 pnpm add / yarn add / bun add。它还提供命令行工具 xrpl-mcp,可以用 npx xrpl-mcp 直接运行。

@florent-uzio/xrpl-mcp 支持 TypeScript 吗?

该包的 package.json 没有声明类型入口。需要类型提示时,可以在 npm 上查找社区维护的 @types/florent-uzio__xrpl-mcp 是否存在。

@florent-uzio/xrpl-mcp 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@florent-uzio/xrpl-mcp 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js >=22.13.0。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

@florent-uzio/xrpl-mcp 可以商用吗?

@florent-uzio/xrpl-mcp 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@florent-uzio/xrpl-mcp 的下载量有多少?

根据 npm 官方下载统计,@florent-uzio/xrpl-mcp 在 2026/10/15 – 2026/11/13 这 30 天内被下载 2,231 次,日均约 74 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@florent-uzio/xrpl-mcp 还在维护吗?

最新版本 2.0.1 发布于 2026/11/11(4 天前);至今共发布 11 个版本,其中过去 12 个月发布了 11 个;首次发布于 2026/10/26。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。