XRPL MCP Service

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.

tedlikeskix

Remote Shell Execution
Database Interaction
Visit Server

README

XRPL MCP Service

smithery badge

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.com
  1. Install dependencies:
pip install xrpl-py fastapi uvicorn python-dotenv
  1. Run the server:
uvicorn main:app --host 0.0.0.0 --port 8000 --reload

API 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 implementations

Key Components

  1. xrpl_tools.py

    • Core XRPL interaction functions
    • Async implementation with event loop handling
    • Error handling and response formatting
  2. register_tools.py

    • MCP tool registration
    • Endpoint mapping and configuration

Future Enhancements

  1. AMM (Liquidity Pool) Operations

    • Create pools
    • Add/remove liquidity
    • Vote on pool parameters
  2. Advanced Trading

    • Create/cancel offers
    • Automated trading functions
    • Price alerts
  3. NFT Operations

    • Mint NFTs
    • Create/accept offers
    • Collection management

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

Recommended Servers

E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
AIO-MCP Server

AIO-MCP Server

🚀 All-in-one MCP server with AI search, RAG, and multi-service integrations (GitLab/Jira/Confluence/YouTube) for AI-enhanced development workflows. Folk from

Featured
Local
Persistent Knowledge Graph

Persistent Knowledge Graph

An implementation of persistent memory for Claude using a local knowledge graph, allowing the AI to remember information about users across conversations with customizable storage location.

Featured
Local
Hyperbrowser MCP Server

Hyperbrowser MCP Server

Welcome to Hyperbrowser, the Internet for AI. Hyperbrowser is the next-generation platform empowering AI agents and enabling effortless, scalable browser automation. Built specifically for AI developers, it eliminates the headaches of local infrastructure and performance bottlenecks, allowing you to

Featured
Local
React MCP

React MCP

react-mcp integrates with Claude Desktop, enabling the creation and modification of React apps based on user prompts

Featured
Local
Any OpenAI Compatible API Integrations

Any OpenAI Compatible API Integrations

Integrate Claude with Any OpenAI SDK Compatible Chat Completion API - OpenAI, Perplexity, Groq, xAI, PyroPrompts and more.

Featured
Exa MCP

Exa MCP

A Model Context Protocol server that enables AI assistants like Claude to perform real-time web searches using the Exa AI Search API in a safe and controlled manner.

Featured
BigQuery

BigQuery

This is a server that lets your LLMs (like Claude) talk directly to your BigQuery data! Think of it as a friendly translator that sits between your AI assistant and your database, making sure they can chat securely and efficiently.

Featured