Building a real trading agent on Solana means stitching together at least three or four APIs:
getTokenAccountsByOwner — which silently misses 20-30% of newly-minted SPL tokens until they're indexedEach of those has its own SDK, its own auth model, its own retry logic, its own callback shape. An agent calling six APIs has six failure modes that all need handling, and the integration cost is paid in every project that wants to do this.
Trade Router collapses the surface. One wallet-keyed API. One unified order model. One place to think about MEV. One MCP server install. The agent gets 21 tools exposed through a single npx -y @traderouter/trade-router-mcp command, no API key, no bearer token, no auth header — your wallet address is the identity.
"The agent should think about strategy. It shouldn't have to think about whether the limit-order program's PDA derivation matches the swap router's account layout."
Model Context Protocol is the only standard right now where an LLM can introspect a server's tool surface, call tools with structured args, and receive structured results — without a custom framework adapter. We ship MCP because it works in Claude Desktop, Cursor, Cline, ElizaOS, LangChain, and Solana Agent Kit equally well, with no per-framework code on our side.
The REST + WebSocket API underneath the MCP server is canonical too — anyone who doesn't want MCP can call the API directly. But the MCP path is the one we optimize.
The MCP server reads TRADEROUTER_PRIVATE_KEY once at startup, signs transactions locally with @solana/web3.js + tweetnacl, and never transmits or persists the key. Server messages from api.traderouter.ai are Ed25519-verified against a baked-in trust anchor before the agent treats them as authoritative.
This isn't "we store your keys securely" — keys literally never reach us. It's the same security posture as Phantom-the-wallet, except the signer is your agent's process instead of a browser extension. Read SECURITY.md for the threat model and data-flow diagram.
Every swap goes through POST /protect, which submits the signed transaction as a Jito bundle. You don't wire Jito separately, you don't run a Jito client, you don't tune priority fees by hand. If you want to opt out of MEV protection (e.g., to send a regular RPC tx for a non-arb-sensitive transfer), you can use POST /swap + your own submission path. But the safe-by-default is on.
All order types return { order_id }. All callbacks come over the same WebSocket. All Ed25519-signed events have the same verification path. Your agent doesn't have to learn six callback shapes; it learns one.
The combo orders in v1.3.0 are the cleanest payoff of this design. place_limit_trailing_twap_order takes a four-stage strategy — "wait until mcap hits X, then start a trailing stop, when the trail fires TWAP-sell over Y minutes" — and orchestrates all four stages server-side. Your agent fires one tool call and gets one order_id.
Standard Solana RPC's getTokenAccountsByOwner silently omits newly-minted SPL tokens until they're indexed by the validator's parser. POST /holdings bypasses that — we run our own indexer and return the actual balance state. For agents that decide based on what's in a wallet, this is the difference between "the model thinks it has $0 of TokenX" and "the model knows it has 1500 TokenX".
The agent-native framing means we make trade-offs that aren't right for everyone. If any of these describe you, pick a different tool:
You should not take our word for any of this. Verify independently:
.mjs file: trade-router-mcp.mjs. You can read it end-to-end in one sitting.@traderouter/trade-router-mcp@1.0.12 tarball..mcpregistry_* and .env* files. Branch protection on main.dist.signatures verifiable via the npm registry.ai.traderouter/trade-router-mcp@1.0.12 with isLatest: true, DNS-auth published from traderouter.ai.TRADEROUTER_DRY_RUN=true and every write tool short-circuits. Read tools execute normally so the agent can explore without touching mainnet.If you find any claim on this page that isn't verifiable, email hello@traderouter.ai and we'll fix it.
Because it's the only protocol right now that lets an agent introspect tools and call them with structured args without a custom adapter per framework. ElizaOS, LangChain, Cursor, Cline, Claude Desktop, and Solana Agent Kit all support MCP. Shipping in MCP means we ship to all of them.
You can. We did exactly that for our first agent stack and it took two engineers six weeks to get reliable. Order-state machines, server-side orchestration, signed callbacks, MEV protection, and retry logic are not the value-add of a trading agent — they're the cost of admission. We pay that cost so you don't.
The fee is embedded in /protect routing. It pays for the routing infrastructure, the WebSocket order-orchestration server, the Jito relay relationship, and the holdings indexer. Read endpoints (/holdings, /mcap) are free. There is no subscription, no API key, no monthly minimum. On a single small swap, Jupiter's free path is cheaper. On an agent running TWAP / limits / trailing stops with MEV protection, 1% is well below the engineering and infra cost of stitching things together yourself.
The trust anchor is set at the client side via TRADEROUTER_SERVER_PUBKEY, defaulting to a baked-in value. You can override it. Rotation is supported via TRADEROUTER_SERVER_PUBKEY_NEXT. If we ever published a server-update that changed the trust anchor without prior notice, that would be a public, verifiable breach of trust — your agent would start rejecting our messages, you'd see it in your logs, and we'd lose every customer in a week. The cryptographic check is the contract.
Yes. The API has no notion of "session" — every call is wallet-keyed. Multiple agents calling concurrently from the same wallet just compose. Watch for the obvious failure mode (two agents both deciding to sell the same position) — that's your agent design problem, not ours.
Your agent's read path keeps working through your RPC of choice. Your write path stops until we're back. We aim for >99.9% uptime; the WebSocket has been continuously up since v1.3.0 launched. If you need belt-and-braces redundancy, run Jupiter alongside us as a fallback for the swap path — we don't object.