Metadata-Version: 2.4
Name: traderouter-mcp
Version: 1.0.13
Summary: TradeRouter.ai MCP Server — Non-custodial Solana swap & limit order engine for AI agents
Project-URL: Homepage, https://traderouter.ai
Project-URL: Documentation, https://traderouter.ai/
Project-URL: Repository, https://github.com/re-bruce-wayne/openclaw-skills
Project-URL: Issues, https://github.com/re-bruce-wayne/openclaw-skills/issues
Project-URL: Changelog, https://github.com/re-bruce-wayne/openclaw-skills/blob/main/trade-router/CHANGELOG.md
Project-URL: Security, https://github.com/re-bruce-wayne/openclaw-skills/blob/main/trade-router/SECURITY.md
Author: Trade Router
License: MIT License
        
        Copyright (c) 2026 Trade Router
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
License-File: LICENSE
Keywords: ai-agents,dca,defi,jito,limit-orders,mcp,mev,model-context-protocol,non-custodial,solana,swap,trading,trailing-stop,twap
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Internet :: WWW/HTTP
Classifier: Topic :: Office/Business :: Financial :: Investment
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Typing :: Typed
Requires-Python: >=3.10
Requires-Dist: base58>=2.1.1
Requires-Dist: cryptography>=42.0.0
Requires-Dist: httpx>=0.27.0
Requires-Dist: mcp>=1.0.0
Requires-Dist: solders>=0.21.0
Requires-Dist: websockets>=12.0
Description-Content-Type: text/markdown

# TradeRouter MCP (Python)

mcp-name: io.github.re-bruce-wayne/trade-router-mcp

[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](./LICENSE)
[![Security: non-custodial](https://img.shields.io/badge/Security-Non%20Custodial-green.svg)](./SECURITY.md)
[![PyPI](https://img.shields.io/pypi/v/traderouter-mcp.svg)](https://pypi.org/project/traderouter-mcp/)

**Non-custodial Solana trading API for AI agents.** One integration replaces Jupiter + Helius + Jito + custom limit-order code. Your private key never leaves the local process — only signed transactions are transmitted to `api.traderouter.ai`.

See [SECURITY.md](./SECURITY.md) for the full threat model and data-flow diagram.

## Install

Run directly without installing (recommended):

```json
{
  "traderouter": {
    "command": "uvx",
    "args": ["traderouter-mcp"],
    "env": {
      "TRADEROUTER_PRIVATE_KEY": "<your-solana-base58-private-key>"
    }
  }
}
```

Or install into a project:

```bash
uv add traderouter-mcp
```

## Environment variables

| Variable | Default | Purpose |
|---|---|---|
| `TRADEROUTER_PRIVATE_KEY` | required for signing | Solana base58-encoded private key. Used **locally** for signing, never transmitted. |
| `TRADEROUTER_SERVER_PUBKEY` | hardcoded trust anchor | Override the server public key used to verify `order_filled` events |
| `TRADEROUTER_BASE_URL` | `https://api.traderouter.ai` | Override API base (e.g. for staging) |

## Features

### REST tools
- `swap` — build an unsigned swap transaction (multi-DEX: Raydium, PumpSwap, Orca, Meteora)
- `protect` — submit signed tx via Jito bundle, returns confirmed balance changes
- `holdings` — most accurate wallet scan on Solana
- `mcap` — market cap + price
- `flex` — generate trade-card PNG

### WebSocket order types
- `place_limit` — limit order by mcap or price
- `place_trailing` — trailing stop (percentage or absolute)
- `place_dca` — dollar-cost averaging
- `place_twap` — time-weighted average price
- `place_combo` — limit + trailing + TWAP in one chain
- `check_order`, `list_orders`, `cancel_order`, `extend_order`

Server monitors mcap ~every 5 seconds. When an order triggers, you receive a signed-tx-ready payload; the MCP signs it locally (using `TRADEROUTER_PRIVATE_KEY`) and submits to `/protect` automatically.

## Non-custodial by construction

See [SECURITY.md](./SECURITY.md) for the complete threat model. TL;DR:

1. `swap` tool returns **unsigned** transaction
2. MCP signs locally with `TRADEROUTER_PRIVATE_KEY` (held in local process memory)
3. **Signed** transaction sent to `api.traderouter.ai/protect`
4. Server submits to Jito bundle, returns confirmed balance changes
5. Private key never touches the network

## Links

- Docs / API reference: https://traderouter.ai/
- OpenAPI spec: https://traderouter.ai/openapi.yaml
- llms.txt: https://traderouter.ai/llms.txt
- GitHub: https://github.com/re-bruce-wayne/openclaw-skills/tree/main/trade-router
- X/Twitter: [@trade_router](https://x.com/trade_router)

## License

MIT. See [LICENSE](./LICENSE).

## Security disclosure

Email `security@traderouter.ai` or open a GitHub Security Advisory. See [SECURITY.md](./SECURITY.md) for policy.
