Trade Router Mcp

io.github.re-bruce-wayne由 GitHub 帳號 re-bruce-wayne 發布v1.0.6更新於 Oct 24, 2026

Non-custodial Solana swap & limit order engine for AI agents.

發布方自己的服務:370.ai — AI Gateway: 100+ Chat Models, Image & Speech Generation

已驗證STDIO僅桌面金融AI 與機器學習

概覽

AI 產生的概覽

非託管的 Solana 交易 MCP 伺服器,讓助理建立兌換、設定限價單、追蹤停損、DCA、TWAP 與組合訂單,並查詢持倉和市值。

可以做什麼
  • 建立多 DEX 的未簽章兌換交易,並提交已簽章交易走 MEV 保護通道
  • 掃描錢包持倉,查詢代幣市值與價格
  • 透過 WebSocket 建立並監控限價單、追蹤停損、DCA/TWAP 與組合訂單
  • 產生交易卡片圖片,讀取伺服器信任錨公鑰
  • 使用本機設定的 Solana 私鑰在本機簽章交易
適用情境
適合讓助理代使用者交易 Solana 代幣或管理自動下單策略,同時把私鑰保留在本機。也可只用於免費的持倉與市值查詢。
執行需求
透過 npx 或 PyPI 套件以 stdio 在本機執行;需在 TRADEROUTER_PRIVATE_KEY 提供 Solana base58 私鑰。選用設定包括 TRADEROUTER_BASE_URL、TRADEROUTER_SERVER_PUBKEY 及自訂 Solana RPC 位址。需要能連線交易 API 與 Solana 網路。
安裝前請注意
伺服器持有 TRADEROUTER_PRIVATE_KEY 中的 Solana 私鑰,可支配真實資金,外洩即可能被轉走資產。兌換會花錢,並依兌換量收取 1% 費用。此 MCP 伺服器未實作 DRY_RUN 或每日虧損上限,需自行加上支出限制。錢包位址、代幣 mint 與數量會傳送到遠端 API;覆寫信任錨公鑰會削弱簽章驗證。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Trade Router Mcp,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

Trade Router — ClawHub skill

Non-custodial Solana trading API for AI agents. One interface for swaps, MEV-protected execution, wallet holdings, limit orders, trailing stops, DCA, TWAP, and combo orders. The private key stays with the agent that calls the API.

[Security: non-custodial] [License: MIT]

Is this safe?

Yes, and here's exactly why. The private key never crosses the network to api.traderouter.ai. POST /swap returns an unsigned transaction; the agent signs it locally; only the signed transaction goes to POST /protect (Jito MEV-protected bundle). Server responses are Ed25519-verified against a hard-coded trust anchor. See SECURITY.md for the full threat model, data-flow diagram, and permissions manifest.

Signing flow:

  1. Agent calls the skill's swap action → HTTPS request to api.traderouter.ai sends the wallet address (public key), token mint, amount
  2. API returns an unsigned transaction
  3. Agent signs the tx locally with its private key
  4. The signed transaction is submitted to /protect (Jito MEV-protected bundle)
  5. Server confirms and returns balance changes. The private key never leaves the agent's machine.

Two ways to consume this skill

A. Direct API integration (what SKILL.md documents)

Read SKILL.md for the full API spec — REST endpoints, WebSocket order protocol, request/response shapes, error handling, and reference agent example code. Pair it with any HTTP client and Solana signing library.

The example code in SKILL.md uses these conventions (feel free to pick your own — they're the agent's choice, not imposed by the API):

Example env varExample defaultPurpose in the reference agent
PRIVATE_KEY(required)Solana base58 private key held by the agent process
DRY_RUNtrueSafe-by-default gate — swap actions only submit when you set DRY_RUN=false
MAX_DAILY_LOSS_LAMPORTS2_000_000_000 (2 SOL)Activates the reference agent's KILL_SWITCH when exceeded

These are the reference agent's own conventions. The API itself doesn't require any of them.

B. Ready-made MCP server (@traderouter/trade-router-mcp)

For Claude Desktop, Cursor, Cline, and any MCP-compatible client, a published MCP server wraps the same API:

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

Or wire it into your MCP client config:

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

The MCP server's env conventions are different from the example code in SKILL.md — they're prefixed with TRADEROUTER_ for namespace hygiene in multi-MCP environments:

MCP env varRequiredPurpose
TRADEROUTER_PRIVATE_KEY✅Solana base58 private key (local use only)
SOLANA_RPC_URL❌Custom RPC (defaults to mainnet-beta)
TRADEROUTER_SERVER_PUBKEY❌Override the server Ed25519 trust anchor
TRADEROUTER_SERVER_PUBKEY_NEXT❌Accept an additional key during server rotation
TRADEROUTER_REQUIRE_SERVER_SIGNATURE❌Default true; fail-closed on order_filled verification
TRADEROUTER_REQUIRE_ORDER_CREATED_SIGNATURE❌Default true; fail-closed on order_created verification

The MCP server does not currently implement DRY_RUN or daily-loss caps — those live only in the reference agent example in SKILL.md. If you need them end-to-end, either use the reference agent pattern directly, or wrap the MCP tool calls with your own gate.

Full details, all 21 tools, and the LangChain adapter snippet are in the npm package README: https://www.npmjs.com/package/@traderouter/trade-router-mcp

Features

REST endpoints

EndpointPurpose
POST /swapBuild unsigned swap (multi-DEX: Raydium, PumpSwap, Orca, Meteora)
POST /protectSubmit signed tx via Jito bundle — MEV-protected, returns confirmed balance changes
POST /holdingsAccurate wallet scan — catches tokens standard RPC misses
GET /mcapMarket cap + price for any token
GET /flexTrade card PNG generation
GET /securityServer trust-anchor public key

WebSocket (wss://api.traderouter.ai/ws)

Persistent connection for server-side order monitoring:

  • Limit orders — trigger by market cap or price
  • Trailing stops — percentage or absolute
  • DCA / TWAP — time-weighted execution
  • Combo orders — limit+trailing, limit+TWAP, trailing+TWAP, limit+trailing+TWAP

Server polls market-cap ~every 5s. When an order triggers, you receive an unsigned tx → sign locally → submit.

Trust anchor

The baked-in server public key is EXX3nRzfDUvbjZSmxFzHDdiSYeGVP1EGr77iziFZ4Jd4. Every order_filled, order_created, and twap_execution message is Ed25519-verified against this key before being treated as authoritative. The server can rotate via TRADEROUTER_SERVER_PUBKEY_NEXT.

Fees

Flat 1% fee on swap volume, embedded in routing at /protect. No subscription, no API key, no monthly minimums. Read-only endpoints (/holdings, /mcap) are free.

Links

Security disclosure

Found a vulnerability? Email [email protected] or use GitHub Security Advisories on this repo. 48-hour acknowledgement. See SECURITY.md for the full policy.

License

MIT. See LICENSE.

Changelog

See CHANGELOG.md.

來源:trade-router/README.md,提交 0fe3373

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v1.0.6最新Sep 16, 2026

評分

已滿足適用檢查項的 40%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分

    請在儲存庫或註冊中心條目中宣告授權條款。

其他 Router 整合