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 分