xrpl-mcp-service
An MCP server implementation for interacting with the XRP Ledger blockchain
Documentation
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 details
- `xrpl_account_balances` - XRP and token balances (human-readable)
- `xrpl_account_lines` - Trust lines
- `xrpl_account_offers` - Active trading offers
- `xrpl_account_nfts` - NFT holdings
- `xrpl_account_tx` - Transaction history
Decentralized Exchange
- `xrpl_order_book` - View order book for currency pairs
- `xrpl_market_price` - Get current market prices
- `xrpl_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 lines
- `xrpl_remove_trust_line` - Remove existing trust lines
- `xrpl_payment_channels` - Payment channel information
- `xrpl_find_path` - Payment path finding
- `xrpl_deposit_auth` - Check payment authorization
System
- `xrpl_server_info` - Node status and information
- `xrpl_submit_tx` - Submit signed transactions
Setup
1. Create a `.env` file:
XRPL_NODE_URL=https://xrplcluster.com2. Install dependencies:
pip install xrpl-py fastapi uvicorn python-dotenv3. Run the server:
uvicorn main:app --host 0.0.0.0 --port 8000 --reloadAPI Usage Examples
Get Account Info
POST /call-tool/xrpl_account_info
{
"account": "rsuUjfWxrACCAwGQDsNeZUhpzXf1n1NK5Z"
}Get Account Balances
POST /call-tool/xrpl_account_balances
{
"account": "rsuUjfWxrACCAwGQDsNeZUhpzXf1n1NK5Z"
}Set Trust Line
POST /call-tool/xrpl_set_trust_line
{
"wallet_seed": "sXXXXXXXXXXXXXXXXXXXX",
"currency": "USD",
"issuer": "rvYAfWj5gh67oV6fW32ZzP3Aw4Eubs59B",
"limit": "1000"
}Get AMM Info
POST /call-tool/xrpl_amm_info
{
"asset": {
"currency": "XRP"
},
"asset2": {
"currency": "USD",
"issuer": "rvYAfWj5gh67oV6fW32ZzP3Aw4Eubs59B"
}
}Get Market Price
POST /call-tool/xrpl_market_price
{
"base_currency": {
"currency": "XRP"
},
"quote_currency": {
"currency": "USD",
"issuer": "rvYAfWj5gh67oV6fW32ZzP3Aw4Eubs59B"
}
}Project Structure
├── main.py # FastAPI application entry point
├── tools/
│ ├── __init__.py
│ ├── register_tools.py # Tool registration
│ └── xrpl_tools.py # XRPL endpoint implementationsKey Components
1. xrpl_tools.py
2. register_tools.py
Future Enhancements
1. AMM (Liquidity Pool) Operations
2. Advanced Trading
3. NFT Operations
Common Issues
1. Async Event Loop: If you see "asyncio.run() cannot be called from a running event loop", check the async implementation in xrpl_tools.py
2. Rate Limiting: Consider implementing rate limiting for production use
Contributing
1. Fork the repository
2. Create a feature branch
3. Implement your changes
4. 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
Frequently asked questions
What is xrpl-mcp-service?
xrpl-mcp-service is An MCP server implementation for interacting with the XRP Ledger blockchain
How do I install xrpl-mcp-service?
Open the GitHub repository and follow its README. Most MCP servers are added to your client's MCP config, then called by your agent.
Is xrpl-mcp-service open source?
Yes — it is hosted on GitHub at https://github.com/tedlikeskix/xrpl-mcp-service and has 3 stars.
Related MCP tools
🙌 OpenHands: Code Less, Make More for the Model Context Protocol. Enhance AI assistants with powerful integrations. Python-based implementation.
Universal memory layer for AI Agents; Announcing OpenMemory MCP - local and secure memory management. Python-based implementation.
基于大模型搭建的聊天机器人,同时支持 微信公众号、企业微信应用、飞书、钉钉 等接入,可选择ChatGPT/Claude/DeepSeek/文心一言/讯飞星火/通义千问/ Gemini/GLM-4/Kimi/LinkAI,能处理文本、语音和图片,访问操作系统和互联网,支持基于自有知识库进行定制企业智能客服。
An LLM agent that conducts deep research (local and web) on any given topic and generates a long report with citations. Built for the Model Context Protocol to
🚀 The fast, Pythonic way to build MCP servers and clients Trusted by 19900+ developers. Trusted by 19900+ developers. Trusted by 19900+ developers.
🔥 MaxKB is an open-source platform for building enterprise-grade agents. MaxKB 是强大易用的开源企业级智能体平台。 for the Model Context Protocol. Enhance AI assistants with po
Run your own MCP server? See who uses it and what to fix.
Measure it with TrackMCP