Smeltor is a single API that connects apps and agents to DeFi protocols — swap, earn, trade, bridge — without deploying smart contracts or touching user funds.
Same surface, two transports. Use the MCP server from any LLM client; use the REST API from anywhere else. Both wrap the same logic — fee params, slippage clamping, aggregator failover live in one place.
swap | earn | perp_short | perp_long | bridge to the right tool.Streamable HTTP transport, no auth, hosted on Supabase Edge Functions. Drop this block into your MCP client config (Claude Desktop, Inspector, custom LLM agent) and the five tools become available immediately.
{
"mcpServers": {
"smeltor": {
"transport": "streamable-http",
"url": "https://juaroposgdkfbvqvzvxf.supabase.co/functions/v1/smeltor-mcp"
}
}
}
Test from a terminal:
curl -sX POST https://juaroposgdkfbvqvzvxf.supabase.co/functions/v1/smeltor-mcp \ -H "Content-Type: application/json" \ -H "Accept: text/event-stream, application/json" \ -d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'
Compares 1inch / KyberSwap / ParaSwap / OpenOcean in parallel and returns
ready-to-sign calldata for the winner — including the unlimited ERC-20
approval as transactions[0].
curl -sX POST https://basiyx.vercel.app/api/public/swap/best-quote \ -H "Content-Type: application/json" \ -d '{ "fromToken": "USDC", "toToken": "ETH", "amount": "10", "chain": "base", "walletAddress": "0xYourWallet…" }'
{
"bestAggregator": "paraswap",
"estimatedOutput": "0.004323728733018535",
"transactions": [
{
"kind": "approval",
"chainId": 8453,
"to": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
"data": "0x095ea7b3…",
"value": "0"
},
{
"kind": "swap",
"chainId": 8453,
"to": "0x59C7C832e96D2568bea6db468C1aAdcbbDa08A52",
"data": "0x54e3f31b…",
"value": "0",
"gas": "300000"
}
],
"savings": { "amount": "0.000033", "percent": 0.78, "vs": "openocean" },
"allQuotes": [
{ "aggregator": "paraswap", "output": "0.0043237" },
{ "aggregator": "1inch", "output": "0.0043108" },
{ "aggregator": "kyberswap", "output": "0.0042915" },
{ "aggregator": "openocean", "output": "0.0042914" }
],
"failedAggregators": [],
"chain": "base"
}
Compares Aave V3 and Moonwell APYs and returns approve + supply calldata
for the higher-yielding protocol. Pass protocol: "aave" or
protocol: "moonwell" to override the auto-pick.
curl -sX POST https://basiyx.vercel.app/api/public/earn/best-deposit \ -H "Content-Type: application/json" \ -d '{ "token": "USDC", "amount": "1000", "chain": "base", "walletAddress": "0xYourWallet…" }'
{
"bestProtocol": "moonwell",
"apy": 4.74,
"transactions": [
{
"kind": "approval",
"chainId": 8453,
"to": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
"data": "0x095ea7b3…"
},
{
"kind": "deposit",
"chainId": 8453,
"to": "0xEdc817A28E8B93B03976FBd4a3dDBc9f7D176c22",
"data": "0xa0712d68…"
}
],
"approvalSpender": "0xEdc817A28E8B93B03976FBd4a3dDBc9f7D176c22",
"allYields": { "aave": 3.93, "moonwell": 4.74 },
"chain": "base"
}
Detects HL state, computes order size + tick-formatted limit price, and
returns the unsigned order body for an HL-aware client to sign with the
user's local agent key. Hard floor at $5 minimum margin (status =
below_minimum); per-asset leverage advisories surface in
warnings[].
curl -sX POST https://basiyx.vercel.app/api/public/perp/order \ -H "Content-Type: application/json" \ -d '{ "action": "open", "asset": "ETH", "amount": "50", "leverage": 5, "side": "short", "walletAddress": "0xYourWallet…" }'
{
"status": "needs_deposit",
"warnings": [],
"requirements": {
"hasAgentWallet": true,
"hasBuilderApproval": true,
"balanceUsdcOnHl": 32.78,
"requiredUsdcOnHl": 50,
"assetTradeable": true
},
"transactions": [
{ "kind": "approval", "chainId": 42161, "to": "0xaf88…", "data": "0x095ea7b3…" },
{ "kind": "deposit", "chainId": 42161, "to": "0xaf88…", "data": "0xa9059cbb…" }
],
"orderAction": {
"type": "order",
"orders": [{
"a": 1, "b": false, "p": "2306.8", "s": "0.1083",
"r": false, "t": { "limit": { "tif": "Ioc" } }
}],
"builder": { "b": "0x7c65…d543", "f": 50 }
},
"submitUrl": "https://api.hyperliquid.xyz/exchange"
}
The fastest way to internalize the surface is the live demo — same routes, browser-side, no setup. Click around and watch real on-chain data.