# Haiku DeFi MCP (npm · haiku-mcp-server)

DeFi execution for AI agents — swap, lend, bridge, and yield across 22 chains.

- Trust score: 66/100 (medium)
- Change this week: +42
- Registry status: active
- Liveness: live
- Owner verified: no
- Last scored: 2026-08-03

## Components

- npm · `haiku-mcp-server`: 66/100 (this document), [markdown](https://verifymcp.io/servers/haiku-trading-haiku-mcp-server/haiku-mcp-server.md), [page](https://verifymcp.io/servers/haiku-trading-haiku-mcp-server/haiku-mcp-server)

## Channel facts

- Registry: `npm`
- Package: `haiku-mcp-server`
- Version: `0.0.8`
- Transport: `stdio`

## Trust breakdown

How this component scores in each security and reliability category. Every signal is checked automatically from public evidence about the published package, including repeated runs of it in an isolated sandbox, and we only credit what we can confirm. Scores are 0–100 per category. Scoring method: https://verifymcp.io/docs/scoring (what has changed: https://verifymcp.io/docs/scoring/changelog)

Scored 2026-08-03.

- **Supply Chain Security**: 87/100
  - No malware found by supply-chain analysis.
  - Only part of the dependency tree could be resolved (110 of 114), so this covers what we could see, not the whole tree.
  - No install/post-install scripts declared.
  - Only part of the dependency tree could be resolved (110 of 114), so this covers what we could see, not the whole tree.
- **Provenance & Transparency**: 45/100
  - Source repository is publicly reachable at the declared URL.
  - Provenance check failed: no build-provenance attestation is published.
  - Clear OSI-approved license (MIT).
  - Actively maintained (last published 102 days ago).
  - Disclosure check failed: no security disclosure policy was found in the source repository.
- **Schema Quality & AI Usability**: 58/100
  - AI-judged instruction clarity (good).
  - Context-footprint check failed: tool/resource definitions use about 2074 tokens (~296/item across 7 items; 7 tools + 0 resources), over budget; trim descriptions and params.
  - Usage-examples check failed: none of the tools include examples.
- **Stability & Change Management**: 27/100
  - Stability observed for 8 of 30 days with no destabilising changes; credit accrues until the full window elapses.
- **Tool Coverage**: 100/100
  - 100% of tools have a non-trivial description (not blank, and not just the tool's name).
  - 100% of tool parameters carry a description.
- **Capabilities**: 100/100
  - Implements a supported MCP spec version (2025-11-25); the latest is 2026-07-28.

## Install

### Claude

```bash
claude mcp add haiku-trading-haiku-mcp-server -- npx -y haiku-mcp-server
```

### Codex

```bash
codex mcp add haiku-trading-haiku-mcp-server -- npx -y haiku-mcp-server
```

### opencode

```json
{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "haiku-trading-haiku-mcp-server": {
      "type": "local",
      "command": [
        "npx",
        "-y",
        "haiku-mcp-server"
      ],
      "enabled": true
    }
  }
}
```

### OpenClaw

```bash
openclaw mcp add haiku-trading-haiku-mcp-server --command npx --arg -y --arg haiku-mcp-server
```

### Hermes

```yaml
mcp_servers:
  haiku-trading-haiku-mcp-server:
    command: "npx"
    args: ["-y", "haiku-mcp-server"]
```

### Other

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

## Changelog

Every change recorded for this component, newest first. Days that predate change tracking, or that we cannot explain, say so: "we were watching and nothing happened" and "we were not watching" are different claims.

### 2026-08-03 (score 66, +46)

- [security regression] Provenance: unverified → fail
- [security improvement] Install scripts: unverified → pass
- [security improvement] Known CVEs: unverified → partial
- [functional regression] Security disclosure: unverified → fail
- [functional improvement] Tool coverage: unverified → 100
- [functional improvement] License: unverified → pass
- [functional improvement] Dependency health: unverified → partial
- [functional improvement] Maintenance: unverified → pass
- [functional improvement] Stability: unverified → 0.27
- [functional improvement] MCP protocol: unverified → pass
- [functional improvement] Schema quality: unverified → good
- [functional] Licence: MIT

### 2026-08-02 (score 20, +3)

- [security improvement] Malware scan: unverified → pass
- [functional regression] Security disclosure: fail → unverified
- [functional regression] Tool coverage: 100 → unverified

### 2026-07-31 (score 17, −25)

- [functional] We updated how we score, so this day's move reflects our rubric, not a change to the server

### 2026-07-30 (score 42, +18)

- [functional improvement] Tool coverage: unverified → 100
- [functional] First check of Schema quality: fail
- [functional] First check of Schema quality: fail
- [functional] First check of Schema quality: unverified
- [functional] First check of Tool coverage: 100

### 2026-07-27 (score 24)

First indexed and scored.

## MCP tools (7)

### `haiku_get_tokens` (~223 tokens)

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.

Input parameters:

- `category` (string): Filter by token category: 'token' (vanilla tokens), 'collateral' (Aave aTokens), 'varDebt' (Aave debt tokens), 'vault' (Yearn/Morpho vaults), 'weightedLiquidity' (Balancer LP), 'concentratedLiquidity…
- `network` (number): Filter tokens by network. Common networks: 42161 (Arbitrum), 8453 (Base), 1 (Ethereum), 137 (Polygon), 10 (Optimism), 56 (BSC)

### `haiku_get_balances` (~241 tokens)

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.

Input parameters:

- `chainIds` (array): Optional list of chain IDs to fetch balances for. When provided, only those chains are queried (partial refresh). Example: [42161, 8453] to re-fetch only Arbitrum and Base after a cross-chain swap. C…
- `walletAddress` (string): Wallet address (0x...) or ENS name. Omit to auto-derive from WALLET_PRIVATE_KEY.

### `haiku_get_quote` (~584 tokens)

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.

Input parameters:

- `inputPositions` (object, required): Map of token IID to amount. IID format: "<chain-slug>:<token-address>". Supported chain slugs: arb=Arbitrum(42161), base=Base(8453), eth=Ethereum(1), poly=Polygon(137), opt=Optimism(10), bsc=BNB Chai…
- `receiver` (string): Receiving wallet address. Required when WALLET_PRIVATE_KEY is not set — must be provided explicitly. When WALLET_PRIVATE_KEY is set, auto-derived from it if omitted.
- `slippage` (number): Max slippage as decimal (e.g., 0.003 for 0.3%). Default: 0.003
- `targetWeights` (object, required): Map of output token IID to weight (sum to 1). Example: { "arb:0xaf88...": 0.5, "arb:0xFd08...": 0.5 }

### `haiku_prepare_signatures` (~179 tokens)

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.

Input parameters:

- `quoteId` (string): Quote ID from haiku_get_quote (preferred — server resolves the full quote from session cache)
- `quoteResponse` (object): Full response from haiku_get_quote (fallback when quoteId is unavailable)

### `haiku_discover_yields` (~307 tokens)

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.

Input parameters:

- `category` (string): lending=Aave collateral tokens, vault=Yearn/Morpho vaults, lp=Balancer/Uniswap LP, all=every yield-bearing category (default: all)
- `limit` (number): Maximum number of results (default 20)
- `minApy` (number): Minimum APY filter as a percentage, e.g. 5 means ≥5% APY
- `minTvl` (number): Minimum TVL filter in USD, e.g. 1000000 means ≥$1M TVL. Use this to filter to established mainstream vaults and exclude low-liquidity pools.
- `network` (number): Filter by network. Common networks: 42161 (Arbitrum), 8453 (Base), 1 (Ethereum), 137 (Polygon), 10 (Optimism), 56 (BNB Chain)
- `sortBy` (string): Sort by APY (default) or TVL, descending

### `haiku_analyze_portfolio` (~110 tokens)

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.

Input parameters:

- `walletAddress` (string, required): Wallet address (0x...) to analyze

### `haiku_execute` (~430 tokens)

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.

Input parameters:

- `approvals` (array): approvals from haiku_get_quote. Self-contained mode only: haiku broadcasts these on-chain before the swap. In external wallet mode (broadcast: false), do not pass these — broadcast each approval {to,…
- `bridgeSigningPayload` (object): bridgeSigningPayload from haiku_get_quote (cross-chain only, for self-contained signing)
- `broadcast` (boolean): If true (default), broadcasts tx. If false, returns unsigned tx.
- `permit2Signature` (string): Pre-signed Permit2 signature (external wallet mode)
- `permit2SigningPayload` (object): permit2SigningPayload from haiku_get_quote (for self-contained signing)
- `quoteId` (string, required): Quote ID from haiku_get_quote
- `sourceChainId` (number): Chain ID of the source token (from haiku_get_quote). Recommended — if omitted, the server will attempt to recover it from the signing payloads or session cache, but passing it explicitly is safer.
- `userSignature` (string): Pre-signed bridge intent signature (external wallet mode)

## Diagnostics

Captured diagnostic sections: Provenance, Dependencies. The full working is on the page: https://verifymcp.io/servers/haiku-trading-haiku-mcp-server/haiku-mcp-server#diagnostics

## Score history

- 2026-08-03: 66
- 2026-08-02: 20
- 2026-08-01: 17
- 2026-07-31: 17
- 2026-07-30: 42
- 2026-07-28: 24
- 2026-07-27: 24

## Links

- npm package: https://www.npmjs.com/package/haiku-mcp-server
- Socket report: https://socket.dev/npm/package/haiku-mcp-server
- Repository: https://github.com/Haiku-Trading/haiku-mcp-server
- Changelog RSS feed: https://verifymcp.io/servers/haiku-trading-haiku-mcp-server/haiku-mcp-server/changelog.xml
- Changelog JSON feed: https://verifymcp.io/servers/haiku-trading-haiku-mcp-server/haiku-mcp-server/changelog.json
- HTML version of this page: https://verifymcp.io/servers/haiku-trading-haiku-mcp-server/haiku-mcp-server
