What is MCP?
Model Context Protocol (MCP) is an open standard that lets AI agents (Claude Code, Cursor, Windsurf, and others) interact with external services through a unified interface. TronRental provides an official MCP server that gives AI agents full access to the energy purchasing API — from checking prices to completing purchases.Quick Start
Add to your AI agent:Claude Code
Cursor / Windsurf
Add to your MCP configuration:TRONRENTAL_API_KEY environment variable is optional. If not provided, the agent can register a new account and create an API key through the MCP tools. The agent asks for your email: TronRental mails a 6-digit code there, and the account is created only after you give that code to the agent.
Available Tools
The MCP server provides 12 tools:Typical Flow
New user (no API key)
get_prices— show current pricingcalculate_savings— calculate savings for user’s transfer volumeregister— the user’s real email and a password; a 6-digit code is mailed there- The user reads the code from the email and gives it to the agent
verify_email_code— creates the account and signs increate_api_key— generate API keyget_deposit_address— get deposit address, user sends TRXget_balance— verify deposit arrivedbuy_energy— purchase energyget_order— confirm delegation
The agent never invents an email address: without a code from a real inbox no account is created. The code is valid for 10 minutes;
resend_email_code sends a new one (up to 3 emails per hour). The same steps over plain HTTP are described in Authentication.Existing user (API key set)
get_balance— check balancebuy_energy— purchase energyget_order— confirm delegation
Energy Amounts
Duration is always
1h — energy is used within seconds, 1 hour is the rental window.
Links
- npm: @tronrental-com/mcp-server
- GitHub: tronrentalcom/tronrental-com-mcp
- MCP Registry:
io.github.tronrental-com/tronrental