TRADEROUTER_PRIVATE_KEY to your base58 Solana wallet key. Use a dedicated trading wallet, not your main holdings. For safe iteration, also set TRADEROUTER_DRY_RUN=true — every write tool short-circuits, read tools execute normally.
{
"mcpServers": {
"traderouter": {
"command": "npx",
"args": ["-y", "@traderouter/trade-router-mcp"],
"env": {
"TRADEROUTER_PRIVATE_KEY": "your_base58_private_key"
}
}
}
}
Restart Claude Desktop. Try: "Get the holdings for wallet ABC..." or "What's the market cap of BONK?"
{
"mcpServers": {
"traderouter": {
"command": "npx",
"args": ["-y", "@traderouter/trade-router-mcp"],
"env": { "TRADEROUTER_PRIVATE_KEY": "your_base58_private_key" }
}
}
}
Same JSON shape as Claude Desktop. Cursor surfaces the tools in the agent panel.
{
"mcpServers": {
"traderouter": {
"command": "npx",
"args": ["-y", "@traderouter/trade-router-mcp"],
"env": { "TRADEROUTER_PRIVATE_KEY": "your_base58_private_key" }
}
}
}
{
"experimental": {
"modelContextProtocolServers": [
{
"transport": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@traderouter/trade-router-mcp"]
}
}
]
}
}
Continue auto-discovers tool schemas via MCP introspection.
extensions:
traderouter:
type: stdio
cmd: npx
args:
- "-y"
- "@traderouter/trade-router-mcp"
env:
TRADEROUTER_PRIVATE_KEY: your_base58_private_key
{
"context_servers": {
"traderouter": {
"command": {
"path": "npx",
"args": ["-y", "@traderouter/trade-router-mcp"]
},
"settings": {}
}
}
}
// In your character JSON:
{
"name": "TraderBot",
"plugins": ["@fleek-platform/eliza-plugin-mcp"],
"settings": {
"mcp": {
"servers": {
"traderouter": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@traderouter/trade-router-mcp"],
"env": { "TRADEROUTER_PRIVATE_KEY": "your_base58_private_key" }
}
}
}
}
}
All 21 Trade Router tools auto-register as ElizaOS actions. The bot can then handle "swap 0.1 SOL into BONK with 1.5% slippage" in chat.
from langchain_mcp_adapters.client import MultiServerMCPClient
from langgraph.prebuilt import create_react_agent
from langchain_anthropic import ChatAnthropic
client = MultiServerMCPClient({
"traderouter": {
"command": "npx",
"args": ["-y", "@traderouter/trade-router-mcp"],
"transport": "stdio",
"env": {"TRADEROUTER_PRIVATE_KEY": "<base58>"},
},
})
tools = await client.get_tools()
agent = create_react_agent(ChatAnthropic(model="claude-3-7-sonnet-20250219"), tools)
import { MultiServerMCPClient } from "@langchain/mcp-adapters";
import { createReactAgent } from "@langchain/langgraph/prebuilt";
import { ChatAnthropic } from "@langchain/anthropic";
const client = new MultiServerMCPClient({
mcpServers: {
traderouter: {
command: "npx",
args: ["-y", "@traderouter/trade-router-mcp"],
env: { TRADEROUTER_PRIVATE_KEY: "<base58>" },
},
},
});
const tools = await client.getTools();
const agent = createReactAgent({ llm: new ChatAnthropic({ model: "claude-3-7-sonnet-20250219" }), tools });
from llama_index.tools.mcp import McpToolSpec, BasicMCPClient
client = BasicMCPClient(
"npx", args=["-y", "@traderouter/trade-router-mcp"],
env={"TRADEROUTER_PRIVATE_KEY": "<base58>"},
)
tool_spec = McpToolSpec(client=client)
tools = await tool_spec.to_tool_list_async()
// claude-code: ~/.claude.json or project-level
{
"mcpServers": {
"traderouter": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@traderouter/trade-router-mcp"],
"env": { "TRADEROUTER_PRIVATE_KEY": "<base58>" }
}
}
}
import { SolanaAgentKit } from "solana-agent-kit";
import { MCPClient } from "solana-agent-kit/mcp";
const agent = new SolanaAgentKit(
process.env.WALLET_PRIVATE_KEY,
process.env.SOLANA_RPC_URL,
);
await agent.connectMCP({
command: "npx",
args: ["-y", "@traderouter/trade-router-mcp"],
env: { TRADEROUTER_PRIVATE_KEY: process.env.WALLET_PRIVATE_KEY },
});
Use SendAI for token launches and Helius reads, Trade Router for limits / TWAP / MEV-protected execution.
import { getOnChainTools } from "@goat-sdk/adapter-vercel-ai";
import { mcp } from "@goat-sdk/plugin-mcp";
const tools = await getOnChainTools({
wallet: solanaWallet,
plugins: [
mcp({
command: "npx",
args: ["-y", "@traderouter/trade-router-mcp"],
env: { TRADEROUTER_PRIVATE_KEY: WALLET_KEY },
}),
],
});
// Use Helius for token discovery, indexing, and webhooks
const helius = new Helius(process.env.HELIUS_API_KEY);
const newToken = await helius.findNewToken(...);
// Then use Trade Router to execute on what you found
{ tool: "auto_swap", args: { wallet_address, token_address: newToken, action: "buy", amount: 100000000, slippage: 1500 } }
The MCP server is a thin convenience layer over the REST + WebSocket API. You can call the API directly from any language. There is no API key, no bearer token, no auth header — your wallet address is the identity.
# Build an unsigned swap tx
curl -X POST https://api.traderouter.ai/swap \
-H 'Content-Type: application/json' \
-d '{"wallet_address":"W","token_address":"T","action":"buy","amount":100000000,"slippage":1500}'
# Sign locally, then submit through MEV-protected /protect
curl -X POST https://api.traderouter.ai/protect \
-H 'Content-Type: application/json' \
-d '{"signed_tx_base64":"<your-signed-tx>"}'
# Get holdings
curl -X POST https://api.traderouter.ai/holdings \
-H 'Content-Type: application/json' \
-d '{"wallet_address":"W"}'
Full spec: openapi.json · openapi.yaml · LLM-readable: llms.txt