Skip to main content
Glama
TradeRouter

trade-router-mcp

Official

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
SOLANA_RPC_URLNoCustom RPC for readshttps://api.mainnet-beta.solana.com
TRADEROUTER_DRY_RUNNoWhen true, every write-action tool returns dry_run instead of calling the APIfalse
TRADEROUTER_PRIVATE_KEYYesSolana wallet private key (base58). Local use only.
TRADEROUTER_SERVER_PUBKEYNoOverride the server's Ed25519 trust anchor
TRADEROUTER_SERVER_PUBKEY_NEXTNoAccept messages signed by this key in addition to the primary (key rotation)
TRADEROUTER_REQUIRE_SERVER_SIGNATURENoVerify server signatures on order_filled / twap_executiontrue
TRADEROUTER_REQUIRE_ORDER_CREATED_SIGNATURENoVerify server signatures on order_createdtrue

Capabilities

Features and capabilities supported by this server

CapabilityDetails
tools
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
get_wallet_addressA

Derive the Solana wallet address from TRADEROUTER_PRIVATE_KEY. Call first at session start — also starts WebSocket connection.

build_swapA

Build an unsigned Solana swap tx via REST. Returns base58 swap_tx. Pass to submit_signed_swap or use auto_swap.

submit_signed_swapB

Submit a base64-encoded signed Solana transaction via MEV-protected lane.

auto_swapB

Build + sign + submit in one step. Requires TRADEROUTER_PRIVATE_KEY.

get_holdingsA

Scan SPL token holdings for a Solana wallet. Slow — up to 100s.

get_mcapA

Get market cap (and price/pool) data for one or more token addresses. GET /mcap.

get_flex_cardC

Get the URL for a flex trade card PNG for a wallet and token. GET /flex. Returns the URL to display the image.

connect_websocketA

Connect WS for a wallet and wait until registered (up to 25s). Call before placing orders.

connection_statusC

Return live WS connection state for a wallet.

get_fill_logC

Return all order_filled events received since process start (capped at 200).

place_limit_orderC

Place a market-cap-based limit order over WS. action: sell|buy. target: bps vs current mcap at placement.

place_trailing_orderC

Place a trailing stop or trailing buy over WS. action: trailing_sell|trailing_buy. trail: bps distance.

place_twap_orderC

Place a TWAP (time-weighted) buy or sell order. Splits total amount into frequency slices over duration seconds. action: twap_buy|twap_sell.

place_limit_twap_orderB

Place a limit-then-TWAP order. Wait for limit target (bps), then execute via TWAP. action: limit_twap_sell|limit_twap_buy.

place_trailing_twap_orderB

Place a trailing-then-TWAP order. When trail triggers, execute via TWAP. action: trailing_twap_sell|trailing_twap_buy.

place_limit_trailing_orderC

Place a limit-then-trailing order. Wait for limit, then trailing phase; when trail triggers, single swap. action: limit_trailing_sell|limit_trailing_buy.

place_limit_trailing_twap_orderB

Place a limit-then-trailing-then-TWAP order. Limit → trail → on trail trigger, execute via TWAP. action: limit_trailing_twap_sell|limit_trailing_twap_buy.

list_ordersC

List all active limit/trailing orders for a wallet.

check_orderB

Check the status of a specific order by order_id.

cancel_orderC

Cancel an active limit or trailing order.

extend_orderC

Extend an order's expiry. expiry_hours is the new total (1–336).

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/TradeRouter/trade-router-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server