Yield.xyz AgentKit MoonPay Skill

An Agent Skill that combines Yield.xyz's yield discovery and transaction building with MoonPay's local wallet infrastructure, enabling AI agents to go from "find me the best USDC yield on Base" to a confirmed on-chain position, with keys that never leave your machine.


What is MoonPay Agents?

MoonPay provides the wallet infrastructure and transaction execution layer for AI agents, covering wallet creation, transaction signing, and on-chain broadcasting. With 54 tools across 17 skills, MoonPay Agents gives your agent autonomous access to funds and crypto operations, all running locally on your machine. For this integration, the skill primarily uses wallet management, transaction execution, and token operations.


Overview

Onchain yield management involves multiple steps: discovering opportunities across protocols and chains, constructing the right transactions, signing them securely, and confirming execution on-chain. Doing this programmatically, especially through an AI agent, requires cleanly separating what to do from how to sign.

This skill solves that by pairing two layers:

  • Yield.xyz AgentKit MCP discovers yields across 80+ networks, inspects yield schemas, and builds unsigned transactions. It never touches private keys.
  • MoonPay MCP provides local HD wallets and a local MCP server via the MoonPay CLI. It handles transaction signing and broadcasting directly from your machine, no external API calls for key operations.

The agent orchestrates both layers. Keys stay local on your machine, managed by MoonPay.


What MoonPay Adds

The AgentKit MCP handles yield discovery, schema inspection, and transaction building. MoonPay adds the execution layer:

  • Local HD wallets — MoonPay creates hierarchical deterministic wallets on your machine via the CLI. Each wallet provides both EVM and Solana addresses.
  • Local MCP server — MoonPay runs as a local MCP via mp mcp, making wallet and signing tools available directly in the agent.
  • Sign and broadcast — The agent passes unsigned transactions from AgentKit to MoonPay for signing and broadcasting. MoonPay handles the format conversion internally.
  • Swap and bridge tools — MoonPay also provides token_swap and token_bridge if the user needs to move or convert funds before entering a yield position.

How It Works

User prompt
    │
    ▼
AgentKit MCP (remote)               MoonPay MCP (local)
─────────────────────               ───────────────────
Discover yields                      
Inspect schema + limits              
Build unsigned transaction(s)  ──►  Sign transaction
                                    Broadcast to chain
                               ◄──  Return tx hash
Confirm execution                    
Report result to user                

If an action returns multiple transactions (e.g., an ERC-20 approval followed by a deposit), they execute sequentially, each must be confirmed before the next begins.

For the full list of Yield.xyz AgentKit MCP tools used in this flow, see the Tool Reference.


Getting Started

Prerequisites

RequirementDetails
Node.jsRequired for the MoonPay CLI
MoonPay CLInpm install -g @moonpay/cli
MoonPay accountEmail-based, created during first mp login

Install

In your terminal, run:

npx skills add stakekit/agentkit --skill yield-agentkit-moonpay

Open your agent and run:

Set up the yield-agentkit-moonpay skill

The agent reads SKILL.md and handles the rest — installing the MoonPay CLI, walking you through email authentication, creating your wallet, and registering both the AgentKit and MoonPay MCP servers.

To confirm the skill is active:

What skills and MCPs do you have connected?

You should see both yield-agentkit and moonpay listed as connected MCP servers.


Architecture and Design Notes

Why unsigned transactions? Yield.xyz constructs transactions but never signs them. This keeps key management entirely outside the yield layer. Any compatible signing infrastructure — MoonPay, Privy, BankrBot — can plug in without modification.

Two MCP servers, one agent. AgentKit MCP runs remotely at https://mcp.yield.xyz/mcp and handles yield data and transaction building. MoonPay MCP runs locally via mp mcp and handles wallet management and signing. The agent orchestrates both seamlessly.

Local-first key management. MoonPay wallets and keys live on your machine. Signing happens locally, no private key material is sent over the network.


When to Use This

This skill is designed for developers and teams who want:

  • A local-first signing setup — MoonPay wallets and keys live on your machine, with no external API calls for signing
  • A quick way to test AgentKit end-to-end — MoonPay's CLI-based setup is fast and doesn't require a dashboard or enterprise plan
  • EVM and Solana support — MoonPay HD wallets provide addresses for both chain families
  • Swap and bridge utilities — MoonPay's built-in tools can prepare funds before entering yield positions

Resources