trade-router-mcp
Official@traderouter/trade-router-mcp
TradeRouter.ai를 위한 Model Context Protocol 서버입니다. AI 에이전트를 위한 비수탁형 솔라나 스왑, 지정가, 트레일링, DCA, TWAP 및 콤보 주문 엔진을 제공합니다.
안전한가요?
네, 그 이유는 다음과 같습니다. 개인 키는 TRADEROUTER_PRIVATE_KEY에서 한 번 읽혀 @solana/web3.js + tweetnacl을 사용한 로컬 서명에만 사용되며, 전송, 기록 또는 저장되지 않습니다. 서명된 트랜잭션만 기기에서 나갑니다. 서버 메시지는 하드코딩된 신뢰 앵커(trust anchor)에 대해 Ed25519로 검증됩니다. 전체 위협 모델, 데이터 흐름도 및 권한 매니페스트는 SECURITY.md를 참조하십시오.
서명 흐름:
에이전트가
build_swap을 호출 → MCP가 지갑 주소(공개 키)를 api.traderouter.ai로 전송API가 서명되지 않은 트랜잭션을 반환
MCP가
TRADEROUTER_PRIVATE_KEY를 사용하여 로컬에서 트랜잭션에 서명서명된 트랜잭션이
/protect(Jito MEV 보호 번들)로 제출됨서버가 확인 후 잔액 변경 사항을 반환. 개인 키는 네트워크를 절대 통과하지 않습니다.
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 |
|
Windows |
|
Linux |
|
환경 변수
변수 | 필수 | 기본값 | 목적 |
| ✅ | — | 솔라나 지갑 개인 키 (base58). 로컬 전용. |
| ❌ |
| 읽기용 커스텀 RPC |
| ❌ | 내장된 신뢰 앵커 | 서버의 Ed25519 신뢰 앵커 재정의 |
| ❌ | (설정 안 됨) | 기본 키 외에 이 키로 서명된 메시지 수락 (키 교체용) |
| ❌ |
|
|
| ❌ |
|
|
| ❌ |
|
|
도구
도구 | 목적 |
| 설정된 지갑의 공개 주소 가져오기 |
| 서명되지 않은 스왑 트랜잭션 생성 |
| 수동으로 서명된 트랜잭션 제출 |
| 한 번의 호출로 생성 + 서명 + 제출 |
| 지갑의 토큰 보유량 가져오기 |
| 토큰의 시가 총액 및 가격 가져오기 |
| 지갑 + 토큰에 대한 트레이드 카드 PNG URL 가져오기 |
| 가격 또는 시가 총액 기준 지정가 매수/매도 |
| 트레일링 스톱 매수/매도 |
| TWAP(시간 가중) 매수/매도 |
| 지정가 트리거 → TWAP 실행 |
| 트레일링 트리거 → TWAP 실행 |
| 지정가 트리거 → 트레일링 실행 (트리거 시 단일 스왑) |
| 지정가 트리거 → 트레일링 트리거 → TWAP 실행 |
| 지갑의 활성 주문 목록 |
| 특정 주문의 상태 확인 |
| 활성 주문 취소 |
| 주문 만료 기한 연장 |
| 지속적 WebSocket을 통해 지갑 등록 |
| 현재 WebSocket 연결 상태 |
| 체결된 주문 로그 |
REST 엔드포인트 (내부 작동)
엔드포인트 | 목적 |
| 서명되지 않은 스왑 생성 (멀티 DEX: Raydium, PumpSwap, Orca, Meteora) |
| Jito 번들을 통해 서명된 트랜잭션 제출 — MEV 보호 |
| 지갑 스캔 — 표준 RPC가 놓치는 토큰도 포착 |
| 시가 총액 + 가격 |
| 트레이드 카드 PNG 생성 |
| 지정가 / 트레일링 / 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 | 형식 | 목적 |
OpenAPI 3.1 (JSON) | 표준 API 계약 — 모든 언어로 SDK 생성 | |
OpenAPI 3.1 (YAML) | 동일 사양, YAML 형식 (JSON에서 재생성) | |
text | LLM이 읽을 수 있는 API 가이드 (llmstxt.org 기준) | |
markdown | Anthropic 에이전트 스킬 형식 — 전체 구현 가이드 | |
markdown | 위협 모델 + 데이터 흐름도 + 권한 매니페스트 (여기 ./SECURITY.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 toolsauto_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
Scored across 21 tools
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.
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.
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.
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
Related MCP Connectors
Non-custodial DeFi tools for AI agents on Solana: swaps, perps, lending, staking, equities.
Safe Solana swaps for AI agents with risk checks, unsigned transactions, x402, and 3-bp fees.
Native Solana staking for AI agents. 26 MCP tools, one-shot signing, webhooks.
Non-custodial DEX aggregator for autonomous AI agents: best-price swaps on 8 chains, no API key.
Related MCP Servers
- AlicenseCqualityDmaintenanceEnables AI agents to interact with cryptocurrency ecosystems through wallet management, trading operations (swaps, DCA, limit orders), staking, and multi-chain support starting with Solana.37GPL 3.0
- AlicenseAqualityDmaintenanceSolana wallet cleanup, token trading on 12+ DEXes, and market data. Scan wallets for reclaimable SOL, close empty token accounts, burn dust tokens, buy/sell with Jito MEV protection. 7 tools for AI agents.411 npmMIT
- AlicenseAqualityBmaintenanceDeFi execution and agent-to-agent economy tools for AI agents — swaps, yield, transfers, policy enforcement, trust scoring, A2A jobs, and P\&L across Ethereum, Base, Arbitrum, and Polygon.311Apache 2.0
- AlicenseAqualityDmaintenanceEnables AI agents to read chain data, execute transactions, swap tokens, and manage wallets on Solana through 38 tools across 7 modules. Supports write operations with a private key and includes built-in prompts for common workflows.381MIT