MCP server
Это содержимое пока не доступно на вашем языке.
TronGasAi ships an MCP server — a thin wrapper over the API that exposes actions as tools an AI assistant (e.g. Claude Desktop) can call. It authenticates with an API key, so everything is bounded by that key’s scope and daily spend limit.
- Start here —
whoami(checks the key, shows its scope and daily limit),get_balance,get_deposit_address(where to top up),get_order_options/get_automation_options(current limits and durations). - Read —
get_pricing,preview_order,preview_refill_cost,list_orders,get_order,list_automations(work with any key). - Write (spends TRX) —
buy_energy,create_auto_refill,create_auto_renewal,enable_smart,pause_automation/resume_automation/cancel_automation(need apurchaseorfullkey).
Each write tool is labelled with the scope it needs. A read-only key lets an agent monitor an account with
no ability to spend; add a daily spend limit to cap a purchase key. buy_energy takes an optional
idempotencyKey: pass the same value when retrying a purchase and you get the original order, not a second
charge. Orders settle asynchronously — after buy_energy, poll get_order until the status is Filled.
The server also sends the agent a short set of instructions on connect (check the key, check the balance, preview before spending), so a fresh agent follows the safe order without being told.
Recommended setup for agents
Section titled “Recommended setup for agents”- Create a dedicated API key in the dashboard with the least scope the
agent needs (
readis the default; choosepurchaseto let it act). - Set a daily spend limit appropriate to the task.
- Connect your MCP client to the remote server below using that key. Rotate or revoke it anytime from the dashboard.
The dashboard shows a ready-made prompt, MCP config and Claude Code command right after you create a key.
Connect
Section titled “Connect”Remote MCP server (Streamable HTTP, nothing to install):
https://mcp.trongas.ai/mcpAuthenticate with a request header — either Authorization: Bearer <your-api-key> or X-Api-Key: <your-api-key>.
The server is stateless: it doesn’t store your key, it reads it fresh from the header on every call. A wrong or
revoked key is rejected with 401 when the client connects.
Examples:
# Claude Codeclaude mcp add --transport http trongasai https://mcp.trongas.ai/mcp --header "X-Api-Key: tgk_..."{ "mcpServers": { "trongasai": { "url": "https://mcp.trongas.ai/mcp", "headers": { "X-Api-Key": "tgk_..." } } }}This is header-based auth, not an OAuth “connect” flow — your MCP client needs to support sending a custom header, not just a one-click account link. If it can’t, use the REST API directly.