MCP API

TronGrid MCP Server Guide

1. Introduction

TronGrid MCP Server is a service based on the Model Context Protocol (MCP) that exposes the query and operation capabilities on TRON blockchain as standardized MCP tools. This enables AI clients (such as Claude, Cursor, custom Agents, etc.) to directly interact with TRON network.

2. Quick Start

MCP Service URL

EnvironmentURL
Productionhttps://mcp.trongrid.io/mcp

Protocol

  • MCP Protocol Version: 2025-11-25
  • Transport Protocol: Streamable HTTP

3. Client Configuration

3.1 Claude Desktop

Edit the configuration file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
{
  "mcpServers": {
    "trongrid": {
      "command": "npx",
      "args": [
        "mcp-remote",
        "https://mcp.trongrid.io/mcp"
      ]
    }
  }
}

To pass an API Key:

{
  "mcpServers": {
    "trongrid": {
      "command": "npx",
      "args": [
        "mcp-remote",
        "https://mcp.trongrid.io/mcp",
        "--header",
        "TRON-PRO-API-KEY:<your-api-key>"
      ]
    }
  }
}

3.2 Claude Code

Option 1: CLI Command

claude mcp add --transport http trongrid https://mcp.trongrid.io/mcp

Option 2: Project Configuration File

Create .mcp.json in the project root directory:

{
  "mcpServers": {
    "trongrid": {
      "type": "http",
      "url": "https://mcp.trongrid.io/mcp"
    }
  }
}

4. MCP Protocol Basics

MCP uses Streamable HTTP for transport, with all communication performed via the POST /mcp endpoint. The protocol is stateful and requires a sequential handshake:

┌──────────┐                      ┌──────────┐
│  Client  │                      │  Server  │
└────┬─────┘                      └────┬─────┘
     │  1. initialize                  │
     │ ──────────────────────────────► │
     │ ◄── mcp-session-id ──────────── │
     │                                 │
     │  2. notifications/initialized   │
     │ ──────────────────────────────► │
     │ ◄── 202 Accepted ────────────── │
     │                                 │
     │  3. tools/list                  │
     │ ──────────────────────────────► │
     │ ◄── tool list ───────────────── │
     │                                 │
     │  4. tools/call                  │
     │ ──────────────────────────────► │
     │ ◄── tool execution result ───── │
     └                                 ┘

All requests must carry the following headers:

HeaderValueDescription
Content-Typeapplication/jsonRequired
Acceptapplication/json, text/event-streamRequired
mcp-session-id<session-id>Required for requests after handshake completion

5. Manual Testing with curl

Step 1 — Initialization (Obtain Session ID)

curl -v -X POST https://mcp.trongrid.io/mcp \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -d '{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "initialize",
    "params": {
      "protocolVersion": "2026-03-06",
      "capabilities": {},
      "clientInfo": { "name": "curl-test", "version": "1.0" }
    }
  }'

Find the mcp-session-id in the response and save it for subsequent requests.

Step 2 — Send initialized Notification

curl -X POST https://mcp.trongrid.io/mcp \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -H "mcp-session-id: <your-session-id>" \
  -d '{
    "jsonrpc": "2.0",
    "method": "notifications/initialized",
    "params": {}
  }'

A return of 202 Accepted indicates success.

Step 3 — View Available Tools

curl -X POST https://mcp.trongrid.io/mcp \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -H "mcp-session-id: <your-session-id>" \
  -d '{"jsonrpc":"2.0","id":2,"method":"tools/list","params":{}}'

Step 4 — Call a Tool

Take querying block statistics as an example:

curl -X POST https://mcp.trongrid.io/mcp \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -H "mcp-session-id: <your-session-id>" \
  -d '{
    "jsonrpc": "2.0",
    "id": 3,
    "method": "tools/call",
    "params": {
      "name": "getBlockStatistics",
      "arguments": { "blockNum": 68000000 }
    }
  }'

6. Available Tool Categories

The server exposes a total of 149 MCP tools, covering major queries and operations on the TRON network:

6.1 HTTP REST API Query Tools (18 tools)

Query on-chain data through the TronGrid REST API.

Blocks (1)

Tool NameDescription
getBlockStatisticsGet statistics for a specific TRON block by block number

Accounts (6)

Tool NameDescription
getAccountInfoGet account information for a TRON address
getAccountTransactionsGet recent transactions for a TRON account address
getAccountTrc20TransactionsGet TRC-20 token transfer history for a TRON account
getInternalTransactionsGet internal transactions for a TRON account address
getInternalTransactionsByTxIdGet internal transactions for a specific transaction ID
getTrc20BalanceGet TRC-20 token balances for a TRON account address

Assets (3)

Tool NameDescription
listAllAssetsList all TRC-10 assets (tokens) on the TRON blockchain
getAssetByNameGet TRC-10 assets by name
getAssetByIdentifierGet a TRC-10 asset by its numeric ID or issuer address

Contracts (3)

Tool NameDescription
getContractTransactionsGet transactions for a smart contract address
getContractInternalTransactionsGet internal transactions for a smart contract
getTrc20TokenHoldersGet TRC-20 token holder balances for a contract address

Events (4)

Tool NameDescription
getEventsByTransactionIdGet events emitted by a specific transaction
getEventsByContractAddressGet events emitted by a smart contract address
getEventsByBlockNumberGet events from a specific block number
getEventsByLatestBlockGet events from the latest block

TRC-20 Tokens (1)

Tool NameDescription
getTrc20InfoGet token info (name, symbol, decimals) for TRC-20/721/1155 tokens

6.2 Wallet Operation Tools (73 tools)

Full Node /wallet/* API endpoints for transaction creation & broadcast, account management, resource staking & delegation, smart contracts, Super Representatives, and governance proposals.

Address Validation & Transaction Broadcast (3)

Tool NameDescription
validateAddressValidate a TRON address format
broadcastTransactionBroadcast a signed transaction to the TRON network
broadcastHexBroadcast a signed hex-encoded transaction to TRON

Account Management (5)

Tool NameDescription
createAccountActivate an account on the TRON network
getAccountQuery account on-chain info (TRX balance, assets, staking)
updateAccountUpdate account name on TRON
accountPermissionUpdateUpdate account permissions
getApprovedListGet list of approved signers for a transaction

TRX Transfer (1)

Tool NameDescription
createTransactionCreate a TRX transfer transaction

Account Resource Queries (2)

Tool NameDescription
getAccountResourceGet account resource info (bandwidth, energy)
getAccountNetGet account bandwidth info

Resource Staking & Delegation — Stake 1.0 (4)

Tool NameDescription
freezeBalance[Deprecated] Stake TRX for bandwidth/energy (Stake 1.0)
unfreezeBalance[Deprecated] Unstake TRX (Stake 1.0)
getDelegatedResourceQuery resource delegation info
getDelegatedResourceAccountIndexQuery delegation index

Resource Staking & Delegation — Stake 2.0 (11)

Tool NameDescription
freezeBalanceV2Stake TRX for bandwidth/energy (Stake 2.0)
unfreezeBalanceV2Unstake TRX (Stake 2.0)
cancelAllUnfreezeV2Cancel all pending unstaking in Stake 2.0
delegateResourceDelegate bandwidth/energy to another account
unDelegateResourceUndelegate bandwidth/energy
withdrawExpireUnfreezeWithdraw expired unstaked TRX
getAvailableUnfreezeCountGet remaining unstaking slots
getCanWithdrawUnfreezeAmountGet withdrawable unstaked TRX amount
getCanDelegatedMaxSizeGet max delegatable resource amount
getDelegatedResourceV2Query Stake 2.0 delegation info
getDelegatedResourceAccountIndexV2Query Stake 2.0 delegation index

Block Queries (2)

Tool NameDescription
getBlockGet TRON block header or full block
getTransactionInfoByBlockNumGet all transaction info in a block

Transaction Queries (5)

Tool NameDescription
getTransactionByIdGet transaction info by ID
getTransactionInfoByIdGet transaction fee & receipt info by ID
getTransactionListFromPendingGet pending transaction IDs
getTransactionFromPendingGet a specific pending transaction
getPendingSizeGet pending transaction pool size

Network & Chain Parameters (5)

Tool NameDescription
listNodesList all TRON network nodes
getNodeInfoGet TRON node information
getChainParametersGet TRON chain parameters
getEnergyPricesGet historical energy prices
getBandwidthPricesGet historical bandwidth prices

Other Chain Queries (1)

Tool NameDescription
getBurnTrxGet total burned TRX amount

TRC-10 Asset Management (11)

Tool NameDescription
getAssetIssueByAccountGet TRC-10 assets issued by an account
getAssetIssueByIdGet TRC-10 asset by token ID
getAssetIssueByNameGet TRC-10 asset by name
getAssetIssueListGet all TRC-10 assets
getAssetIssueListByNameGet TRC-10 assets by name (list)
getPaginatedAssetIssueListGet TRC-10 assets with pagination
createAssetIssueIssue a new TRC-10 token
participateAssetIssueParticipate in a TRC-10 token issuance
transferAssetCreate a TRC-10 token transfer transaction
unfreezeAssetUnfreeze TRC-10 tokens
updateAssetUpdate TRC-10 token parameters

Smart Contracts (9)

Tool NameDescription
getContractGet smart contract bytecode and ABI
getContractInfoGet smart contract info including energy settings
triggerSmartContractTrigger a smart contract function call
triggerConstantContractPre-execute (simulate) a smart contract call
deployContractDeploy a new smart contract on TRON
updateSettingUpdate smart contract consume_user_resource_percent
updateEnergyLimitUpdate smart contract origin_energy_limit
clearAbiClear a smart contract's ABI
estimateEnergyEstimate energy required for a contract call

Super Representative (SR) Management (8)

Tool NameDescription
createWitnessApply to become a Super Representative candidate
updateWitnessUpdate Super Representative info
getBrokerageGet SR reward brokerage ratio
updateBrokerageUpdate SR reward brokerage ratio
voteWitnessAccountVote for Super Representatives
getRewardGet unclaimed voting rewards
withdrawBalanceWithdraw SR rewards
getNextMaintenanceTimeGet next TRON voting maintenance time

SR Listing (1)

Tool NameDescription
getPaginatedNowWitnessListGet paginated SR list

Governance Proposals (5)

Tool NameDescription
listProposalsList all TRON network proposals
getProposalByIdGet a specific proposal by ID
proposalCreateCreate a new network proposal
proposalApproveApprove a network proposal
proposalDeleteDelete a network proposal

6.3 WalletSolidity Read-Only Tools (25 tools)

Read data from the confirmed (irreversible) Solidity node, ensuring data finality. All tool names are prefixed with solidity.

Account (1)

Tool NameDescription
solidityGetAccountQuery account info from solidified node

Transaction Queries (4)

Tool NameDescription
solidityGetTransactionByIdGet confirmed transaction by ID
solidityGetTransactionInfoByIdGet confirmed transaction fee info by ID
solidityGetTransactionInfoByBlockNumGet confirmed transaction info in a block
solidityGetTransactionCountByBlockNumGet transaction count in a confirmed block

Block Queries (1)

Tool NameDescription
solidityGetBlockGet confirmed block header/full block

Resource Delegation Queries (7)

Tool NameDescription
solidityGetDelegatedResourceQuery delegation info from solidified node
solidityGetDelegatedResourceAccountIndexQuery delegation index from solidified node
solidityGetDelegatedResourceV2Query Stake 2.0 delegation from solidified node
solidityGetDelegatedResourceAccountIndexV2Query Stake 2.0 delegation index from solidified node
solidityGetCanDelegatedMaxSizeGet max delegatable amount from solidified node
solidityGetCanWithdrawUnfreezeAmountGet withdrawable amount from solidified node
solidityGetAvailableUnfreezeCountGet unstaking slots from solidified node

Node & Chain Info (2)

Tool NameDescription
solidityGetNodeInfoGet TRON solidified node information
solidityGetBurnTrxGet total burned TRX from solidified node

Smart Contracts (2)

Tool NameDescription
solidityTriggerConstantContractSimulate contract call on solidified state
solidityEstimateEnergyEstimate energy on solidified state

TRC-10 Asset Queries (5)

Tool NameDescription
solidityGetAssetIssueByIdGet TRC-10 asset by ID from solidified node
solidityGetAssetIssueByNameGet TRC-10 asset by name from solidified node
solidityGetAssetIssueListGet all TRC-10 assets from solidified node
solidityGetAssetIssueListByNameGet TRC-10 assets by name from solidified node
solidityGetPaginatedAssetIssueListGet paginated TRC-10 assets from solidified node

Super Representative Queries (3)

Tool NameDescription
solidityGetRewardGet unclaimed rewards from solidified node
solidityGetBrokerageGet SR brokerage from solidified node
solidityGetPaginatedNowWitnessListGet paginated SR list from solidified node

6.4 JSON-RPC Tools (33 tools)

Ethereum-compatible JSON-RPC API methods for developers transitioning from the Ethereum ecosystem.

Accounts & Balances (1)

Tool NameDescription
ethGetBalanceReturns balance of a TRON account

Block Operations (7)

Tool NameDescription
ethBlockNumberReturns the most recent TRON block number
ethGetBlockByHashGet TRON block by hash
ethGetBlockByNumberGet TRON block by number
ethGetBlockReceiptsGet all receipts for a TRON block
ethGetBlockTransactionCountByHashGet transaction count in a block by hash
ethGetBlockTransactionCountByNumberGet transaction count in a block by number
ethGetWorkReturns current TRON block hash

Transaction Operations (6)

Tool NameDescription
ethGetTransactionByHashGet TRON transaction by hash
ethGetTransactionByBlockHashAndIndexGet transaction by block hash and index
ethGetTransactionByBlockNumberAndIndexGet transaction by block number and index
ethGetTransactionReceiptGet TRON transaction receipt
ethCallExecute a read-only message call on TRON
buildTransactionBuild a TRON transaction (TRX transfer, TRC-20, contract call)

Contracts & Storage (4)

Tool NameDescription
ethGetCodeGet contract bytecode at a TRON address
ethGetStorageAtGet storage value at a TRON contract address
ethEstimateGasEstimate energy consumption for a TRON transaction
ethGasPriceReturns current energy price in sun

Filters & Logs (6)

Tool NameDescription
ethNewFilterCreate a TRON log filter
ethNewBlockFilterCreate a TRON new block filter
ethGetFilterChangesPoll for TRON filter changes
ethGetFilterLogsGet logs matching a TRON filter
ethGetLogsGet logs matching filter criteria on TRON
ethUninstallFilterUninstall a TRON filter

Chain & Network Info (9)

Tool NameDescription
ethChainIdReturns the TRON chain ID
ethCoinbaseReturns the Super Representative address of the node
ethProtocolVersionReturns TRON block version
ethSyncingReturns TRON sync status
netListeningCheck if TRON client is listening
netPeerCountGet number of peers connected to TRON
netVersionReturns TRON genesis block hash
web3ClientVersionReturns TRON node client version
web3Sha3Compute Keccak-256 hash on TRON

7. Integrating with AI Clients

Direct Connection Mode (Clients Supporting Streamable HTTP)

Add the following configuration to your MCP client configuration file:

{
  "mcpServers": {
    "trongrid-mcp": {
      "url": "https://mcp.trongrid.io/mcp"
    }
  }
}

Bridging via mcp-remote (Claude Code, etc.)

For clients that do not directly support Streamable HTTP (like Claude Code), you can use mcp-remote as a bridge:

{
  "mcpServers": {
    "mcp-server-trongrid": {
      "command": "npx",
      "args": ["-y", "mcp-remote", "https://mcp.trongrid.io/mcp"]
    }
  }
}

8. FAQ

Q: Tool call returns 405 Method Not Allowed?

A: The session may have expired or become invalid. Please re-run the initialize handshake process.

Q: Receiving TronGrid API rate limit errors?

A: pass your API Key via the TRON-PRO-API-KEY request header.

Q: curl request returns no data?

A: Ensure the request header includes Accept: application/json, text/event-stream, which is mandatory for the Streamable HTTP protocol.