Morpho SDKs
The Morpho Software Development Kits (SDKs) are a suite of TypeScript packages for building on the Morpho protocol - from a full-featured DeFi application to a liquidation bot, an indexer, or a simple data dashboard.
The recommended starting point is the Morpho SDK - the default abstraction layer that produces ready-to-send transactions for VaultV2 and MarketV1 (Morpho Blue) in a single, consistent surface. The lower-level packages below remain available when you need raw entity classes, custom calldata composition, or React-side integration.
Default: Morpho SDK
@morpho-org/morpho-sdk - the default and recommended SDK for application integrators. It is the abstraction layer that simplifies the Morpho protocol:
- One consistent abstraction layer across VaultV2 and MarketV1 (Morpho Blue), with V1 (MetaMorpho) supported under the hood for migrations / liquidity reallocation
- Builds final, deep-frozen
viemTransactionobjects - no calldata wrangling - Handles ERC-20 approvals, Permit / Permit2 signatures, and Morpho
setAuthorizationfor GeneralAdapter1 via a unifiedgetRequirements()flow - Composes Bundler3 / GeneralAdapter1 bundles for you (atomic supply+borrow, repay+withdraw, V1→V2 migration, native-token wrapping)
- Slippage-protected by default (
maxSharePrice/minSharePrice, LLTV buffer) - Optional shared-liquidity reallocations through the PublicAllocator
- Strict TypeScript, no
any, dedicated error classes for every failure mode
pnpm add @morpho-org/morpho-sdk viem→ Read the Morpho SDK guide · Source on GitHub · Package on npm
Lower-level / advanced packages
These packages remain available when you need to reach below the abstraction layer - for example, custom calldata composition, simulation pipelines, indexers, liquidation bots, or any flow the Morpho SDK does not cover out of the box. The Morpho SDK depends on most of them under the hood, so picking them up later is always an option.
Core packages (framework-agnostic)
@morpho-org/blue-sdk- Core entity classes (Market,Vault,Position) and offchain computations. The foundation of the rest of the stack.@morpho-org/simulation-sdk- Engine for simulating user interactions (supply, borrow, vault deposits) before executing them onchain.@morpho-org/blue-api-sdk- GraphQL client for the Morpho API, with types and an Apollo cache controller.
Viem integration packages
@morpho-org/blue-sdk-viem- Augments@morpho-org/blue-sdkwith viem-based fetchers for live on-chain data.@morpho-org/liquidity-sdk-viem- Helpers for available-liquidity computations, including assets reachable through the Public Allocator.@morpho-org/liquidation-sdk-viem- Building blocks for robust, viem-based liquidation bots.
Wagmi (React) integration packages
For frontend developers, these packages provide React hooks to fetch Morpho data inside a Wagmi app:
@morpho-org/blue-sdk-wagmi- Wagmi hooks for fetching Morpho-related entities.@morpho-org/simulation-sdk-wagmi- Wagmi hooks for fetching and managing simulation states in a React environment.
Where next
- Recommended starting point: Morpho SDK guide
- Lower-level entities: Blue SDK · Blue SDK Viem
- Source code:
morpho-org/sdks- the SDK monorepo containing@morpho-org/morpho-sdkand the lower-level packages - Need help? Reach out via the chat on help.morpho.org.
