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.
- Read —
get_pricing,get_balance,preview_*,list_*(work with any key). - Write (spends TRX) —
buy_energy,create_auto_refill,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.
Recommended setup for agents
Section titled “Recommended setup for agents”- Create a dedicated API key from the dashboard with the least scope the
agent needs (
readfor monitoring,purchaseto act). - Set a daily spend limit appropriate to the task.
- Point your MCP client at the server (remote or stdio, see below) using that key. Rotate or revoke it anytime from the dashboard.
Transport
Section titled “Transport”Remote (recommended) — https://mcp.trongas.ai/mcp
Section titled “Remote (recommended) — https://mcp.trongas.ai/mcp”No install needed. Add it as a remote MCP server in your client and authenticate 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.
Note 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.
stdio (local)
Section titled “stdio (local)”Install the package and run it as a local process (e.g. Claude Desktop config):
npm install && npm run buildnode dist/index.jsConfigure via env vars: TRONGASAI_API_KEY (your key) and optionally TRONGASAI_API_URL (defaults to
https://trongas.ai/api/v1).