xrpl-mcp-service
by tedlikeskix
remote-capable server
The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.
XRPL MCP Service
A Model Context Protocol (MCP) server providing comprehensive access to the XRP Ledger (XRPL). This service enables AI models to interact with XRPL through standardized endpoints.
Features
Account Information
xrpl_account_info
- Basic account detailsxrpl_account_balances
- XRP and token balances (human-readable)xrpl_account_lines
- Trust linesxrpl_account_offers
- Active trading offersxrpl_account_nfts
- NFT holdingsxrpl_account_tx
- Transaction history
Decentralized Exchange
xrpl_order_book
- View order book for currency pairsxrpl_market_price
- Get current market pricesxrpl_amm_info
- Automated Market Maker information
NFT Operations
xrpl_nft_offers
- View NFT buy/sell offers
Trust Lines & Payments
xrpl_set_trust_line
- Establish new trust linesxrpl_remove_trust_line
- Remove existing trust linesxrpl_payment_channels
- Payment channel informationxrpl_find_path
- Payment path findingxrpl_deposit_auth
- Check payment authorization
System
xrpl_server_info
- Node status and informationxrpl_submit_tx
- Submit signed transactions
Setup
- Create a
.env
file:
Copy
- Install dependencies:
Copy
- Run the server:
Copy
API Usage Examples
Get Account Info
Copy
Get Account Balances
Copy
Set Trust Line
Copy
Get AMM Info
Copy
Get Market Price
Copy
Project Structure
Copy
Key Components
- xrpl_tools.py
- Core XRPL interaction functions
- Async implementation with event loop handling
- Error handling and response formatting
- register_tools.py
- MCP tool registration
- Endpoint mapping and configuration
Future Enhancements
- AMM (Liquidity Pool) Operations
- Create pools
- Add/remove liquidity
- Vote on pool parameters
- Advanced Trading
- Create/cancel offers
- Automated trading functions
- Price alerts
- NFT Operations
- Mint NFTs
- Create/accept offers
- Collection management
Common Issues
- Async Event Loop: If you see "asyncio.run() cannot be called from a running event loop", check the async implementation in xrpl_tools.py
- Rate Limiting: Consider implementing rate limiting for production use
Contributing
- Fork the repository
- Create a feature branch
- Implement your changes
- Submit a pull request
Important Notes
- Always use "validated" ledger for production
- Secure wallet seeds and private keys
- Monitor transaction fees
- Test thoroughly on testnet first
Resources
License
MIT
This server cannot be installed
A Model Context Protocol (MCP) server providing comprehensive access to the XRP Ledger (XRPL). This service enables AI models to interact with XRPL through standardized endpoints.