Integrations

Trade Router speaks MCP, REST, and WebSocket. Below: drop-in config snippets for every major MCP client and agent framework. Pick the one you use; copy-paste the block; restart your client; you're done.
Common to all: set 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.

Direct MCP integrations

Claude Desktop tested

Config path: ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) · %APPDATA%\Claude\claude_desktop_config.json (Windows) · ~/.config/Claude/claude_desktop_config.json (Linux)
{
  "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?"

Cursor tested

Config path: ~/.cursor/mcp.json (or via Settings → MCP)
{
  "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.

Cline (VS Code) tested

Add via Cline's MCP settings UI, or edit ~/.cline/mcp_servers.json
{
  "mcpServers": {
    "traderouter": {
      "command": "npx",
      "args": ["-y", "@traderouter/trade-router-mcp"],
      "env": { "TRADEROUTER_PRIVATE_KEY": "your_base58_private_key" }
    }
  }
}

Continue.dev zero-config

Config path: ~/.continue/config.json
{
  "experimental": {
    "modelContextProtocolServers": [
      {
        "transport": {
          "type": "stdio",
          "command": "npx",
          "args": ["-y", "@traderouter/trade-router-mcp"]
        }
      }
    ]
  }
}
Continue auto-discovers tool schemas via MCP introspection.

Goose (Block) tested

Config path: ~/.config/goose/config.yaml
extensions:
  traderouter:
    type: stdio
    cmd: npx
    args:
      - "-y"
      - "@traderouter/trade-router-mcp"
    env:
      TRADEROUTER_PRIVATE_KEY: your_base58_private_key

Zed zero-config

Settings → Extensions → MCP, or ~/.config/zed/settings.json
{
  "context_servers": {
    "traderouter": {
      "command": {
        "path": "npx",
        "args": ["-y", "@traderouter/trade-router-mcp"]
      },
      "settings": {}
    }
  }
}

Framework integrations

ElizaOS

Uses the official @fleek-platform/eliza-plugin-mcp generic MCP adapter. Cookbook: 06-elizaos-agent.
// 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.

LangChain (Python)

Uses the official langchain-mcp-adapters package. Cookbook: 07-langchain-agent.
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)

LangChain.js (TypeScript)

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 });

LlamaIndex (Python)

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()

Anthropic Agent SDK / Claude Code

For agent skills built directly on the Anthropic SDK or running inside Claude Code.
// claude-code: ~/.claude.json or project-level
{
  "mcpServers": {
    "traderouter": {
      "type": "stdio",
      "command": "npx",
      "args": ["-y", "@traderouter/trade-router-mcp"],
      "env": { "TRADEROUTER_PRIVATE_KEY": "<base58>" }
    }
  }
}

Solana agent toolkits

Solana Agent Kit (SendAI)

Solana Agent Kit supports MCP servers as tool sources. Add Trade Router as a server and you get all 21 tools alongside SendAI's native actions.
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.

GOAT SDK (Crossmint)

GOAT's Solana adapter pairs cleanly with MCP servers. Trade Router fills the order-management gap (limits, trailing, TWAP) that GOAT doesn't ship natively.
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 },
    }),
  ],
});

Helius (read-side complement)

Helius is the canonical RPC + indexer for Solana reads. Trade Router is the canonical write-side for swap and order management. Pair them.
// 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 } }

If you don't want MCP at all

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