License: MIT | XRPL Networks | TypeScript | xrpl.js A comprehensive Model Context Protocol (MCP) server that provides blockchain services for the XRP Ledger ecosystem. This server enables AI agents to interact with XRPL MainNet, TestNet, and DevNet with a unified interface. - Overview - Features - Supported Networks - Prerequisites - Installation - Server Configuration - API Reference
Add this skill
npx mdskills install RomThpt/mcp-xrplComprehensive XRPL MCP server with extensive blockchain tools and clear documentation
License: MIT | XRPL Networks | TypeScript | xrpl.js
A comprehensive Model Context Protocol (MCP) server that provides blockchain services for the XRP Ledger ecosystem. This server enables AI agents to interact with XRPL MainNet, TestNet, and DevNet with a unified interface.
The MCP XRPL Server leverages the Model Context Protocol to provide XRP Ledger services to AI agents. It supports a wide range of services including:
All services are exposed through a consistent interface of MCP tools and resources, making it easy for AI agents to discover and use XRPL functionality.
# Clone the repository
git clone https://github.com/yourusername/mcp-xrpl.git
cd mcp-xrpl
# Install dependencies
npm install
# Build the project
npm run build
Create a .env file in the project root with the following variables:
# Optional: XRPL wallet seed for automatic connection
# If not provided, you can connect using the connect-to-xrpl tool
DEFAULT_SEED=sEdVoKkRRF8RsNYZ689NDeMyrijiCbg # Example - replace with your own or remove
# Network selection (default is "testnet")
XRPL_NETWORK=testnet # Options: mainnet, testnet, devnet
# Start the server in stdio mode (for CLI tools)
npm start
Connect to this MCP server using any MCP-compatible client. For testing and debugging, you can use the MCP Inspector.
The server provides the following MCP tools for agents:
| Tool Name | Description | Key Parameters |
|---|---|---|
connect-to-xrpl | Connect to XRP Ledger using a seed | seed, network |
get-account-info | Get account information | address, network |
delete-account | Delete an XRPL account | privateKey, destination, network |
set-account-properties | Set account properties | privateKey, properties, network |
deposit-preauth | Preauthorize a deposit | privateKey, authorize, network |
set-regular-key | Set a regular key for an account | privateKey, regularKey, network |
| Tool Name | Description | Key Parameters |
|---|---|---|
transfer-xrp | Send XRP to an account | privateKey, to, amount, network |
get-token-metadata | Get token metadata | tokenAddress, network |
check-token-balance | Check token balance | tokenAddress, ownerAddress, network |
transfer-token | Transfer tokens | privateKey, tokenAddress, to, amount, network |
approve-token-spending | Approve token spending | privateKey, tokenAddress, limit, network |
token-clawback | Clawback tokens | privateKey, tokenAddress, from, amount, network |
| Tool Name | Description | Key Parameters |
|---|---|---|
nft-mint | Mint an NFT | privateKey, uri, flags, network |
get-nft-info | Get NFT metadata | tokenID, network |
check-nft-ownership | Verify NFT ownership | tokenID, ownerAddress, network |
transfer-nft | Transfer an NFT | privateKey, tokenID, to, network |
get-nft-collection | Get NFTs in a collection | address, network |
| Tool Name | Description | Key Parameters |
|---|---|---|
create-did | Create a DID | privateKey, data, network |
resolve-did | Resolve a DID | did, network |
update-did | Update a DID | privateKey, did, data, network |
deactivate-did | Deactivate a DID | privateKey, did, network |
| Tool Name | Description | Key Parameters |
|---|---|---|
amm-create | Create an AMM | privateKey, assets, network |
amm-deposit | Deposit to an AMM | privateKey, ammID, assets, network |
amm-bid | Place bid on an AMM | privateKey, ammID, bid, network |
amm-vote | Vote on AMM parameters | privateKey, ammID, vote, network |
amm-delete | Delete an AMM | privateKey, ammID, network |
amm-clawback | Clawback assets from AMM | privateKey, ammID, assets, network |
The server exposes XRPL data through the following MCP resource URIs:
| Resource URI Pattern | Description |
|---|---|
xrpl://{network}/ledger/current | Current ledger information |
xrpl://{network}/ledger/{ledger_index} | Ledger by index |
xrpl://{network}/account/{address} | Account information |
xrpl://{network}/account/{address}/balance | Account XRP balance |
xrpl://{network}/tx/{tx_hash} | Transaction details |
| Resource URI Pattern | Description |
|---|---|
xrpl://{network}/token/{currency}/{issuer} | Token information |
xrpl://{network}/token/{currency}/{issuer}/balanceOf/{address} | Token balance |
xrpl://{network}/nft/{tokenID} | NFT information |
xrpl://{network}/nft/{tokenID}/owner | NFT ownership information |
mcp-xrpl/
โโโ src/
โ โโโ core/ # Core utilities and services
โ โ โโโ constants.ts # XRPL network URLs and other constants
โ โ โโโ state.ts # State management for connected wallet
โ โ โโโ utils.ts # Helper functions
โ โ โโโ services/ # Service modules
โ โโโ server/ # MCP server implementation
โ โโโ transactions/ # XRPL transaction implementation
โ โ โโโ token/ # Token-related transactions
โ โ โโโ nft/ # NFT-related transactions
โ โ โโโ did/ # DID-related transactions
โ โ โโโ amm/ # AMM-related transactions
โ โ โโโ check/ # Check-related transactions
โ โ โโโ offer/ # Offer-related transactions
โ โ โโโ oracle/ # Oracle-related transactions
โ โ โโโ payment/ # Payment-related transactions
โ โ โโโ escrow/ # Escrow-related transactions
โ โ โโโ trust/ # Trust line-related transactions
โ โโโ index.ts # Entry point
โโโ build/ # Compiled JavaScript output
โโโ package.json
โโโ package-lock.json
โโโ tsconfig.json
To add a new tool:
src/transactions/server/server.jsserver.tool()src/index.ts@modelcontextprotocol/sdk: MCP SDKxrpl: XRP Ledger JavaScript/TypeScript APIdotenv: Environment variable managementzod: TypeScript-first schema declaration and validationThis project is licensed under the terms of the MIT License.
This software is provided for educational and development purposes only. Use it at your own risk. Always test thoroughly on the Testnet before using on Mainnet with real XRP.
Install via CLI
npx mdskills install RomThpt/mcp-xrplXRP Ledger Model Context Protocol Server is a free, open-source AI agent skill. License: MIT | XRPL Networks | TypeScript | xrpl.js A comprehensive Model Context Protocol (MCP) server that provides blockchain services for the XRP Ledger ecosystem. This server enables AI agents to interact with XRPL MainNet, TestNet, and DevNet with a unified interface. - Overview - Features - Supported Networks - Prerequisites - Installation - Server Configuration - API Reference
Install XRP Ledger Model Context Protocol Server with a single command:
npx mdskills install RomThpt/mcp-xrplThis downloads the skill files into your project and your AI agent picks them up automatically.
XRP Ledger Model Context Protocol Server works with Claude Code, Claude Desktop, Cursor, Vscode Copilot, Windsurf, Continue Dev, Gemini Cli, Amp, Roo Code, Goose. Skills use the open SKILL.md format which is compatible with any AI coding agent that reads markdown instructions.