Tutorial — DeFi
Swap on Solana through Tenzro
The Solana MCP server at
solana-mcp.tenzro.network exposes 14 tools, includingsolana_swap against Jupiter. An agent with an SVM wallet can swap SPL tokens without leaving the A2A surface.- Level
- Intermediate
- Time
- ~15 min
- Prerequisites
- Solana wallet, MCP-aware client
- Stack
- TypeScript · MCP
01
Open the Solana MCP client
The MCP transport is Streamable HTTP, like the main Tenzro MCP.
import { McpClient } from "tenzro-sdk";
const sol = new McpClient("https://solana-mcp.tenzro.network/mcp");02
Get a quote
Quote against Jupiter for current pricing and slippage.
const quote = await sol.call("solana_get_price", { from: "USDC", to: "SOL" });03
Execute the swap
The tool returns a partially-signed transaction; the agent signs and submits.
const swap = await sol.call("solana_swap", {
from: "USDC",
to: "SOL",
amount: "25",
slippage_bps: 50,
});04
Confirm and inspect
Tenzro records the swap as a cross-chain settlement entry for audit.
await sol.call("solana_get_transaction", { signature: swap.signature });Related