MCP Server

The Merx MCP server lets AI agents buy TRON energy and bandwidth through natural language. Compatible with Claude Desktop, Cursor, Windsurf, and any MCP-compatible client.

What is MCP

Model Context Protocol (MCP) is an open standard created by Anthropic that allows AI assistants to interact with external tools and data sources. Instead of copy-pasting API responses, the agent calls structured tools directly and reasons about the results.

The Merx MCP server exposes 7 tools that cover the full trading workflow: checking prices, previewing costs, placing orders, managing balance, and withdrawing funds.

Installation

bash
npm install -g @merx/mcp-server

Configure for Claude Desktop

Add the following to your Claude Desktop configuration file. On macOS this is ~/Library/Application Support/Claude/claude_desktop_config.json. On Windows it is %APPDATA%/Claude/claude_desktop_config.json.

claude_desktop_config.jsonjson
{
  "mcpServers": {
    "merx": {
      "command": "merx-mcp",
      "env": {
        "MERX_API_KEY": "sk_live_your_key_here"
      }
    }
  }
}

Configure for Cursor

Create or edit .cursor/mcp.json in your project root.

.cursor/mcp.jsonjson
{
  "mcpServers": {
    "merx": {
      "command": "merx-mcp",
      "env": {
        "MERX_API_KEY": "sk_live_your_key_here"
      }
    }
  }
}

Available Tools

ToolDescription
get_pricesFetch current energy and bandwidth prices from all providers
get_balanceCheck your TRX and USDT balance
preview_orderPreview cost breakdown without placing an order
create_orderPlace an energy or bandwidth order with amount, duration, and target
get_orderGet status and fill details for a specific order
get_historyView recent orders and transaction history
withdrawInitiate a TRX withdrawal to an external address

Example Conversation

Below is a realistic conversation between a developer and Claude Desktop with the Merx MCP server configured.

Usertext
What is the cheapest TRON energy price right now?
Agent calls get_pricestext
Checking current prices across all providers...

The cheapest energy right now is from CatFee at 84 SUN per unit
for 24-hour delegation (minimum 32,000 energy). ITRX is second
at 86 SUN, and Feee is third at 88 SUN.
Usertext
Buy 65,000 energy for 24 hours to address TRf8k...
Agent calls preview_order, then create_ordertext
I previewed the order first:
- 65,000 energy for 24 hours
- Best price: 84 SUN/unit from CatFee
- Total cost: 5,460,000 SUN (5.46 TRX)

Order placed. ID: ord_x7k9m2. Status: EXECUTING.
Energy should be delegated to TRf8k... within one block.
INFO

The MCP server uses your API key for all operations. The agent cannot access funds or place orders without a valid key configured in the environment.