Skip to main content
Glama
trade-router-mcp

trade-router-mcp

Official
by TradeRouter

@traderouter/trade-router-mcp

TradeRouter.ai를 위한 Model Context Protocol 서버입니다. AI 에이전트를 위한 비수탁형 솔라나 스왑, 지정가, 트레일링, DCA, TWAP 및 콤보 주문 엔진을 제공합니다.

Security: non-custodial License: MIT npm Awesome MCP Servers Glama MCP Server MCP Registry

안전한가요?

네, 그 이유는 다음과 같습니다. 개인 키는 TRADEROUTER_PRIVATE_KEY에서 한 번 읽혀 @solana/web3.js + tweetnacl을 사용한 로컬 서명에만 사용되며, 전송, 기록 또는 저장되지 않습니다. 서명된 트랜잭션만 기기에서 나갑니다. 서버 메시지는 하드코딩된 신뢰 앵커(trust anchor)에 대해 Ed25519로 검증됩니다. 전체 위협 모델, 데이터 흐름도 및 권한 매니페스트는 SECURITY.md를 참조하십시오.

서명 흐름:

  1. 에이전트가 build_swap을 호출 → MCP가 지갑 주소(공개 키)를 api.traderouter.ai로 전송

  2. API가 서명되지 않은 트랜잭션을 반환

  3. MCP가 TRADEROUTER_PRIVATE_KEY를 사용하여 로컬에서 트랜잭션에 서명

  4. 서명된 트랜잭션이 /protect(Jito MEV 보호 번들)로 제출됨

  5. 서버가 확인 후 잔액 변경 사항을 반환. 개인 키는 네트워크를 절대 통과하지 않습니다.

Related MCP server: RefundYourSOL

요구 사항

  • Node.js ≥ 18

  • base58 형식의 솔라나 지갑 개인 키 (주요 자산이 아닌 전용 트레이딩 지갑 사용 권장)

설치

npx -y @traderouter/trade-router-mcp

또는 MCP 클라이언트(Claude Desktop, Cursor, Cline 등)에 연결하십시오:

{
  "mcpServers": {
    "traderouter": {
      "command": "npx",
      "args": ["-y", "@traderouter/trade-router-mcp"],
      "env": {
        "TRADEROUTER_PRIVATE_KEY": "your_base58_private_key"
      }
    }
  }
}

OS

Claude Desktop 설정 경로

macOS

~/Library/Application Support/Claude/claude_desktop_config.json

Windows

%APPDATA%\Claude\claude_desktop_config.json

Linux

~/.config/Claude/claude_desktop_config.json

환경 변수

변수

필수

기본값

목적

TRADEROUTER_PRIVATE_KEY

✅

—

솔라나 지갑 개인 키 (base58). 로컬 전용.

SOLANA_RPC_URL

❌

https://api.mainnet-beta.solana.com

읽기용 커스텀 RPC

TRADEROUTER_SERVER_PUBKEY

❌

내장된 신뢰 앵커

서버의 Ed25519 신뢰 앵커 재정의

TRADEROUTER_SERVER_PUBKEY_NEXT

❌

(설정 안 됨)

기본 키 외에 이 키로 서명된 메시지 수락 (키 교체용)

TRADEROUTER_REQUIRE_SERVER_SIGNATURE

❌

true

order_filled / twap_execution에 대한 서버 서명 검증

TRADEROUTER_REQUIRE_ORDER_CREATED_SIGNATURE

❌

true

order_created에 대한 서버 서명 검증

TRADEROUTER_DRY_RUN

❌

false

true일 경우, 모든 쓰기 작업 도구(submit_signed_swap, auto_swap, place_*_order, cancel_order, extend_order)가 API를 호출하는 대신 { dry_run: true, tool, args }를 반환합니다. 읽기 전용 도구는 정상적으로 실행됩니다. 1.0.9 버전에서 추가됨.

도구

도구

목적

get_wallet_address

설정된 지갑의 공개 주소 가져오기

build_swap

서명되지 않은 스왑 트랜잭션 생성

submit_signed_swap

수동으로 서명된 트랜잭션 제출

auto_swap

한 번의 호출로 생성 + 서명 + 제출

get_holdings

지갑의 토큰 보유량 가져오기

get_mcap

토큰의 시가 총액 및 가격 가져오기

get_flex_card

지갑 + 토큰에 대한 트레이드 카드 PNG URL 가져오기

place_limit_order

가격 또는 시가 총액 기준 지정가 매수/매도

place_trailing_order

트레일링 스톱 매수/매도

place_twap_order

TWAP(시간 가중) 매수/매도

place_limit_twap_order

지정가 트리거 → TWAP 실행

place_trailing_twap_order

트레일링 트리거 → TWAP 실행

place_limit_trailing_order

지정가 트리거 → 트레일링 실행 (트리거 시 단일 스왑)

place_limit_trailing_twap_order

지정가 트리거 → 트레일링 트리거 → TWAP 실행

list_orders

지갑의 활성 주문 목록

check_order

특정 주문의 상태 확인

cancel_order

활성 주문 취소

extend_order

주문 만료 기한 연장

connect_websocket

지속적 WebSocket을 통해 지갑 등록

connection_status

현재 WebSocket 연결 상태

get_fill_log

체결된 주문 로그

REST 엔드포인트 (내부 작동)

엔드포인트

목적

POST /swap

서명되지 않은 스왑 생성 (멀티 DEX: Raydium, PumpSwap, Orca, Meteora)

POST /protect

Jito 번들을 통해 서명된 트랜잭션 제출 — MEV 보호

POST /holdings

지갑 스캔 — 표준 RPC가 놓치는 토큰도 포착

GET /mcap

시가 총액 + 가격

GET /flex

트레이드 카드 PNG 생성

wss://api.traderouter.ai/ws

지정가 / 트레일링 / DCA / TWAP / 콤보 주문을 위한 지속적 WebSocket

신뢰 앵커

내장된 서버 공개 키는 EXX3nRzfDUvbjZSmxFzHDdiSYeGVP1EGr77iziFZ4Jd4입니다. 서버로부터 오는 모든 order_filled, order_created, twap_execution 메시지는 권한 있는 것으로 간주되기 전에 Ed25519로 검증됩니다. 자세한 내용과 교체 메커니즘(TRADEROUTER_SERVER_PUBKEY_NEXT)은 SECURITY.md를 참조하십시오.

LangChain과 함께 사용

모든 MCP 서버는 공식 어댑터를 통해 LangChain에서 작동합니다:

from langchain_mcp_adapters.client import MultiServerMCPClient

client = MultiServerMCPClient({
    "traderouter": {
        "command": "npx",
        "args": ["-y", "@traderouter/trade-router-mcp"],
        "transport": "stdio",
        "env": {"TRADEROUTER_PRIVATE_KEY": "<base58>"},
    },
})
tools = await client.get_tools()

수수료

스왑 거래량에 대해 1%의 고정 수수료가 부과되며, /protect 라우팅에 포함되어 있습니다. 구독료, API 키 비용, 월 최소 사용량은 없습니다. 읽기 전용 엔드포인트(/holdings, /mcap)는 무료입니다.

기계 판독 가능 사양 (traderouter.ai에서 실시간 제공)

URL

형식

목적

https://traderouter.ai/openapi.json

OpenAPI 3.1 (JSON)

표준 API 계약 — 모든 언어로 SDK 생성

https://traderouter.ai/openapi.yaml

OpenAPI 3.1 (YAML)

동일 사양, YAML 형식 (JSON에서 재생성)

https://traderouter.ai/llms.txt

text

LLM이 읽을 수 있는 API 가이드 (llmstxt.org 기준)

https://traderouter.ai/SKILL.md

markdown

Anthropic 에이전트 스킬 형식 — 전체 구현 가이드

https://traderouter.ai/SECURITY.md

markdown

위협 모델 + 데이터 흐름도 + 권한 매니페스트 (여기 ./SECURITY.md와 동일)

https://traderouter.ai/CHANGELOG.md

markdown

API / MCP 서버 / 사이트 버전 트랙 전반의 통합 변경 로그

빠른 SDK 생성:

# TypeScript
openapi-generator-cli generate -i https://traderouter.ai/openapi.yaml -g typescript-axios -o ./sdk-ts

# Python
openapi-generator-cli generate -i https://traderouter.ai/openapi.yaml -g python -o ./sdk-py

보안 공개

security@traderouter.ai로 이메일을 보내거나 이 저장소의 GitHub 보안 권고(Security Advisories)를 사용하십시오. 48시간 이내에 확인해 드립니다. SECURITY.md를 참조하십시오 (안정적인 URL로 연결하려면 호스팅된 버전을 참조하십시오).

라이선스

MIT. LICENSE를 참조하십시오.

변경 로그

CHANGELOG.md를 참조하십시오.

Available Tools

21 tools
auto_swapB

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

Inputs: wallet_address (required), token_address (required), action (required), amount, +2 more.

build_swapA

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

Inputs: wallet_address (required), token_address (required), action (required), amount, +2 more.

cancel_orderC

Cancel an active limit or trailing order.

Inputs: wallet_address (required), order_id (required).

check_orderB

Check the status of a specific order by order_id.

Inputs: wallet_address (required), order_id (required).

connection_statusC

Return live WS connection state for a wallet.

Inputs: wallet_address (required).

connect_websocketA

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

Inputs: wallet_address (required).

extend_orderC

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

Inputs: wallet_address (required), order_id (required), expiry_hours (required).

get_fill_logC

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

Inputs: wallet_address (required).

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.

Inputs: wallet_address (required), token_address (required).

get_holdingsA

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

Inputs: wallet_address (required).

get_mcapA

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

Inputs: tokens (required).

get_wallet_addressA

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

Inputs: no named parameters.

list_ordersC

List all active limit/trailing orders for a wallet.

Inputs: wallet_address (required).

place_limit_orderC

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

Inputs: wallet_address (required), token_address (required), action (required), target (required), +4 more.

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.

Inputs: wallet_address (required), token_address (required), action (required), target (required), +5 more.

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.

Inputs: wallet_address (required), token_address (required), action (required), target (required), +7 more.

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.

Inputs: wallet_address (required), token_address (required), action (required), target (required), +6 more.

place_trailing_orderC

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

Inputs: wallet_address (required), token_address (required), action (required), trail (required), +4 more.

place_trailing_twap_orderB

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

Inputs: wallet_address (required), token_address (required), action (required), trail (required), +6 more.

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.

Inputs: wallet_address (required), token_address (required), action (required), frequency (required), +4 more.

submit_signed_swapB

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

Inputs: signed_tx_base64 (required).

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.2/5.0

    Scored across 21 tools

    Disambiguation4/5

    Most tools target distinct actions (swap, order types, connection, data). However, the variety of order placement tools (limit, trailing, TWAP, and composite types) could cause minor confusion, though their descriptions differentiate them.

    Naming Consistency4/5

    Tools follow a consistent verb_noun pattern in snake_case (e.g., cancel_order, get_holdings). Minor inconsistencies like 'connection_status' vs 'connect_websocket' and 'auto_swap' using an adverb instead of a verb are present but not disruptive.

    Tool Count4/5

    21 tools is slightly high but justified by the server's breadth (swap, multiple order types, connection, data). Each tool serves a specific purpose, though some consolidation could reduce the count.

    Completeness4/5

    Covers core trading lifecycle: swaps, order placement/cancellation/check, connection setup, and data queries. Missing: historical trade log beyond in-memory events and token price discovery (only market cap), but these are minor gaps for the intended use.

    Maintenance

    ActivityInactive
    ResponsivenessLimited data

    Related MCP Connectors

    Related MCP Servers