MCP server
TEnergy runs a Model Context Protocol server at https://mcp.tenergy.me (Streamable HTTP). On connect it asks you to sign in to TEnergy (the first sign-in creates the account) and to approve what the agent may do and how much it may spend; then the agent sees your balance, quotes and orders energy. To browse prices and the market without an account, use https://mcp.tenergy.me/public.
| Address | Network | Access |
|---|---|---|
https://mcp.tenergy.me | mainnet | sign in, or an ak_live_ key |
https://mcp.tenergy.me/nile | Nile testnet | sign in to the Nile dashboard, or an ak_test_ key |
https://mcp.tenergy.me/public | mainnet | open, without an account: price and chain tools only |
https://mcp.tenergy.me/nile/public | Nile testnet | open, without an account: price and chain tools only |
Connect
Claude app or claude.ai
- Open Settings → Connectors → Add → Add custom connector.
- Name it
TEnergyand paste the URLhttps://mcp.tenergy.me(Nile testnet:https://mcp.tenergy.me/nile). Leave the authentication setting as Claude detects it — “Sign in now”. - Press Add. Claude first shows its own page “Finish connecting the connector?” — press Continue.
- Sign in to TEnergy (the first sign-in creates the account), choose the permissions and spend limits, press Allow.
You can change the limits or revoke the access at any time in the dashboard, under Connected agents.
Claude Code in a terminal
Needs the Claude Code command-line tool installed; in the Claude desktop app use the steps above instead.
claude mcp add --transport http tenergy https://mcp.tenergy.me
Then type /mcp in Claude Code and choose Authenticate.
Other clients that support sign-in
Add a custom connector (or MCP server) with the URL https://mcp.tenergy.me; the client opens the same TEnergy sign-in page.
With an API key instead of signing in
Clients that send headers can pass a key: Authorization: ApiKey <key>:<secret>. The server signs each call with that key, and the key never reaches the model.
Claude Code:
claude mcp add --transport http tenergy https://mcp.tenergy.me/ --header "Authorization: ApiKey ak_live_...:..."
Cursor — mcp.json:
{"mcpServers":{"tenergy":{"url":"https://mcp.tenergy.me/","headers":{"Authorization":"ApiKey ak_live_...:..."}}}}
VS Code — .vscode/mcp.json:
{"servers":{"tenergy":{"type":"http","url":"https://mcp.tenergy.me/","headers":{"Authorization":"ApiKey ak_live_...:..."}}}}
Tools
| Tool | Needs an account | What it does |
|---|---|---|
get_prices, get_address_resources | No | Price table; a receiver’s energy and bandwidth |
get_address_usage | No | What an address used and burned on its own transactions over 7 or 30 days, per day |
get_market, get_market_summary, get_price_history | No | Providers’ live prices, the day’s summary, price history |
get_chain_parameters, get_energy_fee_history | No | Network energy fee and its history |
estimate_contract_call, suggest_order_size, calculate_savings | No | Energy for a contract call, order size for a batch, savings against burning TRX |
explain_concept | No | Energy, bandwidth, delegation and other terms |
get_x402_quote | No | Mainnet: a payable x402 quote in USDC on Base for energy to a TRON address; your own x402 client pays it, the tool signs nothing |
estimate_transfer | Yes | Cost of one USDT transfer to a receiver |
get_account | Yes | The account this connection acts for: Account ID (acc_…) and display name |
get_balance, get_deposit_addresses | Yes | Prepaid balance (with the account’s ID and display name); where to top it up |
create_quote, create_order | Yes (spending scopes) | Pin a price for 120 s; buy it |
get_order, list_orders | Yes | Status and history |
Prompts: cheapest_energy_for_transfer, size_batch_order, explain_failed_transaction. Resources: tenergy://docs/quickstart, tenergy://llms.txt, tenergy://facts/energy.
Pay without an account (HTTP 402, TRX)
An agent with no key can still buy energy. POST https://api.tenergy.me/v1/orders without credentials answers HTTP 402 with a JSON body (protocol: "tenergy-trx-transfer", version: 1) that says how to pay with an ordinary TRX transfer:
| Field | Meaning |
|---|---|
pay_to, network, chain, asset | The published 1-hour payment address; TRON mainnet (or Nile on the Nile API); TRX |
price_sun_per_unit, fee_bps | Price per unit of energy, service fee included; price_steps gives it by size |
min_amount, max_amount | What one transfer can buy now |
rules | Energy = TRX sent ÷ price at arrival, rounded down; receiver = the sender, or the address in the memo; a payment below the minimum and any remainder are not refunded |
transaction | Only when the request body has payer (and amount or amount_sun, optional receiver): an unsigned transfer to sign and broadcast as is |
status_url | GET /v1/transfers/{txid}: awaiting_transfer, pending, order (with the order’s status), no_order, not_ours |
This TRX offer is not x402 (x402 has no TRON or TRX scheme). A request that carries any credential is checked as before and never gets this 402.
Pay with USDC on Base (x402)
Agents that hold USDC on Base can pay with standard x402 v2 instead. Send amount and receiver with the anonymous POST /v1/orders, or call GET https://tenergy.me/x402?amount=65000&receiver=T...: the 402 then carries a PAYMENT-REQUIRED header and accepts[].
| Field | Value |
|---|---|
scheme, network | exact, eip155:8453 (Base) |
asset | USDC 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913 (EIP-3009) |
amount | USDC (6 decimals) for that energy amount, service fee included |
maxTimeoutSeconds | 120: retry with the signature within this time |
extra.intentId | Status: GET /v1/x402/intents/{id} |
Retry the same request with the PAYMENT-SIGNATURE header (any x402 client does this). We settle through the Coinbase facilitator, place the order for receiver and answer with the order and a PAYMENT-RESPONSE header. Without receiver the price is indicative only. Energy for 1 hour; one payment buys within the min_amount–max_amount of the TRX offer.
Safety rules
| Rule | Why |
|---|---|
The key is read only from the Authorization header, per request | It is never stored on the server and never shown to the model |
create_order requires max_price_sun and client_order_id | A price ceiling and an idempotency key on every purchase |
| Orders above 50 TRX are refused before any charge | A confused agent cannot drain the balance in one call |
| Give the key only the scopes the agent needs; there is no default set | See Authentication |
Rehearse on Nile first (/nile, an ak_test_ key) | Environments lists what Nile cannot prove |