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 集成