> ## Documentation Index
> Fetch the complete documentation index at: https://zyfai.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Zyfai SDK & MCP Server

Zyfai is not just a product for end users. It is an agentic yield layer that any builder can integrate into their own application.

Whether you are building a wallet, an exchange, a neobank, or an autonomous agent, the Zyfai SDK gives you a production-ready yield engine without building one from scratch.

### Why Build on Zyfai?

**1. Faster time-to-ship.** Building a yield optimization engine from the ground up requires months of development: smart contract architecture, rebalancing logic, multi-chain deployment, security audits, and ongoing pool curation. The Zyfai SDK abstracts all of this into a single integration. You ship an "Earn" feature in hours.

**2. Battle-tested infrastructure.** The stack behind the SDK is the same infrastructure that powers the main product: Safe7579 Smart Accounts, the Security Proxy Gateway, Smart Rebalancing v.2, OmniAccounts, and ZK-proven execution via ERC-8004. It has been audited by Sherlock and has securely processed over \$2B in agentic volume.

**3. The highest agentic yield in the market.** Zyfai Agents continuously scan and rebalance across 35+ pools on Base, Arbitrum, and Plasma. The yield your users earn through the SDK is the same yield Zyfai's own users earn. No degraded version, no separate pool set, same rules apply to everyone.

**4. Permissionless.** Generate an API key from [sma.zyf.ai](https://sma.zyf.ai/) and start building. No approval process, no gatekeeping.

### Who Is Building on Zyfai?

Early SDK integrations are already live, with more in the pipeline:

* **[Thirdfy](https://x.com/Thirdfy_):** created an autonomous Agent with its own o(3,3) gauge
* **[Zoof Wallet](https://x.com/zoofwallet):** embedded yield directly into the wallet experience
* **10+ upcoming integrations** across wallets, protocols, and autonomous agents

**If you are building any of the following, the SDK is relevant:**

* A wallet looking for sticky, value-added features
* A protocol with idle treasury assets
* A bridge or cross-chain service looking to enhance capital efficiency
* The next generation of onchain autonomous agents

You will face the same infrastructure challenges. We have already solved them.

<img src="https://mintcdn.com/zyfai/p7wzrUqxssDDJN81/img/product/sdk.png?fit=max&auto=format&n=p7wzrUqxssDDJN81&q=85&s=e64b2c030872e0eb2a4c6fb7279c7159" alt="sdk" width="3840" height="2160" data-path="img/product/sdk.png" />

***

### Two Paths to Integration: SDK and MCP Server

Both paths lead to the same infrastructure. The difference is the interface.

<Tabs>
  <Tab title="SDK: for product integrations">
    **This is the path for production integrations that need complete control over the user experience.**

    The Zyfai SDK is a TypeScript library for full programmatic access to the Zyfai yield engine. Deposit into pre-deployed Safe Smart Accounts, manage DeFi positions, track earnings, and optimize yield across multiple chains.

    <Tip title="📖 Resources">
      * **GitHub:** [https://github.com/ondefy/zyfai-sdk](https://github.com/ondefy/zyfai-sdk)
      * **SDK Dashboard:** [sma.zyf.ai](https://sma.zyf.ai/)
      * **SDK Documentation:** [Getting Started](/docs/sdk/getting-started)
    </Tip>
  </Tab>

  <Tab title="MCP Server: for personal use">
    **This is the path for AI assistants, coding agents, and any tool that needs to query or interact with Zyfai programmatically.**

    The Zyfai MCP Server exposes the same SDK capabilities through 17 structured tools via the Model Context Protocol.

    **Works perfectly with Claude Code.**

    Available tools include:

    * **Portfolio Management:** multi-chain portfolio data, active DeFi positions
    * **Opportunities Discovery:** Conservative and Aggressive yield strategies, available protocols and pools per chain
    * **Analytics & Metrics:** onchain earnings, daily earnings, TVL, volume, active wallets, rebalance frequency
    * **Historical Data:** transaction history, daily APY tracking, APY per strategy

    <Tip title="📖 Resources">
      - **GitHub:** [github.com/ondefy/zyfai-mcp-server](https://github.com/ondefy/zyfai-mcp-server)
      - **MCP Server:** [mcp.zyf.ai](https://mcp.zyf.ai/)
    </Tip>
  </Tab>
</Tabs>
