- Home
- MCP servers
- Trade Router
Trade Router
- javascript
0
GitHub Stars
javascript
Language
3 months ago
First Indexed
2 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"re-bruce-wayne-trade-router-mcp": {
"command": "npx",
"args": [
"-y",
"@re-bruce-wayne/trade-router-mcp"
],
"env": {
"SOLANA_RPC_URL": "https://api.mainnet-beta.solana.com",
"TRADEROUTER_PRIVATE_KEY": "your_base58_private_key",
"TRADEROUTER_SERVER_PUBKEY": "your_server_public_key",
"TRADEROUTER_SERVER_PUBKEY_NEXT": "next_server_public_key",
"TRADEROUTER_REQUIRE_SERVER_SIGNATURE": "true",
"TRADEROUTER_REQUIRE_ORDER_CREATED_SIGNATURE": "true"
}
}
}
}You can run a TradeRouter MCP server locally to interact with the Solana-based swap and limit order engine. This server exposes a set of programmatic endpoints that your MCP client can use to build and submit transactions, manage orders, and monitor activity in a secure, signature-verified environment.
How to use
You will operate the MCP server from an MCP client. The server runs as a local process you start with an MCP command. Use the provided tools to build, sign, submit, and monitor trades and orders. Connect to the server via the standard MCP workflow your client expects, including wallet key handling, order placement, and status queries. The server accepts your wallet key as a private key in base58 format and uses it to interact with the Solana network.
How to install
Prerequisites: ensure you have Node.js installed on your computer. The minimum version required is Node.js 20.18.0.
Install the MCP server package using the following command. It will install and run the MCP server for you.
npx @re-bruce-wayne/trade-router-mcp
Additional configuration and setup
Configure your Claude Desktop environment to launch the MCP server automatically as part of your desktop app setup. The following configuration shows how to define the MCP server in your Claude desktop configuration, including how to supply your private key.
{
"mcpServers": {
"traderouter": {
"command": "npx",
"args": ["-y", "@re-bruce-wayne/trade-router-mcp"],
"env": {
"TRADEROUTER_PRIVATE_KEY": "your_base58_private_key"
}
}
}
}
Environment variables
The server relies on specific environment variables to authenticate and connect to the Solana network. You should provide at least the wallet private key and any optional network or signature verification settings as needed.
TRADEROUTER_PRIVATE_KEY=your_base58_private_key
SOLANA_RPC_URL=https://api.mainnet-beta.solana.com
TRADEROUTER_SERVER_PUBKEY=your_server_public_key
TRADEROUTER_SERVER_PUBKEY_NEXT=next_server_public_key
TRADEROUTER_REQUIRE_SERVER_SIGNATURE=true
TRADEROUTER_REQUIRE_ORDER_CREATED_SIGNATURE=true
Notes on security and best practices
Treat your private key with the utmost security. Do not expose it in logs or shared configurations. When testing, consider using a dedicated wallet and a test RPC endpoint if available. Enable signature verification where appropriate to guard against forged fills or orders.
Supported actions and workflows
With the MCP server running, you can perform actions such as querying wallet holdings, building unsigned or signed transactions, submitting swaps, placing limit and trailing orders, listing and checking orders, extending expiries, and managing WebSocket connections for live updates.
Available tools
get_wallet_address
Retrieve the configured wallet address from the MCP server configuration.
build_swap
Create an unsigned swap transaction that you can review or sign.
submit_signed_swap
Submit a manually signed swap transaction to the network.
auto_swap
Build and automatically sign a swap in a single step.
get_holdings
Query token holdings for the specified wallet.
place_limit_order
Place a limit buy or sell order on the market.
place_trailing_order
Place a trailing buy or sell order with dynamic pricing.
list_orders
List all active orders for a wallet.
check_order
Check the status of a specific order.
cancel_order
Cancel an active order.
extend_order
Extend an order's expiry time.
connect_websocket
Connect and register a WebSocket for a wallet to receive updates.
connection_status
Get the current WebSocket connection status.
get_fill_log
Retrieve a log of filled orders.