XRPL Data Access
STDIOModel Context Protocol server providing AI models access to XRP Ledger data and functionality.
Model Context Protocol server providing AI models access to XRP Ledger data and functionality.
A Model Context Protocol (MCP) server that provides AI models with access to XRP Ledger data and functionality.
XRPL MCP Server acts as a bridge between large language models (LLMs) like Claude and GPT and the XRP Ledger. It enables AI models to retrieve account information from the XRP Ledger through a standardized API interface.
Clone this repository:
git clone https://github.com/lgcarrier/xrpl-mcp-server.git
cd xrpl-mcp-server
Create and activate a virtual environment:
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
Install dependencies:
pip install -r requirements.txt
pip install xrpl-mcp-server
The server uses the following environment variables:
XRPL_NODE_URL
- XRP Ledger node URL (defaults to "https://s1.ripple.com:51234/")Launch the server:
python -m xrpl_mcp_server
xrpl-mcp-server
Install the MCP:
mcp install xrpl-mcp-server
The XRPL tools will be available to Claude, allowing you to ask for XRP Ledger account information.
Retrieves information about an XRP Ledger account.
Parameters:
address
(string): The XRP Ledger account address (starts with "r")Returns:
Retrieves trust lines for an XRP Ledger account.
Parameters:
address
(string): The XRP Ledger account address (starts with "r")peer
(string, optional): Address of a counterparty account to filter resultslimit
(integer, optional): Limit for the number of trust lines returnedReturns:
Retrieves NFTs owned by an XRP Ledger account.
Parameters:
address
(string): The XRP Ledger account address (starts with "r")limit
(integer, optional): Limit for the number of NFTs returnedReturns:
Retrieves transaction history for an XRP Ledger account.
Parameters:
address
(string): The XRP Ledger account address (starts with "r")limit
(integer, optional): Limit for the number of transactions returnedbinary
(boolean, optional): Flag to return transactions in binary format (default False)forward
(boolean, optional): Flag to search forward in ledger history (default False)Returns:
Retrieves information about the connected XRP Ledger server.
Parameters:
Returns:
Submits a signed transaction blob to the XRP Ledger.
Parameters:
tx_blob
(string): The signed transaction blob in hexadecimal formatReturns:
Retrieves information about a specific transaction.
Parameters:
transaction_hash
(string): The hash of the transactionReturns:
Retrieves order book offers for a currency pair on the DEX.
Parameters:
taker_gets
(object): Currency the taker wants to receive, e.g., {"currency": "XRP"}
or {"currency": "USD", "issuer": "r..."}
taker_pays
(object): Currency the taker wants to pay, e.g., {"currency": "EUR", "issuer": "r..."}
or {"currency": "XRP"}
limit
(integer, optional): Limit for the number of offers returnedReturns:
Ask Claude:
What is the balance of the XRP account rPT1Sjq2YGrBMTttX4GZHjKu9dyfzbpAYe?
Claude can then use the get_account_info
tool to fetch this information directly from the XRP Ledger.
Example response:
Account: rPT1Sjq2YGrBMTttX4GZHjKu9dyfzbpAYe
XRP Balance: 25.5
Sequence: 123456
Here's another example:
What NFTs does account rPT1Sjq2YGrBMTttX4GZHjKu9dyfzbpAYe own?
Claude can use the get_account_nfts
tool to retrieve this information.
See the memory-bank
directory for detailed documentation about architecture, coding rules, and implementation plans.
To set up the development environment:
pip install -e ".[dev]"
MIT License