Model Context Protocol (MCP) server that exposes XRP Ledger (MainNet/TestNet/DevNet) functionality to AI agents through a unified set of MCP tools and resources.
https://github.com/RomThpt/mcp-xrplYour AI agents can now interact with one of the world's most efficient blockchains directly through MCP. No more building custom bridges or wrestling with blockchain APIs - this server handles XRP Ledger operations through the familiar Model Context Protocol interface.
Building AI agents that can handle blockchain operations typically means:
This MCP server eliminates that entire development cycle. Your agents get full XRPL functionality through standard MCP tools and resources.
Complete Transaction Coverage: Transfer XRP, manage tokens, mint NFTs, create AMMs, handle escrows, manage payment channels, and work with DIDs. Over 30 transaction types ready to use.
Multi-Network Support: Switch between MainNet, TestNet, and DevNet without code changes. Perfect for development workflows that need to test on TestNet before production deployment.
Resource-Based Data Access: Query account balances, transaction history, token metadata, and NFT information through clean MCP resource URIs like xrpl://testnet/account/{address}/balance.
Production-Ready Architecture: Built with TypeScript, comprehensive error handling, and modular transaction handlers. The codebase is structured for reliability and extensibility.
DeFi Portfolio Management: Build agents that monitor token balances across multiple accounts, execute swaps through AMMs, and manage trustlines automatically.
NFT Collection Tools: Create agents that mint NFT collections, verify ownership, and handle transfers. Perfect for artists or businesses managing digital assets on XRPL.
Payment Automation: Set up agents that handle recurring XRP payments, manage escrows for contract fulfillment, or operate payment channels for microtransactions.
Cross-Border Remittance: Develop agents that optimize currency exchanges through XRPL's built-in DEX, handling the complexity of order books and pathfinding.
git clone https://github.com/RomThpt/mcp-xrpl.git
cd mcp-xrpl
npm install && npm run build
# Optional: Set up your environment
echo "XRPL_NETWORK=testnet" > .env
echo "DEFAULT_SEED=your_test_wallet_seed" >> .env
npm start
Your MCP client can now connect and immediately start using XRPL functionality. Try connect-to-xrpl to establish a connection, then get-account-info to verify everything works.
Token Transfer Through MCP:
// Your agent can now do this through MCP tools:
await mcpClient.useTool('transfer-token', {
privateKey: wallet.privateKey,
tokenAddress: 'rUSDToken123...',
to: 'rDestination456...',
amount: '100.50',
network: 'testnet'
});
NFT Minting:
await mcpClient.useTool('nft-mint', {
privateKey: wallet.privateKey,
uri: 'https://metadata.example.com/token/1',
flags: 8, // transferable
network: 'testnet'
});
AMM Operations:
await mcpClient.useTool('amm-create', {
privateKey: wallet.privateKey,
assets: [
{ currency: 'XRP' },
{ currency: 'USD', issuer: 'rUSDIssuer...' }
],
network: 'testnet'
});
Instead of each AI project implementing XRPL integration separately, you get a centralized, well-tested server that handles all the blockchain complexity. Your agents focus on business logic while this server manages:
The modular structure makes extending functionality straightforward. Each transaction type lives in its own module under src/transactions/, making it easy to add custom operations or modify existing ones.
The server automatically exposes new tools through MCP's discovery mechanism, so your agents can dynamically learn about available capabilities.
Start with TestNet for development, then switch to MainNet by changing a single environment variable. The same code works across all XRPL networks.
This server transforms XRPL from a complex blockchain API into a simple set of MCP tools your agents can use immediately. Whether you're building DeFi automation, NFT management, or payment processing systems, your development time just got significantly shorter.