GoTRON MCP

io.github.fbsobreiraPublished by GitHub account fbsobreirav0.4.2Updated Oct 29, 2026

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

VerifiedStreamable HTTPWeb executableFinanceDeveloper ToolsData & Analytics

Overview

AI-generated overview

GoTRON MCP lets an assistant read TRON blockchain data — accounts, TRC20 tokens, blocks, contracts, staking and governance — and build unsigned transactions.

What you can do
  • Inspect accounts, balances, resources, permissions, delegations and pending transactions
  • Look up blocks, transactions, transaction history, TRC20 transfers and contract events
  • Read TRC20 token balances, metadata and USD prices, and check or revoke approvals
  • Read contract ABIs and methods, call view/pure methods, decode outputs and revert reasons
  • Estimate energy and transfer costs, and query energy/bandwidth prices and chain parameters
  • Build unsigned TRX/TRC20 transfers, staking, delegation, voting and contract-call transactions; sign and broadcast only in local mode with a keystore
When to use it
Useful when you need an assistant to answer questions about TRON wallets, tokens, contracts or network economics, or to prepare transactions for you to sign yourself. The hosted endpoint suits read-only exploration; local mode is needed for keystore signing and broadcasting.
Requirements
Either the hosted endpoint or a local install (Go install, Homebrew, curl script, or the Docker image with stdio transport). Optional GOTRON_NODE_API_KEY for higher TronGrid rate limits; GOTRON_MCP_NETWORK and GOTRON_MCP_NODE select the network and node. Signing requires local mode plus GOTRON_MCP_KEYSTORE_PASSPHRASE and a keystore directory. Network access to a TRON gRPC node is required.
Before you install
Write tools produce unsigned transaction hex that moves real funds once signed, and local keystore signing can sign and broadcast them. The keystore passphrase is a secret: the README warns that a literal passphrase passed on the command line is stored in plain text in the config file and shell history. Hosted mode disables write and sign tools. Token prices come from CoinGecko and history from TronGrid, so addresses and queries go to third parties.

Installation

In SourceWeft

  1. Open GoTRON MCP in the dashboard and add it to a workspace.
  2. Enable the server for the chats that should use its tools.

Web executable via Streamable HTTP. Remote servers run from the web runtime once configured in a workspace.

Use with an agent

Paste this prompt into Claude Code, Codex, Cursor or another agent — or into SourceWeft chat. The agent reads this server's install guide, shows you its publisher, endpoint and sign-in, and adds it to your client once you agree. Keys never go into a command.

Read https://sourceweft.com/mcp/io.github.fbsobreira%2Fgotron-mcp/install.md and connect the MCP server it describes to my client. Before changing any config, show me its publisher, endpoint and sign-in method and wait for my OK. Never put an API key in a command or in a file I would commit; ask me where it should come from.

Read the install guide the agent follows

Other MCP clients

Add this to your client's mcpServers config.

{
  "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

Source: README.md at commit 93f93d8

Tools

44

analyze_account

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

Parametersaddressrequired

analyze_transfer_cost

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

Parameterstorequiredfromrequiredamountrequiredcontract_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)).

Parametersdatarequiredmethodrequiredcontract_addressrequired

delegate_resource

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

Parameterstorequiredfromrequiredmemoamountrequiredresourcerequiredlock_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.

Parametersfromrequiredmethodrequiredparamsrequiredcontract_addressrequired

estimate_trc20_energy

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

Parameterstorequiredfromrequiredamountrequiredcontract_addressrequired

freeze_balance

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

Parametersfromrequiredmemoamountrequiredresourcerequiredpermission_id

get_account

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

Parametersaddressrequired

get_account_permissions

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

Parametersaddressrequired

get_account_resources

Get energy and bandwidth usage and limits for a TRON account

Parametersaddressrequired

get_bandwidth_prices

Get current and historical bandwidth prices on the TRON network

Takes no parameters.

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.

Parameterslimitoffsetblock_numbertransaction_typeinclude_transactions

get_chain_parameters

Get TRON network node info and current energy/bandwidth prices

Takes no parameters.

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.

Parameterscontract_addressrequired

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

Parameterslimitevent_namefingerprintmax_timestampmin_timestamponly_confirmedcontract_addressrequired

get_delegatable_amount

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

Parametersaddressrequiredresourcerequired

get_delegated_resources

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

Parametersaddressrequired

get_energy_prices

Get current and historical energy prices on the TRON network

Takes no parameters.

get_network

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

Takes no parameters.

get_pending_by_address

Get pending transactions for a specific address from the mempool

Parametersaddressrequired

get_pending_transactions

List pending transaction IDs and pool size from the mempool

Parameterslimitoffset

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.

Takes no parameters.

get_proposal

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

Parametersproposal_idrequired

get_token_price

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

Parameterstokenrequired

get_transaction

Get transaction details by transaction ID

Parameterstransaction_idrequired

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

Parameterslimitaddressrequiredonly_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.

Parametersownerrequiredspenderrequiredcontract_addressrequired

get_trc20_balance

Get TRC20 token balance for an account

Parametersaddressrequiredcontract_addressrequired

get_trc20_token_info

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

Parameterscontract_addressrequired

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

Parameterslimitaddressrequiredonly_toonly_fromfingerprintmax_timestampmin_timestamponly_confirmed

is_transaction_pending

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

Parameterstransaction_idrequired

list_contract_methods

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

Parameterscontract_addressrequired

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.

Parameterslimitorderoffset

list_witnesses

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

Parameterslimitoffset

revoke_approval

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

Parametersownerrequiredspenderrequiredfee_limitpermission_idcontract_addressrequired

transfer_trc20

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

Parameterstorequiredfromrequiredamountrequiredfee_limitpermission_idcontract_addressrequired

transfer_trx

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

Parameterstorequiredfromrequiredmemoamountrequiredpermission_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).

Parametersdatafrommethodparamstoken_idcall_valuetoken_valuecontract_addressrequired

trigger_contract

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

Parametersdatafromrequiredmethodparamsfee_limitcall_valuepermission_idcontract_addressrequired

undelegate_resource

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

Parameterstorequiredfromrequiredmemoamountrequiredresourcerequiredpermission_id

unfreeze_balance

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

Parametersfromrequiredmemoamountrequiredresourcerequiredpermission_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...).

Parametersaddressrequired

vote_witness

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

Parametersfromrequiredmemovotesrequiredpermission_id

withdraw_expire_unfreeze

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

Parametersfromrequiredmemopermission_id

Version history

2
  1. v0.4.2LatestOct 29, 2026
  2. v0.4.1Oct 14, 2026

Score

100% of the applicable checks met

How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.

  • Reached in the last 30 daysRequired25 pts
  • Auth declaredRequired10 pts
  • Tools listedRequired15 pts
  • DescriptionRequired15 pts
  • Logo10 pts
  • Documentation15 pts
  • License10 pts