# TradeRouter/trade-router-mcp [Health: Active]

**Category:** 💰 Finance & Fintech  
**Repository:** https://github.com/TradeRouter/trade-router-mcp  
**GitHub Stars:** 3  
**npm Downloads (last month):** 853  
**Views:** 3  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/traderouter-trade-router-mcp

## Description
Non-custodial Solana swap & limit order engine for AI agents. 21 tools (swap, limit, trailing, TWAP, DCA, combo orders) across Raydium, PumpSwap, Orca, Meteora. Jito MEV-protected execution, Ed25519 server verification, private key never leaves the process. MIT. npx -y @traderouter/trade-router-mcp.

## Tools
Capabilities this server exposes over MCP:

- **get_wallet_address** — Get the configured wallet's public address
- **build_swap** — Build an unsigned swap transaction
- **submit_signed_swap** — Submit a manually signed transaction
- **auto_swap** — Build + sign + submit in one call
- **get_holdings** — Get token holdings for a wallet
- **get_mcap** — Market cap and price for a token
- **get_flex_card** — Trade card PNG URL for wallet + token
- **place_limit_order** — Limit buy/sell by price or market cap
- **place_trailing_order** — Trailing stop buy/sell
- **place_twap_order** — TWAP (time-weighted) buy/sell
- **place_limit_twap_order** — Limit trigger → TWAP execution
- **place_trailing_twap_order** — Trailing trigger → TWAP execution
- **place_limit_trailing_order** — Limit trigger → trailing execution (single swap on trigger)
- **place_limit_trailing_twap_order** — Limit trigger → trailing trigger → TWAP execution
- **list_orders** — List active orders for a wallet
- **check_order** — Get status of a specific order
- **cancel_order** — Cancel an active order
- **extend_order** — Extend an order's expiry
- **connect_websocket** — Register a wallet over the persistent WebSocket
- **connection_status** — Current WebSocket connection state
- **get_fill_log** — Log of filled orders

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

```json
"mcpServers": {
  "trade-router-mcp": {
    "command": "npx",
    "args": ["-y","@traderouter/trade-router-mcp"],
    "env": {
      "TRADEROUTER_PRIVATE_KEY": "",
      "SOLANA_RPC_URL": "",
      "TRADEROUTER_SERVER_PUBKEY": "",
      "TRADEROUTER_SERVER_PUBKEY_NEXT": "",
      "TRADEROUTER_REQUIRE_SERVER_SIGNATURE": "",
      "TRADEROUTER_REQUIRE_ORDER_CREATED_SIGNATURE": "",
      "TRADEROUTER_DRY_RUN": ""
    }
  }
}
```

**Requires environment variables:** `TRADEROUTER_PRIVATE_KEY`, `SOLANA_RPC_URL`, `TRADEROUTER_SERVER_PUBKEY`, `TRADEROUTER_SERVER_PUBKEY_NEXT`, `TRADEROUTER_REQUIRE_SERVER_SIGNATURE`, `TRADEROUTER_REQUIRE_ORDER_CREATED_SIGNATURE`, `TRADEROUTER_DRY_RUN` — the values above are empty placeholders; fill in real credentials before running (see the repository for what each one is for).

## Documentation

## What TradeRouter/trade-router-mcp does

TradeRouter/trade-router-mcp exposes TradeRouter.ai’s Solana trading functions as MCP tools for AI agents. It supports wallet address lookup, token holdings, market-cap and price queries, trade-card URLs, swaps, and order management. Swap routing covers Raydium, PumpSwap, Orca, and Meteora.

The order tools cover direct limit and trailing orders, time-weighted average price (TWAP) execution, and multi-stage combinations. These combinations can use a limit or trailing trigger before TWAP execution, or combine limit and trailing conditions before a single swap or TWAP sequence. Agents can list active orders, inspect an order, cancel it, extend its expiry, and review filled-order activity.

## How it works

The package communicates with TradeRouter.ai over HTTP for swap construction and related reads, and uses a persistent WebSocket for limit, trailing, DCA, TWAP, and combined orders. A swap can be handled in two stages: the agent requests an unsigned transaction, then submits a manually signed transaction. Alternatively, `auto_swap` builds, signs, and submits the transaction in one tool call.

The private key is loaded from the local `TRADEROUTER_PRIVATE_KEY` environment variable and used for signing in the MCP process. The documented signing flow sends the wallet’s public address to the API, receives an unsigned transaction, signs it locally, and sends only the signed transaction onward. Signed swaps are submitted through the `/protect` endpoint using a Jito bundle. Server messages related to order creation, fills, and TWAP execution are checked against an Ed25519 trust anchor before being accepted.

## Setup and configuration

TradeRouter/trade-router-mcp requires Node.js 18 or newer and a Solana wallet private key in base58 format. The documented installation command is:

```bash
npx -y @traderouter/trade-router-mcp
```

Configure it as a stdio MCP server by setting `TRADEROUTER_PRIVATE_KEY` in the client environment. A dedicated trading wallet is recommended by the project rather than a wallet containing primary holdings.

`SOLANA_RPC_URL` can replace the default Solana mainnet RPC endpoint for read operations. Signature verification can be configured with `TRADEROUTER_SERVER_PUBKEY`, `TRADEROUTER_SERVER_PUBKEY_NEXT`, `TRADEROUTER_REQUIRE_SERVER_SIGNATURE`, and `TRADEROUTER_REQUIRE_ORDER_CREATED_SIGNATURE`. Setting `TRADEROUTER_DRY_RUN=true` makes write tools return their tool name and arguments without calling the API; read-only tools continue to run normally.

## Tools and capabilities

The 21 tools include:

- Build unsigned swaps or submit manually signed swaps.
- Build, sign, and submit swaps in one call.
- Read wallet holdings, market data, and trade-card image URLs.
- Create limit, trailing, TWAP, and combined trigger orders.
- Connect and inspect a wallet’s persistent WebSocket state.
- List, inspect, cancel, or extend orders and retrieve fill logs.

## Limitations and notes

TradeRouter/trade-router-mcp is specific to Solana and requires access to a configured private key for write operations. The private key should not be treated as an ordinary application secret shared with the remote API; the documented design keeps it in the local process. Swap actions carry a flat 1% fee on swap volume, while the documented holdings and market-data reads are free. Dry-run mode prevents write calls but does not simulate blockchain execution or order results.

_Full upstream README: https://allmcps.com/mcp/traderouter-trade-router-mcp/readme_

