Back to Blogtutorial

Teaching Claude DeFi: How We Built a Skill for Our MCP Server

y0.exchange Team·March 10, 2026

MCP gives Claude tools. Skills teach Claude workflows.

Our @y0exchange/mcp server has been live for a while — 8 tools that give any AI agent real-time access to DeFi: balances, prices, gas, swap quotes, transaction history, and the ability to execute swaps and transfers across 5 chains.

But connecting an MCP server to Claude is only half the story. Without guidance, Claude calls tools in isolation. Ask it to swap tokens and it might execute without checking your balance first. Ask about gas and it won't suggest a cheaper chain. It has access but not expertise.

That's where Agent Skills come in — a new standard from Anthropic for teaching Claude domain-specific workflows. We built one for our MCP server.

What the y0 Skill does

The skill is a single folder with a SKILL.md file and reference documents. When a user has both the y0 MCP connector and the skill installed, Claude automatically follows DeFi best practices:

Pre-swap safety checks

Instead of blindly executing a swap, Claude now:

  1. Checks your balance to verify you have enough
  2. Checks gas costs on the target chain
  3. Gets a quote and shows you the expected output
  4. Waits for your explicit confirmation
  5. Only then builds the unsigned transaction

Gas optimization

When gas on Ethereum is expensive (>50 gwei), Claude proactively suggests L2 alternatives like Arbitrum or Base — where the same swap costs cents instead of dollars.

Smart slippage

The skill embeds slippage recommendations based on token type:

  • Stablecoin swaps (USDC/USDT): 0.1-0.3%
  • Major pairs (ETH/USDC): 0.5%
  • Default for other tokens: 1%
  • Large swaps (>$5k): reduced slippage to minimize impact

Native token reserve

If you try to swap your entire ETH balance, Claude warns you to keep some for gas — a mistake that catches even experienced DeFi users.

Portfolio analysis

Ask "check my portfolio" and Claude doesn't just list numbers. It flags concentration risk (>80% in one asset), shows per-chain distribution, and suggests rebalancing if the allocation is skewed.

The architecture: MCP + Skill

Think of it like a professional kitchen (Anthropic's own analogy):

  • MCP server = the kitchen: ovens, knives, ingredients. It provides access to blockchain data and transaction building.
  • Skill = the recipes: step-by-step instructions for creating something valuable. It provides expertise on how to combine tools effectively.

Together, a user says "swap 100 USDC to ETH on the cheapest chain" and Claude handles the entire workflow: check balances across chains, compare gas costs, find the best quote, show the breakdown, wait for confirmation, execute.

8 workflows, zero hand-holding

The skill covers the workflows that matter most in DeFi:

WorkflowWhat Claude does
Portfolio CheckAggregates holdings across 5 chains with USD values and risk flags
Token SwapBalance check → gas check → quote → confirmation → execute
Send TokensAddress verification → balance check → gas estimate → confirmation
Gas OptimizationCross-chain comparison with cost estimates per operation type
Price ResearchCurrent prices with 24h change, volatility warnings
Transaction HistoryFiltered history with type classification
Portfolio RebalanceMulti-swap plan with individual confirmations and gas totals
Cross-Chain ComparisonFind the cheapest chain for any operation

Non-custodial, always

The most important thing the skill enforces: never skip user confirmation for write operations. The MCP server builds unsigned transactions — the user always signs on their own device. The skill adds an extra layer by requiring Claude to show all details and wait for explicit approval before calling swap or send.

y0 never touches private keys. Not in the MCP server, not in the skill, not anywhere.

Try it

Install the MCP connector:

  1. In Claude.ai → Settings → Connectors → Add custom connector
  2. URL: https://mcp.y0.exchange/mcp?key=YOUR_API_KEY

Install the skill:

  1. Download the skill folder from GitHub
  2. Zip it and upload in Claude.ai → Settings → Capabilities → Skills

Or use via npm (Claude Code, Cursor):

npx @y0exchange/mcp

The MCP server is open source under MIT license. The skill is included in the same repo.


Get your API key at app.y0.exchange. Read-only tools work without a key — try asking Claude about any wallet's portfolio or current gas prices.