GoTRON MCP

io.github.fbsobreira由 GitHub 帳號 fbsobreira 發布v0.4.2更新於 Oct 29, 2026

TRON blockchain: accounts, TRC20 tokens, staking, contracts, resources and transaction builders

已驗證Streamable HTTP可網頁執行金融開發者工具資料與分析

概覽

AI 產生的概覽

GoTRON MCP 讓助理讀取 TRON 區塊鏈資料(帳戶、TRC20 代幣、區塊、合約、質押與治理),並建立未簽名交易。

可以做什麼
  • 查詢帳戶餘額、資源、權限、委託與待處理交易
  • 查詢區塊、交易詳情、交易歷史、TRC20 轉帳與合約事件
  • 讀取 TRC20 代幣餘額、中繼資料與美元價格,檢查或撤銷授權
  • 讀取合約 ABI 與方法,呼叫唯讀方法,解碼回傳值與回滾原因
  • 估算能量與轉帳成本,查詢能量/頻寬價格與鏈參數
  • 建立未簽名的 TRX/TRC20 轉帳、質押、委託、投票與合約呼叫交易;僅在本地模式搭配金鑰庫時簽署並廣播
適用情境
適合讓助理回答關於 TRON 錢包、代幣、合約或網路經濟參數的問題,或為需要你自行簽署的交易做準備。託管端點適合唯讀查詢;本地模式才能進行金鑰庫簽署與廣播。
執行需求
可使用託管端點,或本地安裝(Go install、Homebrew、curl 腳本,或使用 stdio 傳輸的 Docker 映像)。選用 GOTRON_NODE_API_KEY 以提高 TronGrid 速率限制;GOTRON_MCP_NETWORK 與 GOTRON_MCP_NODE 用於選擇網路與節點。簽署需要本地模式、GOTRON_MCP_KEYSTORE_PASSPHRASE 與金鑰庫目錄。需要能連線 TRON gRPC 節點的網路。
安裝前請注意
寫入類工具會產生未簽名交易十六進位,簽署後會轉移真實資金;本地金鑰庫簽署可直接簽署並廣播。金鑰庫通關密語屬於機密:README 提醒,以命令列字面值傳入的通關密語會以明文保存在設定檔與 shell 歷史中。託管模式會停用寫入與簽署工具。代幣價格來自 CoinGecko,歷史紀錄來自 TronGrid,位址與查詢會傳送給第三方。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 GoTRON MCP,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Web executable,透過 Streamable HTTP。 遠端服務在工作區中設定後即可從網頁執行環境執行。

交給代理程式安裝

把這段提示詞貼上到 Claude Code、Codex、Cursor 等代理程式,或 SourceWeft 對話中。代理程式會讀取該伺服器的安裝指南,先向你展示發布者、端點和登入方式,經你同意後再把它新增到你的客戶端。金鑰不會寫進任何命令。

閱讀 https://sourceweft.com/mcp/io.github.fbsobreira%2Fgotron-mcp/install.md,並按其中說明把這個 MCP 伺服器接入我的客戶端。修改任何設定之前,先告訴我它的發布者、端點和登入方式,等我確認。不要把 API 金鑰寫進命令或我會提交的檔案;問我金鑰應從哪裡取得。

檢視代理程式所依據的安裝指南

其他 MCP 客戶端

把它新增到你客戶端的 mcpServers 設定中。

{
  "mcpServers": {
    "gotron": {
      "type": "http",
      "url": "https://mcp.gotron.sh/mcp"
    }
  }
}

README

GoTRON MCP Server

[Go Reference] [Go Report Card] [CI] [Coverage] [License]

MCP server for TRON blockchain — let AI agents query balances, tokens, blocks, and build transactions.

Built on the GoTRON SDK and the Model Context Protocol.

Two Modes

Local ModeHosted Mode
TransportstdioStreamable HTTP
Read toolsAllAll
Transaction buildersAll (unsigned tx hex)All (unsigned tx hex)
Sign/BroadcastOpt-in via keystore passphraseDisabled
InstallRequiredZero install

Install

Go Install

bash
go install github.com/fbsobreira/gotron-mcp/cmd/gotron-mcp@latest

Homebrew

bash
brew install fbsobreira/tap/gotron-mcp

curl

bash
curl -fsSL gotron.sh/install-mcp | sh

Docker

bash
docker run -p 8080:8080 ghcr.io/fbsobreira/gotron-mcp

The image starts the HTTP transport. For stdio, append --transport stdio:

bash
docker run -i --rm ghcr.io/fbsobreira/gotron-mcp --transport stdio

MCP Registry

Published to the MCP Registry as io.github.fbsobreira/gotron-mcp on each stable release tag (vX.Y.Z), from v0.4.1, with the Docker image (stdio) and the hosted endpoint.

Hosted (zero install)

Connect directly to https://mcp.gotron.sh/mcp — no installation needed.

Claude Code plugin

The gotron plugin bundles the hosted server with skills for USDT transfers and energy estimates. The gotron-local plugin runs the gotron-mcp binary locally and supports keystore signing.

Public marketplace installation is not available yet. To connect today, use the Claude Code MCP setup below. Plugin source and configuration details are in the directories linked above.

Claude Desktop Configuration

Local mode

json
{  "mcpServers": {    "gotron": {      "command": "gotron-mcp",      "args": ["--network", "mainnet"],      "env": {        "GOTRON_NODE_API_KEY": "your-trongrid-api-key"      }    }  }}

Local mode with keystore signing

json
{  "mcpServers": {    "gotron": {      "command": "gotron-mcp",      "args": ["--network", "mainnet"],      "env": {        "GOTRON_NODE_API_KEY": "your-trongrid-api-key",        "GOTRON_MCP_KEYSTORE_PASSPHRASE": "your-keystore-passphrase"      }    }  }}

Hosted mode (zero install)

json
{  "mcpServers": {    "gotron": {      "url": "https://mcp.gotron.sh/mcp"    }  }}

Claude Code

Choose one of the following setup options.

Project-wide local server:

bash
claude mcp add gotron --scope project -- gotron-mcp --network mainnet

User-wide local server with keystore signing:

If a project-scoped gotron entry already exists, remove it first with claude mcp remove gotron --scope project. For a local-scoped entry, use claude mcp remove gotron --scope local. Check the selected entry with claude mcp get gotron: local and project entries take precedence over user entries, and their settings are not combined. See Claude Code's scope precedence.

Save an environment-variable reference rather than the passphrase itself. Keep the single quotes so your shell does not expand the reference while registering the server:

bash
claude mcp add gotron --scope user -e 'GOTRON_MCP_KEYSTORE_PASSPHRASE=${GOTRON_MCP_KEYSTORE_PASSPHRASE:-}' -- gotron-mcp --network mainnet

Then launch Claude from Bash or Zsh with a hidden passphrase prompt:

bash
(  set +x  printf 'Keystore passphrase: '  IFS= read -r -s GOTRON_MCP_KEYSTORE_PASSPHRASE || exit 1  printf '\n'  export GOTRON_MCP_KEYSTORE_PASSPHRASE  claude)

The subshell limits the exported value to that Claude session. The prompt keeps the passphrase out of shell history and command-line arguments; it is still available in the environment of Claude and its MCP server. Repeat the prompt when starting a new signing session. Without a supplied passphrase, the reference expands to an empty value and wallet/signing tools stay disabled.

If you previously registered a literal passphrase with -e, it was stored in plain text in ~/.claude.json and may also remain in shell history. Remove the old user-scoped entry with claude mcp remove gotron --scope user, register it again using the reference above, and remove the old history entry. See Claude Code's environment-variable expansion documentation.

User-wide local server without keystore configuration:

bash
claude mcp add gotron --scope user -- gotron-mcp --network mainnet

Hosted server (zero install):

bash
claude mcp add gotron --scope user --transport http https://mcp.gotron.sh/mcp

Available Tools

Read-Only (both modes)

ToolDescription
get_accountGet account balance, bandwidth, energy, and details
get_account_resourcesGet energy/bandwidth usage and limits
get_trc20_balanceGet TRC20 token balance for an account
get_trc20_token_infoGet TRC20 token name, symbol, and decimals
analyze_transfer_costEstimate TRX or TRC20 transfer costs, including account activation fees for new TRX recipients
get_blockGet block by number or latest
get_transactionGet transaction details by ID
list_witnessesList all super representatives
get_contract_abiGet smart contract ABI
estimate_energyEstimate energy cost for a contract call
trigger_constant_contractCall read-only (view/pure) smart contract method
decode_abi_outputDecode ABI-encoded output or revert reasons from contract calls
list_contract_methodsGet human-readable summary of contract methods
get_chain_parametersGet network parameters
validate_addressValidate a TRON address
get_energy_pricesGet energy price history
get_bandwidth_pricesGet bandwidth price history
list_proposalsList governance proposals
get_networkGet current network connection info
get_pq_capabilitiesReport node and build support for post-quantum (TIP-899) signing

Transaction Builders (both modes)

ToolDescription
transfer_trxBuild unsigned TRX transfer
transfer_trc20Build unsigned TRC20 token transfer
freeze_balanceBuild unsigned stake TRX for energy/bandwidth (Stake 2.0)
unfreeze_balanceBuild unsigned unstake TRX (Stake 2.0)
vote_witnessBuild unsigned vote for super representatives
trigger_contractBuild unsigned smart contract call

Sign & Broadcast (local mode + keystore)

ToolDescription
sign_transactionSign transaction using local keystore
broadcast_transactionBroadcast signed transaction to network

Post-quantum signing (TIP-899, Nile)

create_wallet(name, key_type?) accepts ecdsa (default), ml_dsa_44 or fn_dsa_512; list_wallets and signing results report key_type. sign_transaction, sign_and_broadcast, sign_and_confirm and request_limit_override accept PQ wallets with the same policy limits, Telegram approval and elicitation as ECDSA wallets.

  • TIP-899 is a draft, live only on Nile (grpc.nile.trongrid.io:50051); governance switches each scheme on or off and mainnet reports none. Use get_pq_capabilities to check the node and this build.
  • Before any policy check or approval, a PQ signature requires that the node has the scheme enabled and that the wallet's address is a key of the transaction's permission (permission_id) on the owner account. A fresh PQ address must receive TRX first.
  • PQ keys are stored encrypted with GOTRON_MCP_KEYSTORE_PASSPHRASE under <keystore-dir>/pq-keys/<name>/ (wallet-cli compatible, same layout as tronctl). Point --keystore-dir at a tronctl config root (e.g. ~/.tronctl) to reuse its keys; the passphrase must match their password. Wallet names are unique across ECDSA and PQ wallets; list_wallets flags duplicate_name: true and such a wallet cannot sign until one copy is renamed.
  • The signature goes into pq_auth_sig (txid unchanged); a transaction carries at most 5 signatures, ECDSA and PQ combined. PQ transactions are about 10-22x larger than ECDSA ones (roughly 10x for FN-DSA-512, 22x for ML-DSA-44), so they use more bandwidth.
  • ML-DSA-44 is pure Go and works in every build. FN-DSA-512 (Falcon-512, currently enabled on Nile) needs a build with -tags falcon, CGO and liboqs installed via pkg-config: CGO_ENABLED=1 go build -tags falcon ./cmd/gotron-mcp. Without it, FN-DSA create/sign returns an error pointing to the gotron-mcp-pq build; release binaries for it are planned (GOT-97).
  • Not supported yet: adding a PQ key to an existing account's permissions from MCP (GOT-98; use tronctl or the SDK guide) and co-signing one transaction with several MCP wallets (GOT-99).

Configuration

FlagEnv VarDefaultDescription
--nodeGOTRON_MCP_NODE(per network)TRON gRPC node address
--api-keyGOTRON_NODE_API_KEY—TronGrid API key
--networkGOTRON_MCP_NETWORKmainnetNetwork: mainnet, nile, shasta
--transport—stdioTransport: stdio, http
--port—8080HTTP server port
--bind—127.0.0.1HTTP server bind address
--fallback-nodeGOTRON_MCP_FALLBACK_NODE—Fallback gRPC node (auto-failover)
--keystore-dirGOTRON_MCP_KEYSTORE_DIR~/.gotron-mcp/walletsWallet directory
--keystore-passGOTRON_MCP_KEYSTORE_PASSPHRASE—Keystore passphrase; wallet and sign tools are registered only when set
--tls—falseUse TLS for gRPC connection (default: plaintext)

Network Presets

NetworkDefault Node
mainnetgrpc.trongrid.io:50051
nilegrpc.nile.trongrid.io:50051
shastagrpc.shasta.trongrid.io:50051

Explicit --node overrides network presets.

Contract reads require a node with vm.supportConstant = true. If a node reports that constant execution is unsupported, reads try --fallback-node when configured. TRC20 reads also use the fallback for empty results, since token reads require return data. General contract simulations can succeed without return data. The fallback must serve the same network. This fallback applies per call, independently of block health checks; contract reverts are returned as errors.

For TRX transfers to unactivated recipients, analyze_transfer_cost reads the account creation fees and bandwidth multiplier from chain parameters. Only staked or delegated bandwidth can cover account creation; free bandwidth cannot. If recipient activation or the required fee parameters cannot be determined, the tool returns an error instead of quoting zero.

Security

  • The server never stores or manages private keys directly
  • All write tools return unsigned transaction hex — the user decides how to sign
  • Keystore signing is opt-in: wallet and sign tools are registered only when a keystore passphrase is set
  • In hosted (HTTP) mode, all write and sign tools are automatically disabled
  • API key is optional and only needed for TronGrid rate limits

Development

bash
# Buildmake build
# Format codemake fmt
# Run testsmake test
# Lintmake lint
# Run HTTP mode locallymake run-http

Community

Built and maintained by a CryptoChain community developer.

If you find this project useful, consider supporting TRON governance by voting for the CryptoChain Super Representative:

License

LGPL-3.0 — same as the GoTRON SDK.

Links

來源:README.md,提交 93f93d8

工具

44

analyze_account

Comprehensive account overview: balance, resources, staking, voting, permissions, and delegations in a single call

輸入參數address必填

analyze_transfer_cost

Estimate the cost of a TRX or TRC20 transfer: energy, bandwidth, and TRX burn options

輸入參數to必填from必填amount必填contract_address

decode_abi_output

Decode ABI-encoded output hex from a contract call. Handles return values, revert reasons (Error(string)), and panic codes (Panic(uint256)).

輸入參數data必填method必填contract_address必填

delegate_resource

Delegate energy or bandwidth to another address (Stake 2.0). Returns unsigned transaction hex for signing.

輸入參數to必填from必填memoamount必填resource必填lock_periodpermission_id

estimate_energy

Estimate energy cost for a smart contract call. Requires a full node with vm.supportConstant=true and vm.estimateEnergy=true; falls back to secondary node if primary does not support it.

輸入參數from必填method必填params必填contract_address必填

estimate_trc20_energy

Estimate energy cost for a TRC20 transfer without creating a transaction. Dry-runs the transfer to check energy requirements.

輸入參數to必填from必填amount必填contract_address必填

freeze_balance

Stake TRX for energy or bandwidth (Stake 2.0). Returns unsigned transaction hex for signing.

輸入參數from必填memoamount必填resource必填permission_id

get_account

Get TRON account balance and details including TRX balance, bandwidth, energy, frozen resources, and account type

輸入參數address必填

get_account_permissions

Get the permission structure of a TRON account including owner, active, and witness permissions with multi-sig keys and thresholds

輸入參數address必填

get_account_resources

Get energy and bandwidth usage and limits for a TRON account

輸入參數address必填

get_bandwidth_prices

Get current and historical bandwidth prices on the TRON network

無需輸入參數。

get_block

Get a TRON block by number or latest. Use include_transactions to get transaction details with decoded contract data (sender, receiver, amounts) and pagination.

輸入參數limitoffsetblock_numbertransaction_typeinclude_transactions

get_chain_parameters

Get TRON network node info and current energy/bandwidth prices

無需輸入參數。

get_contract_abi

Get the ABI of a smart contract on TRON. Automatically resolves proxy contracts (ERC-1967). Note: many TRON contracts are deployed without on-chain ABI — if empty, check TronScan for verified source code.

輸入參數contract_address必填

get_contract_events

Get decoded events emitted by a smart contract via TronGrid REST API. Returns a compact summary per event. Use a small limit and paginate with fingerprint to control response size

輸入參數limitevent_namefingerprintmax_timestampmin_timestamponly_confirmedcontract_address必填

get_delegatable_amount

Get the maximum amount of energy or bandwidth an account can still delegate

輸入參數address必填resource必填

get_delegated_resources

Get resources delegated to and from an account (Stake 2.0 delegation info)

輸入參數address必填

get_energy_prices

Get current and historical energy prices on the TRON network

無需輸入參數。

get_network

Get current MCP server connection info: network name, node address, and latest block

無需輸入參數。

get_pending_by_address

Get pending transactions for a specific address from the mempool

輸入參數address必填

get_pending_transactions

List pending transaction IDs and pool size from the mempool

輸入參數limitoffset

get_pq_capabilities

Report which TIP-899 post-quantum signature schemes the connected node enables and this build can sign (FN-DSA-512 needs the gotron-mcp-pq build). TIP-899 is a draft live only on Nile. can_sign reflects the node and this build; signing also needs local mode with a keystore.

無需輸入參數。

get_proposal

Get full details of a governance proposal by ID, including the complete list of approval addresses.

輸入參數proposal_id必填

get_token_price

Get the current USD price of TRX or a TRC20 token. Uses CoinGecko with caching.

輸入參數token必填

get_transaction

Get transaction details by transaction ID

輸入參數transaction_id必填

get_transaction_history

Get transaction history for a TRON address via TronGrid REST API. Returns a compact summary per transaction. Use a small limit and paginate with fingerprint to control response size

輸入參數limitaddress必填only_toonly_fromfingerprintmax_timestampmin_timestamponly_confirmed

get_trc20_allowance

Query how many tokens a spender is approved to transfer on behalf of the owner. Flags unlimited approvals as high risk.

輸入參數owner必填spender必填contract_address必填

get_trc20_balance

Get TRC20 token balance for an account

輸入參數address必填contract_address必填

get_trc20_token_info

Get TRC20 token metadata (name, symbol, decimals, total supply)

輸入參數contract_address必填

get_trc20_transfers

Get TRC20 token transfer history for a TRON address via TronGrid REST API. Returns a compact summary per transfer with token info. Use a small limit and paginate with fingerprint to control response size

輸入參數limitaddress必填only_toonly_fromfingerprintmax_timestampmin_timestamponly_confirmed

is_transaction_pending

Check if a specific transaction is still in the pending pool (mempool)

輸入參數transaction_id必填

list_contract_methods

Get a human-readable summary of a smart contract's methods with signatures, inputs, outputs, and mutability. Auto-resolves proxy contracts.

輸入參數contract_address必填

list_proposals

List governance proposals on the TRON network with pagination support. Returns a compact summary per proposal (use get_proposal for full details including approval addresses). Newest first by default.

輸入參數limitorderoffset

list_witnesses

List super representatives (witnesses) on the TRON network with pagination support.

輸入參數limitoffset

revoke_approval

Build unsigned transaction to revoke a TRC20 token approval (sets allowance to 0)

輸入參數owner必填spender必填fee_limitpermission_idcontract_address必填

transfer_trc20

Create an unsigned TRC20 token transfer transaction. Returns transaction hex for signing.

輸入參數to必填from必填amount必填fee_limitpermission_idcontract_address必填

transfer_trx

Create an unsigned TRX transfer transaction. Returns transaction hex for signing.

輸入參數to必填from必填memoamount必填permission_id

trigger_constant_contract

Call a read-only (view/pure) smart contract method. No transaction created, no fees. Returns decoded result. Provide either method+params OR data (pre-packed calldata).

輸入參數datafrommethodparamstoken_idcall_valuetoken_valuecontract_address必填

trigger_contract

Call a smart contract method. Returns unsigned transaction hex for signing. Provide either method+params OR data (pre-packed calldata).

輸入參數datafrom必填methodparamsfee_limitcall_valuepermission_idcontract_address必填

undelegate_resource

Reclaim previously delegated energy or bandwidth (Stake 2.0). Returns unsigned transaction hex for signing.

輸入參數to必填from必填memoamount必填resource必填permission_id

unfreeze_balance

Unstake TRX (Stake 2.0). Returns unsigned transaction hex for signing. Note: unstaked TRX has a 14-day withdrawal period.

輸入參數from必填memoamount必填resource必填permission_id

validate_address

Validate a TRON address and convert supported inputs to TRON base58/hex. Accepts base58 (T...), TRON hex (41...), or Ethereum/EVM format (0x...).

輸入參數address必填

vote_witness

Vote for super representatives. Returns unsigned transaction hex for signing. Requires staked TRX (1 TRX staked = 1 vote).

輸入參數from必填memovotes必填permission_id

withdraw_expire_unfreeze

Withdraw TRX that has completed the 14-day unstaking period (Stake 2.0). Returns unsigned transaction hex for signing.

輸入參數from必填memopermission_id

版本歷史

2
  1. v0.4.2最新Oct 29, 2026
  2. v0.4.1Oct 14, 2026

評分

已滿足適用檢查項的 100%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通必需25 分
  • 已宣告認證方式必需10 分
  • 已列出工具必需15 分
  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分