npx -y @traderouter/trade-router-mcp. The server signs locally with TRADEROUTER_PRIVATE_KEY, submits via /protect (Jito bundle), and returns either {signature, balance_changes} for instant swaps or {order_id} for WebSocket-managed orders. For safe iteration, set TRADEROUTER_DRY_RUN=true — every write tool short-circuits.
{
"tool": "place_limit_order",
"args": {
"wallet_address": "WALLET",
"token_address": "DezXAZ8z7PnrnRJjz3wXBoRgixCa6xjnB7YaB1pPB263",
"action": "buy",
"amount": 500000000,
"trigger_type": "mcap",
"trigger_value": 1200000000,
"slippage": 1500,
"expiry_hours": 168
}
}
/protect, MEV-protected. Returns an Ed25519-signed order_filled event your agent can trust without re-querying chain state. Cookbook: 04-mcap-trigger.{
"tool": "place_twap_order",
"args": {
"wallet_address": "WALLET",
"token_address": "TARGET_MINT",
"action": "twap_buy",
"total_amount": 1000000000,
"frequency": 10,
"duration": 3600,
"slippage": 1500
}
}
frequency=10 over duration=3600s means 10 swaps of 0.1 SOL each, one every ~6 minutes. Each slice routes independently through the best DEX at that moment. Cookbook: 02-dca-bot.{
"tool": "place_twap_order",
"args": {
"wallet_address": "WALLET",
"token_address": "TARGET_MINT",
"action": "twap_buy",
"total_amount": 3500000000,
"frequency": 7,
"duration": 604800,
"slippage": 1500
}
}
duration is in seconds (7 × 86400). Slices fire on schedule even if your agent is offline; the server orchestrates.{
"tool": "place_trailing_order",
"args": {
"wallet_address": "WALLET",
"token_address": "TARGET_MINT",
"action": "sell",
"holdings_percentage": 10000,
"trail_percent": 2000,
"slippage": 1500,
"expiry_hours": 168
}
}
trail_percent=2000 bps = 20%. holdings_percentage=10000 bps = 100% of your position. The server tracks peak price after the order goes live; sells when price falls 20% from peak. Cookbook: 03-trailing-stop.{
"tool": "place_limit_trailing_twap_order",
"args": {
"wallet_address": "WALLET",
"token_address": "DezXAZ8z7PnrnRJjz3wXBoRgixCa6xjnB7YaB1pPB263",
"action": "sell",
"holdings_percentage": 10000,
"limit_trigger_type": "mcap",
"limit_trigger_value": 1000000000,
"trail_percent": 1500,
"frequency": 6,
"duration": 1800,
"slippage": 1500
}
}
order_id and order_filled events as each stage completes. Cookbook: 05-combo-take-profit.{
"tool": "auto_swap",
"args": {
"wallet_address": "WALLET",
"token_address": "FRESH_LAUNCH_MINT",
"action": "buy",
"amount": 1000000000,
"slippage": 3000
}
}
auto_swap not separate build_swap + submit_signed_swap: auto_swap collapses the round trip — server builds, MCP signs locally, submits via Jito in one call. Saves ~150-300ms vs the manual flow. On a fresh launch that matters. Cookbook: 01-instant-swap.// 1. Open the WebSocket once at agent startup
{ "tool": "connect_websocket", "args": { "wallet_address": "WALLET" } }
// 2. Poll the fill log
{ "tool": "get_fill_log", "args": { "limit": 50 } }
// Returns: [{ order_id, token, action, amount, price, signature,
// server_signature, timestamp }, ...]
// Each fill is Ed25519-signed by the server's trust anchor
// (EXX3nRzfDUvbjZSmxFzHDdiSYeGVP1EGr77iziFZ4Jd4 by default).
// Verify before acting on it — see SECURITY.md.
order_filled, order_created, and twap_execution message; the MCP server verifies before passing to your agent. See SECURITY.md for the trust model.