MERX
TRON infrastructure for AI agents.
[MERX MCP server]
[smithery badge]
[npm version]
[License: MIT]
[Tools]
[Prompts]
[Resources]
66 MCP tools. Energy market across 6 providers. USDT/USDC/USDD payments. x402 v2 facilitator on TRON mainnet.
Documentation | API Reference | MCP Server
Table of contents
What is MERX
MERX is the infrastructure layer for AI agents and agentic networks on TRON.
Where Stripe is infrastructure for web commerce and Cloudflare for the open web,
MERX is the missing infrastructure layer that lets autonomous AI agents discover,
transact, and operate on TRON without ever touching energy, bandwidth, or
low-level blockchain mechanics.
The platform exposes one coherent stack: 66-tool MCP server, agent payment
service for TRC-20 stablecoins, x402 v2 facilitator (the only TRON
facilitator in the coinbase/x402 ecosystem registry), GasFree transfers via
a MERX-deployed mainnet controller, dedicated TRON RPC node, A2A (Google,
7 skills) and ACP (BeeAI, 7 capabilities) protocol coverage, and a natural
language Policy Engine powered by Anthropic Claude.
Underneath those agent surfaces sits an energy aggregator across 6 active
providers (CatFee, Netts, TronSave, iTRX, PowerSun, TEM) that routes resource
purchases to the cheapest source automatically -- so when an agent calls
send(), MERX estimates the energy required, buys only the deficit, and
broadcasts the transaction. The agent never holds TRX or thinks about energy.
Any AI agent running in Claude, LangChain, CrewAI, Vertex AI, AutoGen,
or BeeAI can send payments and acquire resources on TRON through a single
integration with MERX.
Three ways to plug an agent into MERX:
-
MCP server -- 66 tools for AI agents. Hosted SSE at
https://merx.exchange/mcp/sse (zero install) or local stdio via
npx merx-mcp. Works with Claude, GPT, Cursor, Windsurf, and any
MCP-compatible client.
-
Claude Code plugin -- one-line install for Claude Code. Auto-registers
the MCP server, ships 6 slash commands and a tron-agent-engineer sub-agent.
See Hovsteder/merx-claude-plugin.
-
REST API + SDKs -- direct programmatic access for agents that aren't
using MCP. JavaScript (merx-sdk v2.1 on npm), Python (merx-sdk v2.1 on
PyPI), or raw HTTP against /api/v1/ (70+ versioned endpoints).
For human users, the web platform at merx.exchange
remains available for manual energy trading, dashboard, deposits, and
withdrawals -- but the platform is built primarily for agents.
The problem
AI agents will become the dominant transactional users of stablecoins, and
TRON -- home to USDD, $86B+ USDT, USDC, and the dominant chain for retail USDT
in Southeast Asia, Africa, and Latin America -- is already the largest
USDT-native network in the world.
But TRON has no infrastructure designed for agents:
-
No agent-native payment service. Existing TRON wallets are built for
human users with mouse clicks and seed-phrase backups, not for autonomous
programs that need to register addresses, send TRC-20s, watch for incoming
payments, and create invoices via REST.
-
Energy and bandwidth are a UX dead-end. Every smart contract call on TRON
requires energy. Without energy, TRX tokens burn as fees -- a single USDT
transfer burns 3-13 TRX (~$1-4) for cold receivers. Renting energy from a
provider drops the cost to ~$0.10 -- a 94% reduction -- but every
provider has a different price, different API, different duration tiers, and
different failure modes. No agent can be expected to manage that.
-
No x402 facilitator on TRON before MERX. The x402 protocol has already
processed $43.57M in agent-to-agent payments on Base, Solana, Stellar, and
Ethereum. TRON was completely absent from the coinbase/x402 ecosystem
registry until MERX. Agents that wanted to pay for TRON-hosted APIs in
USDT had no standardized way to do it.
-
Three agent protocols, zero TRON integrations. MCP (Anthropic), A2A
(Google), and ACP (BeeAI) are the three major agent communication protocols.
Until MERX, none of them had a deployed, production-grade TRON server.
AI agents in Claude, Vertex AI, or BeeAI literally could not see TRON.
MERX builds the missing layer. AI agents call one API, hold zero TRX, and
get paid / pay / send / receive in USDT, USDC, or USDD on the world's
largest USDT network.
Platform overview
Quick start
Four paths depending on your use case. For AI agents, paths 3 and 4 are the
primary surfaces. Path 1 (web) is for human operators; path 2 (REST/SDK) is
for direct programmatic integration.
Path 1: Web platform (humans)
Go to merx.exchange. Sign in. Deposit TRX. Manage
energy, agent API keys, and balance through the dashboard. No code required.
Path 2: REST API / SDK (programmatic)
Install the JavaScript SDK:
Use it in your application (replace merx_sk_your_key with your API key from merx.exchange):
Python:
curl (no SDK needed):
Path 3: Claude Code plugin (one-line install)
If you're using Claude Code, this is the fastest path. The plugin auto-registers
the hosted MCP server, ships 6 slash commands, and includes a
tron-agent-engineer sub-agent specialized in agentic payment workflows on TRON.
Then run /merx:setup to configure your MERX API key. Available commands:
Source: github.com/Hovsteder/merx-claude-plugin.
Path 4: MCP for any AI agent (Claude, Cursor, Windsurf, custom)
Hosted (zero install) -- works with Claude.ai, Cursor, Windsurf, and any
SSE-compatible MCP client:
22 read-only tools are available immediately: prices, estimation, market analysis,
on-chain queries, address lookups. No API key required.
To unlock trading tools, call set_api_key in any conversation:
To unlock write tools (send TRX, swap tokens), call set_private_key:
Local (stdio) -- full power with keys set via environment variables:
All 66 tools available from the first message.
Additional protocol support
MERX also exposes A2A and ACP for non-MCP orchestrators -- same backend, different
discovery surface:
Access levels
What sets MERX apart
The only complete agent stack on TRON
MERX is the only TRON project that runs all three major agent protocols as
production-grade services: MCP (Anthropic), A2A (Google, 7 skills), and ACP
(BeeAI, 7 capabilities). TronLink published a core MCP library
(@tronlink/tronlink-mcp-core v0.1.0, March 2026) but it is explicitly a
building block, not a hosted service. MERX is the only TRON entry in the
coinbase/x402 ecosystem partner registry.
Agent payment service with sub-3-second receive
agent.merx.exchange is non-custodial: agents register their own TRON address
and MERX never holds private keys or controls funds. The ZMQ event listener
matches incoming TRC-20 transfers (USDT, USDC, USDD, plus any other token in
real time) and dispatches webhooks within ~3 seconds of on-chain confirmation.
watch() provides persistent 24/7 address monitoring with per-token filtering.
invoice() creates payment requests with payment links and automatic
detection. batch() sends up to 50 transfers in one call.
x402 v2 facilitator with full TRON stablecoin coverage
x402.merx.exchange implements the standard /verify, /settle, and
/supported endpoints, so any x402 client (including the Coinbase CDP
reference implementation) interoperates out of the box. Three settlement
schemes live on TRON mainnet: exact (direct TRC-20 transfer),
exact_permit and exact_gasfree (TIP-712 PermitTransfer through MERX's own
GasFreeController contract). USDT, USDC, and USDD all settled on mainnet
with verified txids and on-chain commission collection. Among 15 known x402
facilitators, MERX is the only one supporting the full TRON stablecoin set.
GasFree zero-TRX sends
The MERX-deployed GasFreeController contract TKjJ1r5XYqnLZmLakcP3knis7Lh6gm3qtR
went live on mainnet 2026-04-08 with three verified mainnet permitTransfer
settlements (USDT, USDC, USDD). Agents send stablecoins from wallets that
hold zero TRX -- the controller pulls value+fee from a per-user GasFree
subaccount and the executor pays the broadcast gas. Single biggest UX barrier
for agents on TRON, removed.
Resource-aware transactions
Every write operation (TRC-20 transfer, token swap, contract call) automatically
estimates energy AND bandwidth needed, buys the deficit at the best market
price across 6 providers, waits for delegation to arrive on-chain, then
executes. The agent never burns TRX unnecessarily. Tested on mainnet:
a USDT transfer with auto-resources saves up to 94% compared to burning.
Exact energy simulation
Before buying energy for swaps and contract calls, MERX simulates the exact
transaction via triggerConstantContract with real parameters. No hardcoded
estimates -- the precise energy amount is purchased. For a SunSwap V2 swap,
simulation returned 223,354 energy; the on-chain transaction used exactly
223,354.
Natural language Policy Engine
"Keep 500,000 energy on my wallet. Buy when price drops below 55 SUN.
Max 200 TRX per week."
The Policy Engine (powered by Anthropic Claude Sonnet 4) parses this
instruction, generates structured standing orders with triggers, budget
limits, and expiration, previews them for the user, and creates everything
with one confirmation. Available through MCP, A2A skill, and REST endpoint.
No competitor can replicate this without their own Anthropic integration,
standing order infrastructure, and real-time provider price feeds.
Multi-provider energy routing (under the agent surfaces)
All 6 active energy providers are aggregated (CatFee, Netts, TronSave, iTRX,
PowerSun, TEM). Orders are routed to the cheapest source automatically. If
one provider fails or runs out of capacity, the next cheapest fills the order.
Prices cover both energy and bandwidth across every available duration tier.
Standing orders + delegation monitors
Server-side 24/7 automation stored in PostgreSQL. Trigger types: price_below,
price_above, schedule (cron), balance_below, delegation_expiry.
Persists across restarts. Works when the client is offline. Auto-renew with
configurable max price.
Full MCP protocol
The only TRON MCP server using all three MCP primitives: tools (66), prompts
(30), and resources (21 -- 14 static + 7 templates). Two transport modes:
hosted SSE (zero install) and local stdio (full key management). Three
protocol versions supported: 2024-11-05, 2025-03-26, 2025-06-18.
Architecture
Platform overview
ASCII diagram (if Mermaid does not render)
Key architecture principle: All traffic goes through the MERX platform. Users
never need TronGrid API keys. MERX manages all RPC infrastructure, caching, and
failover server-side. The only operation that stays on the client: transaction
signing with a private key. Private keys never leave the client process.
Resource-aware transaction flow
This sequence diagram shows a real USDT transfer with auto-resource optimization.
Numbers are from production testing.
ASCII diagram (if Mermaid does not render)
Resource purchase rules
API overview
Base URL: https://merx.exchange/api/v1
All endpoints are versioned. Errors follow a standard format:
{ "error": { "code": "...", "message": "...", "details": { ... } } }.
Idempotency-Key header supported on POST /orders and POST /withdraw.
Public endpoints (no authentication)
Authenticated endpoints (API key required)
x402 endpoints (zero registration)
Full API reference: merx.exchange/docs/api
MCP server
MERX provides a full MCP (Model Context Protocol) server for AI agents. 66 tools
across 18 categories, 30 pre-built prompts, and 21 live data resources.
Note: the tool catalog table below was last fully audited at 52 tools.
Twelve newer tools (agent payment service, swap module, advanced standing
orders) are documented at merx.exchange/docs/tools/mcp-server.
The canonical count is 64, served by the live MCP server.
Tool categories
Prompts (30)
Pre-built conversation templates available in Claude Desktop prompt picker and via
prompts/get in any MCP client.
Resources (21)
14 static resources + 7 URI templates. Attach to conversations as context or
subscribe for real-time updates.
URI Templates:
Example conversations
Check prices and buy energy:
Resource-aware USDT transfer:
Market analysis:
Full tool reference
All 66 tools with auth requirements. For input schemas and output examples, see
docs/TOOLS.md.
Price Intelligence
Resource Estimation
Resource Trading
Account Management
Agent Convenience
On-chain Queries
Token Operations
Smart Contracts
Network Utilities
DEX Swaps
Onboarding
Payments
Intent Execution
Standing Orders and Monitors
Session Management
SDKs
JavaScript / TypeScript
Python
REST API
No SDK required. All endpoints accept JSON and return JSON.
Real-time data
WebSocket
Connect to wss://merx.exchange/ws for real-time price updates.
Webhooks
Register webhook endpoints to receive HTTP POST notifications for account events.
Security: Every webhook request includes an X-Merx-Signature header containing
an HMAC-SHA256 signature computed with your webhook secret. Verify this signature
before processing. Failed deliveries are retried with exponential backoff.
Payment methods
MERX supports three ways to pay for energy and bandwidth.
1. Pre-funded MERX balance
Deposit TRX to your MERX account via the dashboard at merx.exchange or via the API.
Trade directly from your balance. Best for high-volume users and teams.
2. Self-deposit from agent wallet
The agent deposits TRX to MERX from its own wallet using the deposit_trx tool or
API. The tool builds a TRX transfer with the correct memo, signs it locally, and
broadcasts. Balance is credited in 1-2 minutes.
3. x402 pay-per-use
No account needed. No pre-deposit. Create an invoice, pay with TRX from any wallet,
and receive energy delegation directly. Complete flow in one API call or one tool
call via create_paid_order.
See docs/PAYMENT-METHODS.md for detailed flow diagrams.
Standing orders and monitors
Standing orders
Server-side 24/7 automation stored in PostgreSQL. Persists across restarts. Works
when the client is offline.
Trigger types:
Action types:
Example:
Delegation monitors
Watch delegations and resources on any address. Alert before expiry. Auto-renew
with configurable max price.
Example:
Savings calculator
Energy is the expensive resource on TRON. These numbers show the cost difference
between burning TRX (no energy) and renting energy through MERX.
Cost comparison
Numbers assume the cheapest available provider at time of order. Actual burn cost
varies by recipient address state (whether it has held the token before).
How it works
1 TRX = 1,000,000 SUN. Energy is priced in SUN per unit. A USDT transfer needs
approximately 65,000 energy units. At 22 SUN per unit, that is 65,000 x 22 =
1,430,000 SUN = 1.43 TRX. Without energy, the network burns 3-13 TRX from the
sender depending on the recipient's account state.
Error handling
All errors follow a standard format across API, SDKs, and MCP:
Common error codes
Security
Private key handling
- Private keys are set via environment variable (
TRON_PRIVATE_KEY) or the
set_private_key tool in-session.
- Keys never leave the client process. All transaction signing happens locally.
- The MERX API never receives private keys.
- The
set_private_key tool derives the TRON address automatically -- the user
only provides the 64-character hex key.
API key handling
- API keys authenticate with the MERX API for trading operations.
- Keys can be set via environment variable (
MERX_API_KEY) or the set_api_key
tool in-session.
- Create an account and get an API key without leaving the conversation using the
create_account tool.
What MERX can and cannot do
Tested on mainnet
Every capability was tested in production on TRON mainnet. These are not simulations --
every TX hash is verifiable on TronScan.
Verified transactions
Key findings from mainnet testing
Comparison with alternatives
Factual comparison based on publicly available information.
MERX covers resource economics, transaction optimization, and general blockchain
operations. Other servers focus on one area.
Documentation
License
MIT. See LICENSE.