{"_id":"@traderouter/trade-router-mcp","_rev":"10-8229a0c2f568dcdf223b57836c4b87fb","name":"@traderouter/trade-router-mcp","dist-tags":{"latest":"1.0.13"},"versions":{"1.0.6":{"name":"@traderouter/trade-router-mcp","version":"1.0.6","license":"MIT","_id":"@traderouter/trade-router-mcp@1.0.6","maintainers":[{"name":"re-bruce-wayne","email":"41traderauto@gmail.com"}],"homepage":"https://github.com/traderouter/trade-router-mcp#readme","bugs":{"url":"https://github.com/traderouter/trade-router-mcp/issues"},"bin":{"trade-router-mcp":"trade-router-mcp.mjs"},"dist":{"shasum":"18bd7aec60e90784769631f442c36f22c75d63a1","tarball":"https://registry.npmjs.org/@traderouter/trade-router-mcp/-/trade-router-mcp-1.0.6.tgz","fileCount":6,"integrity":"sha512-Vjgj54FRWGYG+LNVg0i1Q8+pihqHoon0QmHknk+kG/BZ/7y3yduEokzaUWZhi+QDfaRouaigthjvdU2BpfTJug==","signatures":[{"sig":"MEQCICfzRyfwSKnEvt47Fp9o5f8WW/DjCRaa2fKQ8ZuelYVQAiBWT2YpF+G0qvjynOaxmQQT17zYTahgcZe1r0xTACMpNg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":61271},"main":"trade-router-mcp.mjs","type":"module","engines":{"node":">=18.0.0"},"gitHead":"8061be06ba9f4a4bac49f39663f9b1f1b4b5af79","mcpName":"io.github.traderouter/trade-router-mcp","scripts":{"start":"node trade-router-mcp.mjs"},"_npmUser":{"name":"re-bruce-wayne","email":"41traderauto@gmail.com"},"deprecated":"Contained leaked ephemeral publishing tokens (already revoked). Upgrade to 1.0.8.","repository":{"url":"git+https://github.com/traderouter/trade-router-mcp.git","type":"git"},"_npmVersion":"10.1.0","description":"TradeRouter.ai MCP Server — Solana swap & limit order engine","directories":{},"_nodeVersion":"20.7.0","dependencies":{"ws":"^8.18.0","bs58":"^6.0.0","tweetnacl":"^1.0.3","@solana/web3.js":"^1.98.0","@modelcontextprotocol/sdk":"^1.0.0"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/trade-router-mcp_1.0.6_1773290250011_0.059935217096652504","host":"s3://npm-registry-packages-npm-production"}},"1.0.7":{"name":"@traderouter/trade-router-mcp","version":"1.0.7","license":"MIT","_id":"@traderouter/trade-router-mcp@1.0.7","maintainers":[{"name":"re-bruce-wayne","email":"41traderauto@gmail.com"}],"homepage":"https://github.com/TradeRouter/trade-router-mcp#readme","bugs":{"url":"https://github.com/TradeRouter/trade-router-mcp/issues"},"bin":{"trade-router-mcp":"trade-router-mcp.mjs"},"dist":{"shasum":"3112da99e03af546f0504006b2028d6410a3f5c1","tarball":"https://registry.npmjs.org/@traderouter/trade-router-mcp/-/trade-router-mcp-1.0.7.tgz","fileCount":6,"integrity":"sha512-BPBla+t1vGawG0qiKz5R7U8QwtAc9pijSEa/w+f8BF0mbmtuFHYecCTN/R12gOTR9dBTMXVgx54zr91t9gsfmg==","signatures":[{"sig":"MEUCIEgjRfd7g646LPbbETerPwbLO/uFAegoYctKvNHh6Tw3AiEAjoqAYa2horxYsiMhp0Ff+egLBTyoiYXy9c137ohSGT0=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":61348},"main":"trade-router-mcp.mjs","type":"module","engines":{"node":">=18.0.0"},"gitHead":"8061be06ba9f4a4bac49f39663f9b1f1b4b5af79","mcpName":"io.github.TradeRouter/trade-router-mcp","scripts":{"start":"node trade-router-mcp.mjs"},"_npmUser":{"name":"re-bruce-wayne","email":"41traderauto@gmail.com"},"deprecated":"Contained leaked ephemeral publishing tokens (already revoked). Upgrade to 1.0.8.","repository":{"url":"git+https://github.com/TradeRouter/trade-router-mcp.git","type":"git"},"_npmVersion":"10.1.0","description":"TradeRouter.ai MCP Server — Solana swap & limit order engine","directories":{},"_nodeVersion":"20.7.0","dependencies":{"ws":"^8.18.0","bs58":"^6.0.0","tweetnacl":"^1.0.3","@solana/web3.js":"^1.98.0","@modelcontextprotocol/sdk":"^1.0.0"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/trade-router-mcp_1.0.7_1773291015412_0.6979026808747002","host":"s3://npm-registry-packages-npm-production"}},"1.0.8":{"name":"@traderouter/trade-router-mcp","version":"1.0.8","keywords":["mcp","model-context-protocol","solana","trading","defi","ai-agents","swap","limit-orders","trailing-stop","dca","twap","mev","jito","non-custodial","traderouter"],"author":{"name":"Trade Router"},"license":"MIT","_id":"@traderouter/trade-router-mcp@1.0.8","maintainers":[{"name":"re-bruce-wayne","email":"41traderauto@gmail.com"}],"homepage":"https://traderouter.ai","bugs":{"url":"https://github.com/TradeRouter/trade-router-mcp/issues"},"bin":{"trade-router-mcp":"trade-router-mcp.mjs"},"dist":{"shasum":"de345e60e7ca106d31fdc5633e388c529411ab1e","tarball":"https://registry.npmjs.org/@traderouter/trade-router-mcp/-/trade-router-mcp-1.0.8.tgz","fileCount":6,"integrity":"sha512-yKtBbqDOd/IwKQrRedXBzqHFBFdLAKt/2BGQuDSYOlCjSSOhqNMUXsW6xOino7d00MFYQuSYrNRe0sr9KDwLcg==","signatures":[{"sig":"MEYCIQCe6SvWDXJfE3C18/pUDnnN1alw7/7lJoXSA2ZCz00lfQIhANSzOVLdTDsxv3sInfNXjdqxKvqlVsqMIvo9yA7NKh3c","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":75650},"main":"trade-router-mcp.mjs","type":"module","engines":{"node":">=18.0.0"},"mcpName":"io.github.TradeRouter/trade-router-mcp","scripts":{"start":"node trade-router-mcp.mjs"},"_npmUser":{"name":"re-bruce-wayne","email":"41traderauto@gmail.com"},"repository":{"url":"git+https://github.com/TradeRouter/trade-router-mcp.git","type":"git"},"_npmVersion":"11.9.0","description":"Non-custodial Solana swap & limit order engine for AI agents — MCP server for TradeRouter.ai.","directories":{},"_nodeVersion":"25.6.0","dependencies":{"ws":"^8.18.0","bs58":"^6.0.0","tweetnacl":"^1.0.3","@solana/web3.js":"^1.98.0","@modelcontextprotocol/sdk":"^1.0.0"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/trade-router-mcp_1.0.8_1777060225820_0.4709704948360447","host":"s3://npm-registry-packages-npm-production"}},"1.0.9":{"name":"@traderouter/trade-router-mcp","version":"1.0.9","keywords":["mcp","model-context-protocol","solana","trading","defi","ai-agents","swap","limit-orders","trailing-stop","dca","twap","mev","jito","non-custodial","traderouter"],"author":{"name":"Trade Router"},"license":"MIT","_id":"@traderouter/trade-router-mcp@1.0.9","maintainers":[{"name":"re-bruce-wayne","email":"41traderauto@gmail.com"}],"homepage":"https://traderouter.ai","bugs":{"url":"https://github.com/TradeRouter/trade-router-mcp/issues"},"bin":{"trade-router-mcp":"trade-router-mcp.mjs"},"dist":{"shasum":"59ab11a9bb1ff5f638b7465fb0976b2ba38b460e","tarball":"https://registry.npmjs.org/@traderouter/trade-router-mcp/-/trade-router-mcp-1.0.9.tgz","fileCount":6,"integrity":"sha512-A9EOeFnwt6VWPWbOblIzDAEG2iinhJL3Mtp+feOFjPrXI6RN4zPcx1u07WpLr8suMIo+1I+UqCKMdSK3uLGKUg==","signatures":[{"sig":"MEUCIQCkAgNmsutsGAZu9xYz9+a85Lu24pz4zcEa5jqEfq2ZFQIgFPaCz50cqbs0u1p3L6jZhfgm6kCarJ8uE/HsnJVKs3c=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":80428},"main":"trade-router-mcp.mjs","type":"module","engines":{"node":">=18.0.0"},"gitHead":"eafc9ee15cef795c0b830406e732b966db70c8ae","mcpName":"io.github.TradeRouter/trade-router-mcp","scripts":{"test":"node --test test/*.test.mjs","start":"node trade-router-mcp.mjs"},"_npmUser":{"name":"re-bruce-wayne","email":"41traderauto@gmail.com"},"repository":{"url":"git+https://github.com/TradeRouter/trade-router-mcp.git","type":"git"},"_npmVersion":"11.9.0","description":"Non-custodial Solana swap & limit order engine for AI agents — MCP server for TradeRouter.ai.","directories":{},"_nodeVersion":"25.6.0","dependencies":{"ws":"^8.18.0","bs58":"^6.0.0","tweetnacl":"^1.0.3","@solana/web3.js":"^1.98.0","@modelcontextprotocol/sdk":"^1.0.0"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/trade-router-mcp_1.0.9_1777062992321_0.7367119852087305","host":"s3://npm-registry-packages-npm-production"}},"1.0.10":{"name":"@traderouter/trade-router-mcp","version":"1.0.10","keywords":["mcp","model-context-protocol","solana","trading","defi","ai-agents","swap","limit-orders","trailing-stop","dca","twap","mev","jito","non-custodial","traderouter"],"author":{"name":"Trade Router"},"license":"MIT","_id":"@traderouter/trade-router-mcp@1.0.10","maintainers":[{"name":"re-bruce-wayne","email":"41traderauto@gmail.com"}],"homepage":"https://traderouter.ai","bugs":{"url":"https://github.com/TradeRouter/trade-router-mcp/issues"},"bin":{"trade-router-mcp":"trade-router-mcp.mjs"},"dist":{"shasum":"11ade629a7165adb9b99c444048d1b9b637c25b9","tarball":"https://registry.npmjs.org/@traderouter/trade-router-mcp/-/trade-router-mcp-1.0.10.tgz","fileCount":6,"integrity":"sha512-TVwTH2b1tpGFLT9TfJcHhU0kW0KpHG3nMzIxq45n/S4UjM791gvWugAgo9u+tU3hGZlOxKyN7nfpBxR1+OTkGg==","signatures":[{"sig":"MEUCIQDLu9Zv4dyH724pwBZqqQCygVq1E3prBYT+73fYonlRMQIgVnkPHyiIrvzfqOdvTZeXtXAJCOunQ0jTroEoEHcEsRk=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":81605},"main":"trade-router-mcp.mjs","type":"module","engines":{"node":">=18.0.0"},"gitHead":"bbecd41257ceeac528677afac2ef72e253f7d95f","mcpName":"ai.traderouter/trade-router-mcp","scripts":{"test":"node --test test/*.test.mjs","start":"node trade-router-mcp.mjs"},"_npmUser":{"name":"re-bruce-wayne","email":"41traderauto@gmail.com"},"repository":{"url":"git+https://github.com/TradeRouter/trade-router-mcp.git","type":"git"},"_npmVersion":"11.9.0","description":"Non-custodial Solana swap & limit order engine for AI agents — MCP server for TradeRouter.ai.","directories":{},"_nodeVersion":"25.6.0","dependencies":{"ws":"^8.18.0","bs58":"^6.0.0","tweetnacl":"^1.0.3","@solana/web3.js":"^1.98.0","@modelcontextprotocol/sdk":"^1.0.0"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/trade-router-mcp_1.0.10_1777105291161_0.04760040884016181","host":"s3://npm-registry-packages-npm-production"}},"1.0.11":{"name":"@traderouter/trade-router-mcp","version":"1.0.11","keywords":["mcp","model-context-protocol","solana","trading","defi","ai-agents","swap","limit-orders","trailing-stop","dca","twap","mev","jito","non-custodial","traderouter"],"author":{"name":"Trade Router"},"license":"MIT","_id":"@traderouter/trade-router-mcp@1.0.11","maintainers":[{"name":"re-bruce-wayne","email":"41traderauto@gmail.com"}],"homepage":"https://traderouter.ai","bugs":{"url":"https://github.com/TradeRouter/trade-router-mcp/issues"},"bin":{"trade-router-mcp":"trade-router-mcp.mjs"},"dist":{"shasum":"fe50c4c59c7e6c8d4d8086f36734b54539f254f8","tarball":"https://registry.npmjs.org/@traderouter/trade-router-mcp/-/trade-router-mcp-1.0.11.tgz","fileCount":6,"integrity":"sha512-gnzV5YI/LFqA9s8P8L19ARjgSjEFznBwSAmbor0nPJxCshG7DY1iFld67r6YFVbM7B4SfjT0BgxDtPSHL1CpAA==","signatures":[{"sig":"MEUCIQCCwcDVs16trT4xIstalmnXu1bZkGH6TJYK3v5RKxWieQIgUE3ZRpXxeIQf0moXi7E49B/SCHlXYJGIiEfEINjGy14=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":113538},"main":"trade-router-mcp.mjs","type":"module","engines":{"node":">=18.0.0"},"gitHead":"29fef1779c4fd43c42a2c70192a0dbd83ddc8e73","mcpName":"ai.traderouter/trade-router-mcp","scripts":{"test":"node --test test/*.test.mjs","start":"node trade-router-mcp.mjs"},"_npmUser":{"name":"re-bruce-wayne","email":"41traderauto@gmail.com"},"repository":{"url":"git+https://github.com/TradeRouter/trade-router-mcp.git","type":"git"},"_npmVersion":"11.9.0","description":"Non-custodial Solana swap & limit order engine for AI agents — MCP server for TradeRouter.ai.","directories":{},"_nodeVersion":"25.6.0","dependencies":{"ws":"^8.18.0","bs58":"^6.0.0","tweetnacl":"^1.0.3","@solana/web3.js":"^1.98.0","@modelcontextprotocol/sdk":"^1.0.0"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/trade-router-mcp_1.0.11_1777124948455_0.06586208944881755","host":"s3://npm-registry-packages-npm-production"}},"1.0.12":{"name":"@traderouter/trade-router-mcp","version":"1.0.12","keywords":["mcp","model-context-protocol","solana","trading","defi","ai-agents","swap","limit-orders","trailing-stop","dca","twap","mev","jito","non-custodial","traderouter"],"author":{"name":"Trade Router"},"license":"MIT","_id":"@traderouter/trade-router-mcp@1.0.12","maintainers":[{"name":"re-bruce-wayne","email":"41traderauto@gmail.com"}],"homepage":"https://traderouter.ai","bugs":{"url":"https://github.com/TradeRouter/trade-router-mcp/issues"},"bin":{"trade-router-mcp":"trade-router-mcp.mjs"},"dist":{"shasum":"82417875215532ce93040019398f41c69992abe0","tarball":"https://registry.npmjs.org/@traderouter/trade-router-mcp/-/trade-router-mcp-1.0.12.tgz","fileCount":6,"integrity":"sha512-JjXTrQbNijo6sguOViUnnNGeNt4pisuuR4TNARpyc5tUEZWk33RuuvIiFa6BopDw6uqD70eDtK/FgWoybp2t8Q==","signatures":[{"sig":"MEUCIQDJdWH+rlQs1/1Yn4n0zhTc8K6b1gSpHWwo4VLFpLrzFAIgaytfyOF7goAy6u+98v5UN0BkqwP9SjC+qdJk2xJ43Mg=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":115785},"main":"trade-router-mcp.mjs","type":"module","engines":{"node":">=18.0.0"},"gitHead":"6438957be1eb210fde5c39ef3f318e56cc60f016","mcpName":"ai.traderouter/trade-router-mcp","scripts":{"test":"node --test test/*.test.mjs","start":"node trade-router-mcp.mjs"},"_npmUser":{"name":"re-bruce-wayne","email":"41traderauto@gmail.com"},"repository":{"url":"git+https://github.com/TradeRouter/trade-router-mcp.git","type":"git"},"_npmVersion":"11.9.0","description":"Non-custodial Solana swap & limit order engine for AI agents — MCP server for TradeRouter.ai.","directories":{},"_nodeVersion":"25.6.0","dependencies":{"ws":"^8.18.0","bs58":"^6.0.0","tweetnacl":"^1.0.3","@solana/web3.js":"^1.98.0","@modelcontextprotocol/sdk":"^1.0.0"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/trade-router-mcp_1.0.12_1777126301302_0.7875805750471703","host":"s3://npm-registry-packages-npm-production"}},"1.0.13":{"name":"@traderouter/trade-router-mcp","version":"1.0.13","description":"Non-custodial Solana swap & limit order engine for AI agents — MCP server for TradeRouter.ai.","type":"module","mcpName":"ai.traderouter/trade-router-mcp","main":"trade-router-mcp.mjs","bin":{"trade-router-mcp":"trade-router-mcp.mjs"},"scripts":{"start":"node trade-router-mcp.mjs","test":"node --test test/*.test.mjs"},"keywords":["mcp","model-context-protocol","solana","trading","defi","ai-agents","swap","limit-orders","trailing-stop","dca","twap","mev","jito","non-custodial","traderouter"],"repository":{"type":"git","url":"git+https://github.com/TradeRouter/trade-router-mcp.git"},"homepage":"https://traderouter.ai","bugs":{"url":"https://github.com/TradeRouter/trade-router-mcp/issues"},"author":{"name":"Trade Router"},"license":"MIT","dependencies":{"@modelcontextprotocol/sdk":"^1.0.0","@solana/web3.js":"^1.98.0","bs58":"^6.0.0","tweetnacl":"^1.0.3","ws":"^8.18.0"},"engines":{"node":">=18.0.0"},"gitHead":"bd989f0dead50eaa387f728ebe2834692fd9d962","_id":"@traderouter/trade-router-mcp@1.0.13","_nodeVersion":"25.6.0","_npmVersion":"11.9.0","dist":{"integrity":"sha512-mBMdOhYVj1KB1OzsalilxobBnqKUe6xdrGQ7ACkzHZij0p8r5yp7/UDHS2J86DcP1167jRNhuYxzqezXnSmN5g==","shasum":"1d95ab5665aca4f5c31005ea2a1a77df07675e91","tarball":"https://registry.npmjs.org/@traderouter/trade-router-mcp/-/trade-router-mcp-1.0.13.tgz","fileCount":6,"unpackedSize":120712,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDU/6E8i7Z1TpxYtcFtNBs/mp/8f6BKHdEs3s7ccFuKdgIhAM/hUXSliSVMDr3tcNCSqeavGjwWOm5AiTBbA7bEPg1n"}]},"_npmUser":{"name":"re-bruce-wayne","email":"41traderauto@gmail.com"},"directories":{},"maintainers":[{"name":"re-bruce-wayne","email":"41traderauto@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/trade-router-mcp_1.0.13_1777278256036_0.1783794582292606"},"_hasShrinkwrap":false}},"time":{"created":"2026-03-12T04:37:29.886Z","modified":"2026-04-27T08:24:16.363Z","1.0.6":"2026-03-12T04:37:30.142Z","1.0.7":"2026-03-12T04:50:15.567Z","1.0.8":"2026-04-24T19:50:25.960Z","1.0.9":"2026-04-24T20:36:32.562Z","1.0.10":"2026-04-25T08:21:31.293Z","1.0.11":"2026-04-25T13:49:08.601Z","1.0.12":"2026-04-25T14:11:41.565Z","1.0.13":"2026-04-27T08:24:16.201Z"},"bugs":{"url":"https://github.com/TradeRouter/trade-router-mcp/issues"},"author":{"name":"Trade Router"},"license":"MIT","homepage":"https://traderouter.ai","keywords":["mcp","model-context-protocol","solana","trading","defi","ai-agents","swap","limit-orders","trailing-stop","dca","twap","mev","jito","non-custodial","traderouter"],"repository":{"type":"git","url":"git+https://github.com/TradeRouter/trade-router-mcp.git"},"description":"Non-custodial Solana swap & limit order engine for AI agents — MCP server for TradeRouter.ai.","maintainers":[{"name":"re-bruce-wayne","email":"41traderauto@gmail.com"}],"readme":"# @traderouter/trade-router-mcp\n\n<!-- mcp-name: ai.traderouter/trade-router-mcp -->\n\nA [Model Context Protocol](https://modelcontextprotocol.io) server for [TradeRouter.ai](https://traderouter.ai) — non-custodial Solana swap, limit, trailing, DCA, TWAP, and combo-order engine for AI agents.\n\n[![Security: non-custodial](https://img.shields.io/badge/Security-Non%20Custodial-green.svg)](./SECURITY.md)\n[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](./LICENSE)\n[![npm](https://img.shields.io/npm/v/@traderouter/trade-router-mcp.svg)](https://www.npmjs.com/package/@traderouter/trade-router-mcp)\n[![Awesome MCP Servers](https://cdn.rawgit.com/sindresorhus/awesome/d7305f38d29fed78fa85652e3a63e154dd8e8829/media/badge.svg)](https://github.com/punkpeye/awesome-mcp-servers#-finance--fintech)\n[![Glama MCP Server](https://glama.ai/mcp/servers/@traderouter/trade-router-mcp/badges/score.svg)](https://glama.ai/mcp/servers/@traderouter/trade-router-mcp)\n[![MCP Registry](https://img.shields.io/badge/MCP%20Registry-ai.traderouter%2Ftrade--router--mcp-blue.svg)](https://registry.modelcontextprotocol.io/v0/servers?search=trade-router)\n\n## Is this safe?\n\n**Yes, and here's exactly why.** The private key is read once from `TRADEROUTER_PRIVATE_KEY`, used for local signing with `@solana/web3.js` + `tweetnacl`, and never transmitted, logged, or persisted. Only signed transactions leave your machine. Server messages are Ed25519-verified against a hard-coded trust anchor. See [SECURITY.md](./SECURITY.md) for the full threat model, data-flow diagram, and permissions manifest.\n\n**Signing flow:**\n\n1. Agent calls `build_swap` → MCP sends wallet *address* (public key) to api.traderouter.ai\n2. API returns an **unsigned** transaction\n3. **MCP signs the tx locally** using `TRADEROUTER_PRIVATE_KEY`\n4. The *signed* transaction is submitted to `/protect` (Jito MEV-protected bundle)\n5. Server confirms and returns balance changes. The private key never crosses the network.\n\n## Requirements\n\n- Node.js ≥ 18\n- A Solana wallet private key in base58 format (use a dedicated trading wallet, not your main holdings)\n\n## Install\n\n```bash\nnpx -y @traderouter/trade-router-mcp\n```\n\nOr wire it into an MCP client (Claude Desktop, Cursor, Cline, etc.):\n\n```json\n{\n  \"mcpServers\": {\n    \"traderouter\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@traderouter/trade-router-mcp\"],\n      \"env\": {\n        \"TRADEROUTER_PRIVATE_KEY\": \"your_base58_private_key\"\n      }\n    }\n  }\n}\n```\n\n| OS      | Claude Desktop config path                                          |\n|---------|---------------------------------------------------------------------|\n| macOS   | `~/Library/Application Support/Claude/claude_desktop_config.json`   |\n| Windows | `%APPDATA%\\Claude\\claude_desktop_config.json`                       |\n| Linux   | `~/.config/Claude/claude_desktop_config.json`                       |\n\n## Environment variables\n\n| Variable | Required | Default | Purpose |\n|---|---|---|---|\n| `TRADEROUTER_PRIVATE_KEY` | ✅ | — | Solana wallet private key (base58). Local use only. |\n| `SOLANA_RPC_URL` | ❌ | `https://api.mainnet-beta.solana.com` | Custom RPC for reads |\n| `TRADEROUTER_SERVER_PUBKEY` | ❌ | baked-in trust anchor | Override the server's Ed25519 trust anchor |\n| `TRADEROUTER_SERVER_PUBKEY_NEXT` | ❌ | *(unset)* | Accept messages signed by this key in addition to the primary (key rotation) |\n| `TRADEROUTER_REQUIRE_SERVER_SIGNATURE` | ❌ | `true` | Verify server signatures on `order_filled` / `twap_execution` |\n| `TRADEROUTER_REQUIRE_ORDER_CREATED_SIGNATURE` | ❌ | `true` | Verify server signatures on `order_created` |\n| `TRADEROUTER_DRY_RUN` | ❌ | `false` | When `true`, every write-action tool (`submit_signed_swap`, `auto_swap`, `place_*_order`, `cancel_order`, `extend_order`) returns `{ dry_run: true, tool, args }` instead of calling the API. Read-only tools execute normally. Added in 1.0.9. |\n\n## Tools\n\n| Tool | Purpose |\n|---|---|\n| `get_wallet_address` | Get the configured wallet's public address |\n| `build_swap` | Build an unsigned swap transaction |\n| `submit_signed_swap` | Submit a manually signed transaction |\n| `auto_swap` | Build + sign + submit in one call |\n| `get_holdings` | Get token holdings for a wallet |\n| `get_mcap` | Market cap and price for a token |\n| `get_flex_card` | Trade card PNG URL for wallet + token |\n| `place_limit_order` | Limit buy/sell by price or market cap |\n| `place_trailing_order` | Trailing stop buy/sell |\n| `place_twap_order` | TWAP (time-weighted) buy/sell |\n| `place_limit_twap_order` | Limit trigger → TWAP execution |\n| `place_trailing_twap_order` | Trailing trigger → TWAP execution |\n| `place_limit_trailing_order` | Limit trigger → trailing execution (single swap on trigger) |\n| `place_limit_trailing_twap_order` | Limit trigger → trailing trigger → TWAP execution |\n| `list_orders` | List active orders for a wallet |\n| `check_order` | Get status of a specific order |\n| `cancel_order` | Cancel an active order |\n| `extend_order` | Extend an order's expiry |\n| `connect_websocket` | Register a wallet over the persistent WebSocket |\n| `connection_status` | Current WebSocket connection state |\n| `get_fill_log` | Log of filled orders |\n\n## REST endpoints (under the hood)\n\n| Endpoint | Purpose |\n|---|---|\n| `POST /swap` | Build unsigned swap (multi-DEX: Raydium, PumpSwap, Orca, Meteora) |\n| `POST /protect` | Submit signed tx via Jito bundle — MEV-protected |\n| `POST /holdings` | Wallet scan — catches tokens standard RPC misses |\n| `GET /mcap` | Market cap + price |\n| `GET /flex` | Trade card PNG generation |\n| `wss://api.traderouter.ai/ws` | Persistent WebSocket for limits / trailing / DCA / TWAP / combo orders |\n\n## Trust anchor\n\nThe baked-in server public key is `EXX3nRzfDUvbjZSmxFzHDdiSYeGVP1EGr77iziFZ4Jd4`. Every `order_filled`, `order_created`, and `twap_execution` message from the server is verified with Ed25519 before being treated as authoritative. See [SECURITY.md](./SECURITY.md) for details and the rotation mechanism (`TRADEROUTER_SERVER_PUBKEY_NEXT`).\n\n## Use with LangChain\n\nAny MCP server works in LangChain via the official adapter:\n\n```python\nfrom langchain_mcp_adapters.client import MultiServerMCPClient\n\nclient = MultiServerMCPClient({\n    \"traderouter\": {\n        \"command\": \"npx\",\n        \"args\": [\"-y\", \"@traderouter/trade-router-mcp\"],\n        \"transport\": \"stdio\",\n        \"env\": {\"TRADEROUTER_PRIVATE_KEY\": \"<base58>\"},\n    },\n})\ntools = await client.get_tools()\n```\n\n## Fees\n\nFlat **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.\n\n## Machine-readable specs (live on traderouter.ai)\n\n| URL | Format | Purpose |\n|---|---|---|\n| <https://traderouter.ai/openapi.json> | OpenAPI 3.1 (JSON) | Canonical API contract — generate SDKs in any language |\n| <https://traderouter.ai/openapi.yaml> | OpenAPI 3.1 (YAML) | Same spec, YAML format (regenerated from the JSON) |\n| <https://traderouter.ai/llms.txt> | text | LLM-readable API guide (per [llmstxt.org](https://llmstxt.org/)) |\n| <https://traderouter.ai/SKILL.md> | markdown | Anthropic Agent Skills format — full implementation guide |\n| <https://traderouter.ai/SECURITY.md> | markdown | Threat model + data-flow diagram + permissions manifest (mirrors [./SECURITY.md](./SECURITY.md) here) |\n| <https://traderouter.ai/CHANGELOG.md> | markdown | Unified changelog across the API / MCP server / Site version tracks |\n\nQuick SDK generation:\n\n```bash\n# TypeScript\nopenapi-generator-cli generate -i https://traderouter.ai/openapi.yaml -g typescript-axios -o ./sdk-ts\n\n# Python\nopenapi-generator-cli generate -i https://traderouter.ai/openapi.yaml -g python -o ./sdk-py\n```\n\n## Security disclosure\n\nEmail **security@traderouter.ai** or use GitHub Security Advisories on this repo. 48-hour acknowledgement. See [SECURITY.md](./SECURITY.md) (or the [hosted version](https://traderouter.ai/SECURITY.md) if you'd rather link to a stable URL).\n\n## License\n\nMIT. See [LICENSE](./LICENSE).\n\n## Changelog\n\nSee [CHANGELOG.md](./CHANGELOG.md).\n","readmeFilename":"README.md"}