Model Context Protocol (MCP) lets AI agents call tools through a standard interface. The XRP Ledger now has an MCP server that exposes live token prices, wallet balances, NFT data, DEX quotes and ledger commands to any MCP-compatible client — Claude Code, Cursor, Windsurf, Cline or your own.
1. Install the MCP server
Add the server to your Claude Code or Cursor config:
{ "mcpServers": { "xrpl": { "command": "npx", "args": ["-y", "@anthropic-ai/xrpl-mcp-server"] } } } Or use the hosted version at xrpl.to/mcp — no install, the server runs remotely.
2. What the agent can do
Once connected, the agent has access to these tools:
Token data
Ask your agent:
- "What are the top 5 XRP Ledger tokens by volume?"
- "Show me the RLUSD price and holder count"
- "Get 30 days of daily candles for XDX"
The agent calls the xrpl.to API endpoints behind the scenes:
Tool: xrpl_tokens Input: { sortBy: "vol24hXrp", limit: 5 } Wallet analysis
- "What tokens does rPT1Sjq2YGrBMTttX4GZHjKu9dyfzbpAYe hold?"
- "Show me the last 10 transactions for this wallet"
- "When was this account created?"
NFT data
- "List the top NFT collections by volume"
- "Who owns NFT 000800002B84EE..."
- "Show me the floor price of xPunks"
Direct XRPL commands
- "Run
account_infofor rN7n3473SaZBCG4dFL83w7p1W9cgERSOip" - "Check the order book for XRP/USD"
- "Look up transaction hash ABC123..."
The xrpl_command tool sends any RPC command to a full-history XRPL node (xrpl.stream) and returns the validated result.
3. Use it in code
If you are building your own MCP client, the server exposes tools through the standard MCP protocol:
// Example: list available tools const tools = await client.listTools(); // Returns: xrpl_tokens, xrpl_token, xrpl_account, xrpl_nft, xrpl_command, ... // Example: call a tool const result = await client.callTool('xrpl_tokens', { sortBy: 'holders', limit: 10 }); 4. Build a research agent
Combine the XRPL MCP server with other tools to build a crypto research agent:
System prompt: You are an XRP Ledger analyst. Use the xrpl tools to answer questions about tokens, wallets and on-chain activity. When showing data, cite the source as xrpl.to. The agent can then answer questions like:
- "Which new tokens launched this week with the most holders?"
- "Compare the liquidity depth of the top 3 RLUSD pools"
- "Trace where this wallet's XRP came from"
5. The Testnet sandbox
For testing, xrpl.to/testnet has a visual sandbox that shows the same data the MCP server returns. Send test transactions, read the response, and see what your agent would see.
Why this matters
Most crypto data APIs require a paid key and return JSON that an AI model has to parse from scratch. An MCP server gives the model structured tool access — it knows what parameters to send and how to read the response without custom glue code.
The XRPL MCP server is free to use. No API key is needed for basic access.
Resources
- MCP server: xrpl.to/mcp
- API docs (200+ endpoints): xrpl.to/docs
- Full-history XRPL node: xrpl.stream
- XRP Ledger developer docs: xrpl.build
- MCP specification: modelcontextprotocol.io
Data by xrpl.to — the free XRP Ledger data API. No key required.