MCP.so
Sign In
H

Haiku DeFi MCP — AI agent DeFi execution across 22 chains

@Haiku-Trading

About Haiku DeFi MCP — AI agent DeFi execution across 22 chains

Execute DeFi transactions across 22 blockchain networks. Swaps, lending, vaults, LP positions, cross-chain

Config

Add this server to your MCP-compatible client using the configuration below.

{
  "mcpServers": {
    "haiku": {
      "command": "npx",
      "args": [
        "-y",
        "haiku-mcp-server"
      ]
    }
  }
}

Tools

7

Get supported tokens and DeFi positions for trading. Includes vanilla tokens, Aave collateral/debt, yield vaults, and LP tokens. Use category filter to narrow results (e.g., 'collateral' for Aave aTokens). Returns token IIDs (unique identifiers), symbols, names, prices, and chain information. Use the IID format (chainSlug:tokenAddress) when specifying tokens in other tools.

Get token balances for a wallet address. By default fetches across all supported chains. Pass chainIds for a partial refresh — only the specified chains are queried, which is faster and useful after a swap when you only need updated balances for the source and destination chains. Returns balances, USD prices, total portfolio value, and categorized positions (tokens, collateral, debt, vaults). walletAddress is optional when WALLET_PRIVATE_KEY is set in the environment.

Get a quote for a token swap or portfolio rebalance. Returns expected outputs, fees, gas estimates, and any required approvals. When signatures are required (Permit2 or bridge), EIP-712 signing payloads are included in the response. Two execution paths after getting a quote: • Path A — Self-contained (WALLET_PRIVATE_KEY set): call haiku_execute with quoteId, sourceChainId, permit2SigningPayload + bridgeSigningPayload (if present in this response), and approvals. Haiku signs and broadcasts automatically — returns tx hash. • Path B — External wallet (wallet MCP, broadcast: false required): (1) broadcast any approvals {to, data} via wallet MCP first; (2) call haiku_prepare_signatures with quoteId if signatures are needed → sign via wallet MCP; (3) call haiku_execute with quoteId, sourceChainId, signatures, and broadcast: false → returns { transaction: { to, data, value, chainId } } → broadcast transaction via wallet MCP.

External wallet signing path — use this instead of passing signing payloads directly to haiku_execute when WALLET_PRIVATE_KEY is not set or when a wallet MCP (Coinbase Payments MCP, wallet-agent, etc.) handles signing. Extracts and normalizes the EIP-712 payloads from a quote into a standard format any wallet's signTypedData can consume. Pass quoteId (preferred) — the server resolves the full quote from session cache. Alternatively pass the full quoteResponse object if quoteId is unavailable. After signing externally, pass permit2Signature and/or userSignature to haiku_execute.

Discover yield-bearing opportunities across DeFi protocols. Returns APY, TVL, risk parameters, and token IIDs ready for haiku_get_quote. Use this to answer questions like 'best lending yields on Arbitrum', 'highest APY vaults with at least $1M TVL', or 'what can I do with USDC on BNB Chain'. The iid field in results can be used directly as a targetWeight key in haiku_get_quote.

Analyze a wallet's DeFi portfolio and surface relevant yield opportunities. Returns current positions enriched with available APY options, collateral health factors, and context-specific opportunities based on what the wallet actually holds. Use this when a user asks what they should do with their portfolio or wants yield optimization advice. Pair the output with haiku_discover_yields for broader market context, then use haiku_get_quote to execute.

Execute a quote. Call haiku_get_quote first, then choose a path: • Path A — Self-contained (WALLET_PRIVATE_KEY set): pass quoteId, sourceChainId, permit2SigningPayload + bridgeSigningPayload (if present in the quote), and approvals. Haiku signs Permit2/bridge internally, sends any approvals on-chain, and broadcasts. Returns tx hash. • Path B — External wallet (no WALLET_PRIVATE_KEY): broadcast: false is required. First broadcast any approvals from the quote via your wallet MCP (each is a {to, data} transaction). Then call haiku_prepare_signatures if signatures are needed → sign via wallet MCP → call haiku_execute with quoteId, sourceChainId, the signatures, and broadcast: false. Returns { transaction: { to, data, value, chainId } } — broadcast transaction via your wallet MCP. Always pass sourceChainId from the quote response.

Overview

What is Haiku Mcp Server?

Haiku Mcp Server is an MCP (Model Context Protocol) server that enables AI agents to execute blockchain transactions across 21 networks via the Haiku API. It is designed for developers and traders who want to automate token swaps, yield discovery, portfolio analysis, and transaction building using natural language through AI assistants.

How to use Haiku Mcp Server?

Install via npm install haiku-mcp-server or run directly with npx haiku-mcp-server. Configure environment variables such as HAIKU_API_KEY (optional, for higher rate limits) and WALLET_PRIVATE_KEY (optional, for self-contained execution). Add the server to your Claude Desktop configuration by specifying the command and optional environment variables in claude_desktop_config.json. The server exposes tools like haiku_get_quote, haiku_execute, and haiku_discover_yields that an AI assistant can call.

Key features of Haiku Mcp Server

  • Token discovery across 21 blockchain networks
  • Wallet balance checking for multiple chains
  • Trading quotes for swaps and portfolio rebalancing
  • Transaction building with EIP-712 signature extraction
  • Self-contained execution with optional private key
  • Yield discovery ranked by APY and TVL
  • Portfolio analysis with context-specific yield opportunities

Use cases of Haiku Mcp Server

  • Automate token swaps on Arbitrum or Base using natural language prompts
  • Rebalance a DeFi portfolio to target weights across multiple assets
  • Discover the highest-yielding lending pools on Ethereum or Optimism
  • Analyze a wallet’s holdings and surface relevant yield opportunities
  • Execute transactions via an external wallet MCP (e.g., Coinbase, Safe) without exposing private keys

FAQ from Haiku Mcp Server

What does Haiku Mcp Server do compared to other blockchain MCP servers?

The README does not compare it to alternatives; it focuses on executing transactions via the Haiku API with support for token discovery, quotes, yield discovery, portfolio analysis, and two execution paths (self-contained or external wallet signing).

What dependencies or runtime requirements does it have?

It requires Node.js to run. The server is published on npm and can be invoked via npx or after npm install. No other runtime dependencies are listed; configuration is done via environment variables.

Where do my data and transactions live?

Token and balance data come from the Haiku API and on-chain sources. Transactions are either signed and broadcast internally (if WALLET_PRIVATE_KEY is set) or returned as unsigned transactions for external broadcasting. Quotes are valid for 5 minutes; the API works without a key but rate limits may be lower.

Are there any known limits or restrictions?

The README notes that quotes are valid for 5 minutes and should be executed quickly to avoid price movement. Without an API key, rate limits may be lower (a key can be requested from [email protected]). There is no mention of maximum quote size or wallet balance limits.

What transport and authentication does it use?

The server communicates via MCP stdio transport (standard input/output). Authentication is optional: providing a HAIKU_API_KEY via environment variable unlocks higher rate limits for production use. No other auth method is documented.

Frequently asked questions

What does Haiku Mcp Server do compared to other blockchain MCP servers?

The README does not compare it to alternatives; it focuses on executing transactions via the Haiku API with support for token discovery, quotes, yield discovery, portfolio analysis, and two execution paths (self-contained or external wallet signing).

What dependencies or runtime requirements does it have?

It requires Node.js to run. The server is published on npm and can be invoked via `npx` or after `npm install`. No other runtime dependencies are listed; configuration is done via environment variables.

Where do my data and transactions live?

Token and balance data come from the Haiku API and on-chain sources. Transactions are either signed and broadcast internally (if `WALLET_PRIVATE_KEY` is set) or returned as unsigned transactions for external broadcasting. Quotes are valid for 5 minutes; the API works without a key but rate limits may be lower.

Are there any known limits or restrictions?

The README notes that quotes are valid for 5 minutes and should be executed quickly to avoid price movement. Without an API key, rate limits may be lower (a key can be requested from [email protected]). There is no mention of maximum quote size or wallet balance limits.

What transport and authentication does it use?

The server communicates via MCP stdio transport (standard input/output). Authentication is optional: providing a `HAIKU_API_KEY` via environment variable unlocks higher rate limits for production use. No other auth method is documented.

Comments

More Other MCP servers