Docs menu

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.

AddressNetworkAccess
https://mcp.tenergy.memainnetsign in, or an ak_live_ key
https://mcp.tenergy.me/nileNile testnetsign in to the Nile dashboard, or an ak_test_ key
https://mcp.tenergy.me/publicmainnetopen, without an account: price and chain tools only
https://mcp.tenergy.me/nile/publicNile testnetopen, without an account: price and chain tools only

Connect

Claude app or claude.ai

  1. Open Settings → Connectors → Add → Add custom connector.
  2. Name it TEnergy and paste the URL https://mcp.tenergy.me (Nile testnet: https://mcp.tenergy.me/nile). Leave the authentication setting as Claude detects it — “Sign in now”.
  3. Press Add. Claude first shows its own page “Finish connecting the connector?” — press Continue.
  4. 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

ToolNeeds an accountWhat it does
get_prices, get_address_resourcesNoPrice table; a receiver’s energy and bandwidth
get_address_usageNoWhat an address used and burned on its own transactions over 7 or 30 days, per day
get_market, get_market_summary, get_price_historyNoProviders’ live prices, the day’s summary, price history
get_chain_parameters, get_energy_fee_historyNoNetwork energy fee and its history
estimate_contract_call, suggest_order_size, calculate_savingsNoEnergy for a contract call, order size for a batch, savings against burning TRX
explain_conceptNoEnergy, bandwidth, delegation and other terms
get_x402_quoteNoMainnet: 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_transferYesCost of one USDT transfer to a receiver
get_accountYesThe account this connection acts for: Account ID (acc_…) and display name
get_balance, get_deposit_addressesYesPrepaid balance (with the account’s ID and display name); where to top it up
create_quote, create_orderYes (spending scopes)Pin a price for 120 s; buy it
get_order, list_ordersYesStatus 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:

FieldMeaning
pay_to, network, chain, assetThe published 1-hour payment address; TRON mainnet (or Nile on the Nile API); TRX
price_sun_per_unit, fee_bpsPrice per unit of energy, service fee included; price_steps gives it by size
min_amount, max_amountWhat one transfer can buy now
rulesEnergy = 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
transactionOnly when the request body has payer (and amount or amount_sun, optional receiver): an unsigned transfer to sign and broadcast as is
status_urlGET /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[].

FieldValue
scheme, networkexact, eip155:8453 (Base)
assetUSDC 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913 (EIP-3009)
amountUSDC (6 decimals) for that energy amount, service fee included
maxTimeoutSeconds120: retry with the signature within this time
extra.intentIdStatus: 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

RuleWhy
The key is read only from the Authorization header, per requestIt is never stored on the server and never shown to the model
create_order requires max_price_sun and client_order_idA price ceiling and an idempotency key on every purchase
Orders above 50 TRX are refused before any chargeA confused agent cannot drain the balance in one call
Give the key only the scopes the agent needs; there is no default setSee Authentication
Rehearse on Nile first (/nile, an ak_test_ key)Environments lists what Nile cannot prove

    ↑ ↓ to move · Enter to open · Esc to close