{"_id":"haiku-mcp-server","_rev":"9-947b1d262f0df57f98063993bafbaa54","name":"haiku-mcp-server","dist-tags":{"latest":"0.0.9"},"versions":{"0.0.1":{"name":"haiku-mcp-server","version":"0.0.1","keywords":["mcp","haiku","blockchain","defi","ai-agent"],"author":{"name":"Haiku"},"license":"MIT","_id":"haiku-mcp-server@0.0.1","maintainers":[{"name":"haiku-trade","email":"thomas@haiku.trade"}],"homepage":"https://docs.haiku.trade","bugs":{"url":"https://github.com/Haiku-Trading/haiku-mcp-server/issues"},"bin":{"haiku-mcp-server":"dist/index.js"},"dist":{"shasum":"73bee57cd16ee8514d0b37fe207cedb698a0369f","tarball":"https://registry.npmjs.org/haiku-mcp-server/-/haiku-mcp-server-0.0.1.tgz","fileCount":34,"integrity":"sha512-X5/WbX3itOOi4HqM47XG3gxvsp8n7cz7XcP1Cmv49goi6oMByH1/0IneWGLgMeVy/psFM5bZJZjSGjjOU4w/zg==","signatures":[{"sig":"MEUCIQCH1rh8umSBu5I7xj9igs0+vrIq1sfLsPBEDuTUuoRQLQIgMNmZFERLJnQQZID2IfA9XBzLbpowOnpwSe/6oiTpwj4=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":71970},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=18.0.0"},"gitHead":"d17159c0a471f0f94ed300442b4a6bae1988393c","scripts":{"dev":"tsc --watch","build":"tsc","start":"node dist/index.js","prepublishOnly":"npm run build"},"_npmUser":{"name":"haiku-trade","email":"thomas@haiku.trade"},"repository":{"url":"git+https://github.com/Haiku-Trading/haiku-mcp-server.git","type":"git"},"_npmVersion":"10.9.2","description":"MCP server for Haiku API - enables AI agents to execute any blockchain transactions","directories":{},"_nodeVersion":"23.11.0","dependencies":{"zod":"^3.23.0","@modelcontextprotocol/sdk":"^1.0.0"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.4.0","@types/node":"^20.0.0"},"_npmOperationalInternal":{"tmp":"tmp/haiku-mcp-server_0.0.1_1770293427991_0.13639895083163478","host":"s3://npm-registry-packages-npm-production"}},"0.0.2":{"name":"haiku-mcp-server","version":"0.0.2","keywords":["mcp","haiku","blockchain","defi","ai-agent"],"author":{"name":"Haiku"},"license":"MIT","_id":"haiku-mcp-server@0.0.2","maintainers":[{"name":"haiku-trade","email":"thomas@haiku.trade"}],"homepage":"https://docs.haiku.trade","bugs":{"url":"https://github.com/Haiku-Trading/haiku-mcp-server/issues"},"bin":{"haiku-mcp-server":"dist/index.js"},"dist":{"shasum":"de40198b7ee765ae2c318cc0fcd013a26028b78c","tarball":"https://registry.npmjs.org/haiku-mcp-server/-/haiku-mcp-server-0.0.2.tgz","fileCount":42,"integrity":"sha512-R8BBoJwvp50cQXW6+1Gmx1EKuOzUAt3p8gAuLo4zLvYRouT4loqQtSgGbC9HtEuIIMSu8W2FggmDvkmZpDeleg==","signatures":[{"sig":"MEUCIByNhVLY4lSwpho9G3Y7THPJnh0lQEgKKYNXDogYiAZ5AiEAzRsOqZPmbtaU8H+YtkEzSKJMuqP065j819Jn9k5N1rU=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":114318},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=18.0.0"},"gitHead":"193f164fdca584d03c512ca8aa735d6b0e2cc42d","scripts":{"dev":"tsc --watch","build":"tsc","start":"node dist/index.js","prepublishOnly":"npm run build"},"_npmUser":{"name":"haiku-trade","email":"thomas@haiku.trade"},"repository":{"url":"git+https://github.com/Haiku-Trading/haiku-mcp-server.git","type":"git"},"_npmVersion":"10.9.2","description":"MCP server for Haiku API - enables AI agents to execute any blockchain transactions","directories":{},"_nodeVersion":"23.11.0","dependencies":{"zod":"^3.23.0","viem":"^2.45.1","@modelcontextprotocol/sdk":"^1.0.0"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.4.0","@types/node":"^20.0.0"},"_npmOperationalInternal":{"tmp":"tmp/haiku-mcp-server_0.0.2_1770303077083_0.08691107235270312","host":"s3://npm-registry-packages-npm-production"}},"0.0.3":{"name":"haiku-mcp-server","version":"0.0.3","keywords":["mcp","haiku","blockchain","defi","ai-agent"],"author":{"name":"Haiku"},"license":"MIT","_id":"haiku-mcp-server@0.0.3","maintainers":[{"name":"haiku-trade","email":"thomas@haiku.trade"}],"homepage":"https://docs.haiku.trade","bugs":{"url":"https://github.com/Haiku-Trading/haiku-mcp-server/issues"},"bin":{"haiku-mcp-server":"dist/index.js"},"dist":{"shasum":"e369a5aa70b2a2e250952c41f4727c6bd02f865e","tarball":"https://registry.npmjs.org/haiku-mcp-server/-/haiku-mcp-server-0.0.3.tgz","fileCount":42,"integrity":"sha512-toAnT5UoPdmV3ba0e0yDmGO/pUKd38AU9C+t6EBWxJeYJZmSSlGpYhvxDGuLfEslzZeOD2c0yqCl9bxUOCARKQ==","signatures":[{"sig":"MEUCIQCjDsu+oEf6pAliYKyHAkwBhA+iJZoP3SzV/6O91AvKVgIgKWYCzRu7ZhUDBqZML36wQcuAtQ4XdzE+d2q+bzIpdoU=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":118072},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=18.0.0"},"gitHead":"a9806f434cd338bc34814d3e5cf3bfdcc71c50b5","scripts":{"dev":"tsc --watch","build":"tsc","start":"node dist/index.js","prepublishOnly":"npm run build"},"_npmUser":{"name":"haiku-trade","email":"thomas@haiku.trade"},"repository":{"url":"git+https://github.com/Haiku-Trading/haiku-mcp-server.git","type":"git"},"_npmVersion":"10.9.2","description":"MCP server for Haiku API - enables AI agents to execute any blockchain transactions","directories":{},"_nodeVersion":"23.11.0","dependencies":{"zod":"^3.23.0","viem":"^2.45.1","@modelcontextprotocol/sdk":"^1.0.0"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.4.0","@types/node":"^20.0.0"},"_npmOperationalInternal":{"tmp":"tmp/haiku-mcp-server_0.0.3_1770632990977_0.4101026854618026","host":"s3://npm-registry-packages-npm-production"}},"0.0.4":{"name":"haiku-mcp-server","version":"0.0.4","keywords":["mcp","haiku","blockchain","defi","ai-agent"],"author":{"name":"Haiku"},"license":"MIT","_id":"haiku-mcp-server@0.0.4","maintainers":[{"name":"haiku-trade","email":"thomas@haiku.trade"}],"homepage":"https://docs.haiku.trade","bugs":{"url":"https://github.com/Haiku-Trading/haiku-mcp-server/issues"},"bin":{"haiku-mcp-server":"dist/index.js"},"dist":{"shasum":"e135366d15f321efd2423ce543bb259d6c9fe381","tarball":"https://registry.npmjs.org/haiku-mcp-server/-/haiku-mcp-server-0.0.4.tgz","fileCount":42,"integrity":"sha512-YM0DYD8DLuXzozaNQDmNpdRq0UmXAP7f5mJNDs6zJyOmUvSiMK2IQJOh8k+G+dRHYDhg5OctXBsGj+N4PkCjpg==","signatures":[{"sig":"MEUCIFTm0Q6l6yKeZC8Kbe5MXxSmtMt4+wwPpU0Dfac8r7vnAiEA7YQLojb075LqztQChc1rT12Ush2M45WYR167njUA0ZU=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":120679},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=18.0.0"},"gitHead":"a322d702d46d23fe9927f40fd08c414593d07f6f","scripts":{"dev":"tsc --watch","build":"tsc","start":"node dist/index.js","prepublishOnly":"npm run build"},"_npmUser":{"name":"haiku-trade","email":"thomas@haiku.trade"},"repository":{"url":"git+https://github.com/Haiku-Trading/haiku-mcp-server.git","type":"git"},"_npmVersion":"10.9.2","description":"MCP server for Haiku API - enables AI agents to execute any blockchain transactions","directories":{},"_nodeVersion":"23.11.0","dependencies":{"zod":"^3.23.0","viem":"^2.45.1","@modelcontextprotocol/sdk":"^1.0.0"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.4.0","@types/node":"^20.0.0"},"_npmOperationalInternal":{"tmp":"tmp/haiku-mcp-server_0.0.4_1771844999804_0.7997975324330364","host":"s3://npm-registry-packages-npm-production"}},"0.0.5":{"name":"haiku-mcp-server","version":"0.0.5","keywords":["mcp","haiku","blockchain","defi","ai-agent"],"author":{"name":"Haiku"},"license":"MIT","_id":"haiku-mcp-server@0.0.5","maintainers":[{"name":"haiku-trade","email":"thomas@haiku.trade"}],"homepage":"https://docs.haiku.trade","bugs":{"url":"https://github.com/Haiku-Trading/haiku-mcp-server/issues"},"bin":{"haiku-mcp-server":"dist/index.js"},"dist":{"shasum":"8338cdcdbc6b0ea22ed0ae849eb301705241e8e6","tarball":"https://registry.npmjs.org/haiku-mcp-server/-/haiku-mcp-server-0.0.5.tgz","fileCount":50,"integrity":"sha512-CAbgfWxLOxzSkffpPT318Tc08PeYSQpPHCwTeG5SOizZWQAr5waGF+zigtadkw99VJviS3F3hmlf26sm6cR9Dg==","signatures":[{"sig":"MEUCIG4qUCu/NmUORybr8Yyp83E49SIW+HJSgeVVC678j1a4AiEA+4RFnSrqdxoa94wxAmgSyRycqYg9gM30Oy/qsgO2j/s=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":187063},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=18.0.0"},"gitHead":"1cdf4ebc9f51f42e7cb1cd75ee3e186e7ab67054","scripts":{"dev":"tsc --watch","build":"tsc","start":"node dist/index.js","prepublishOnly":"npm run build"},"_npmUser":{"name":"haiku-trade","email":"thomas@haiku.trade"},"repository":{"url":"git+https://github.com/Haiku-Trading/haiku-mcp-server.git","type":"git"},"_npmVersion":"10.9.2","description":"MCP server for Haiku API - enables AI agents to execute any blockchain transactions","directories":{},"_nodeVersion":"23.11.0","dependencies":{"zod":"^3.23.0","viem":"^2.45.1","@modelcontextprotocol/sdk":"^1.0.0"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.4.0","@types/node":"^20.0.0"},"_npmOperationalInternal":{"tmp":"tmp/haiku-mcp-server_0.0.5_1772185442786_0.33902255724327457","host":"s3://npm-registry-packages-npm-production"}},"0.0.6":{"name":"haiku-mcp-server","version":"0.0.6","keywords":["mcp","haiku","blockchain","defi","ai-agent"],"author":{"name":"Haiku"},"license":"MIT","_id":"haiku-mcp-server@0.0.6","maintainers":[{"name":"haiku-trade","email":"thomas@haiku.trade"}],"homepage":"https://docs.haiku.trade","bugs":{"url":"https://github.com/Haiku-Trading/haiku-mcp-server/issues"},"bin":{"haiku-mcp-server":"dist/index.js"},"dist":{"shasum":"d1e1baed4dfe3affc3348b97d539f7d4f556ef80","tarball":"https://registry.npmjs.org/haiku-mcp-server/-/haiku-mcp-server-0.0.6.tgz","fileCount":50,"integrity":"sha512-/4CitnzX7FQbUjh3gwRcRt1FhUIghFwgfJlN9W6JYxKZvKqdUDKEMubZAbGeUvy7cyO2GS7NGzKr7mhVjoPI+A==","signatures":[{"sig":"MEQCIAn7oWmrnQJzXJZ7xaD5CkOMYrHkXD1G/h3IPnTjV02hAiAI1p+F8dN56NJxRFUSTpmPcEuo+32AT6bwH5yzD0/npA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":194113},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=18.0.0"},"gitHead":"a92cfd9849571d92d5342dd8232e448d777d26fa","scripts":{"dev":"tsc --watch","build":"tsc","start":"node dist/index.js","prepublishOnly":"npm run build"},"_npmUser":{"name":"haiku-trade","email":"thomas@haiku.trade"},"repository":{"url":"git+https://github.com/Haiku-Trading/haiku-mcp-server.git","type":"git"},"_npmVersion":"10.9.2","description":"MCP server for Haiku API - enables AI agents to execute any blockchain transactions","directories":{},"_nodeVersion":"23.11.0","dependencies":{"zod":"^3.23.0","viem":"^2.45.1","@modelcontextprotocol/sdk":"^1.0.0"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.4.0","@types/node":"^20.0.0"},"_npmOperationalInternal":{"tmp":"tmp/haiku-mcp-server_0.0.6_1772458229769_0.39976090461487734","host":"s3://npm-registry-packages-npm-production"}},"0.0.7":{"name":"haiku-mcp-server","version":"0.0.7","keywords":["mcp","haiku","blockchain","defi","ai-agent"],"author":{"name":"Haiku"},"license":"MIT","_id":"haiku-mcp-server@0.0.7","maintainers":[{"name":"haiku-trade","email":"thomas@haiku.trade"}],"homepage":"https://docs.haiku.trade","bugs":{"url":"https://github.com/Haiku-Trading/haiku-mcp-server/issues"},"bin":{"haiku-mcp-server":"dist/index.js"},"dist":{"shasum":"14c8b78befd21714c862ed1c5a29bc9f758d2a1c","tarball":"https://registry.npmjs.org/haiku-mcp-server/-/haiku-mcp-server-0.0.7.tgz","fileCount":50,"integrity":"sha512-7x85XVAfF9cLjLrD4FpPwDHQMCvO5bRO+7akj+3CaTqWsEm4vPB7RwKZZwC//LH3XVPzCvdziTUzlQ512ZsO+g==","signatures":[{"sig":"MEQCIE7hnZ1ofOfIR7P1D3hoa2uaFENQoSR1FQkQfe3BXS7FAiB57/A63OWNkFLOpIwnARPNLEQO/o21RNkRqz2yceDV6A==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":196459},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=18.0.0"},"gitHead":"ca01e91bf5250edfec319789cf79fb561257e579","scripts":{"dev":"tsc --watch","build":"tsc","start":"node dist/index.js","prepublishOnly":"npm run build"},"_npmUser":{"name":"haiku-trade","email":"thomas@haiku.trade"},"repository":{"url":"git+https://github.com/Haiku-Trading/haiku-mcp-server.git","type":"git"},"_npmVersion":"10.9.2","description":"MCP server for Haiku API - enables AI agents to execute any blockchain transactions","directories":{},"_nodeVersion":"23.11.0","dependencies":{"zod":"^3.23.0","viem":"^2.45.1","@modelcontextprotocol/sdk":"^1.0.0"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.4.0","@types/node":"^20.0.0"},"_npmOperationalInternal":{"tmp":"tmp/haiku-mcp-server_0.0.7_1773229123392_0.38384453530028106","host":"s3://npm-registry-packages-npm-production"}},"0.0.8":{"name":"haiku-mcp-server","version":"0.0.8","keywords":["mcp","haiku","blockchain","defi","ai-agent"],"author":{"name":"Haiku"},"license":"MIT","_id":"haiku-mcp-server@0.0.8","maintainers":[{"name":"haiku-trade","email":"thomas@haiku.trade"}],"homepage":"https://docs.haiku.trade","bugs":{"url":"https://github.com/Haiku-Trading/haiku-mcp-server/issues"},"bin":{"haiku-mcp-server":"dist/index.js"},"dist":{"shasum":"5eac4b0d6ea81eed9cb5be3addd2a7a82570d70a","tarball":"https://registry.npmjs.org/haiku-mcp-server/-/haiku-mcp-server-0.0.8.tgz","fileCount":53,"integrity":"sha512-Fexubuslh/aA9vQHH5AR7TzY9rQ0XzUZiMgMyJlVCSlSpLCNEQTXWrJYD6i1e9e5qwGA7XCOS18KnVROuoCdug==","signatures":[{"sig":"MEQCIAwGYpupDJFY5BxN0hIqOfB4J2tEPn8XCNwuJ0SdKOavAiAB6MelrXk0QJNMVcIlHQl4g2oF7Zst6AX+zL7rxeE9aA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":198891},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=18.0.0"},"gitHead":"c2ee0504a42b9fa6434cab8ed6163d051ea428a0","mcpName":"io.github.Haiku-Trading/haiku-mcp-server","scripts":{"dev":"tsc --watch","build":"tsc","start":"node dist/index.js","prepublishOnly":"npm run build"},"_npmUser":{"name":"haiku-trade","email":"thomas@haiku.trade"},"repository":{"url":"git+https://github.com/Haiku-Trading/haiku-mcp-server.git","type":"git"},"_npmVersion":"10.9.2","description":"MCP server for Haiku API - enables AI agents to execute any blockchain transactions","directories":{},"_nodeVersion":"23.11.0","dependencies":{"zod":"^3.23.0","viem":"^2.45.1","@modelcontextprotocol/sdk":"^1.0.0"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.4.0","@types/node":"^20.0.0"},"_npmOperationalInternal":{"tmp":"tmp/haiku-mcp-server_0.0.8_1776849436076_0.390646463543491","host":"s3://npm-registry-packages-npm-production"}},"0.0.9":{"name":"haiku-mcp-server","version":"0.0.9","description":"MCP server for Haiku API - enables AI agents to execute any blockchain transactions","mcpName":"io.github.Haiku-Trading/haiku-mcp-server","type":"module","main":"dist/index.js","bin":{"haiku-mcp-server":"dist/index.js"},"scripts":{"build":"tsc","start":"node dist/index.js","start:http":"node dist/index.js --http","dev":"tsc --watch","prepublishOnly":"npm run build"},"keywords":["mcp","haiku","blockchain","defi","ai-agent"],"author":{"name":"Haiku"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/Haiku-Trading/haiku-mcp-server.git"},"homepage":"https://docs.haiku.trade","dependencies":{"@modelcontextprotocol/sdk":"^1.0.0","viem":"^2.45.1","zod":"^3.23.0"},"devDependencies":{"@types/node":"^20.0.0","typescript":"^5.4.0"},"engines":{"node":">=18.0.0"},"_id":"haiku-mcp-server@0.0.9","gitHead":"395d0804e5b5919f1b70499b8daf20e7ff2b4e7b","types":"./dist/index.d.ts","bugs":{"url":"https://github.com/Haiku-Trading/haiku-mcp-server/issues"},"_nodeVersion":"23.11.0","_npmVersion":"10.9.2","dist":{"integrity":"sha512-Yvvc9K/VlWktRyd863elbZnHLJZCSripdp68LoyCq/2Kvykq5OEFIaHcsFzqu4o5haeHSrjBHIj7E1HafwcGPA==","shasum":"87a4c043169ab753e33d96cc70816166c1acdd71","tarball":"https://registry.npmjs.org/haiku-mcp-server/-/haiku-mcp-server-0.0.9.tgz","fileCount":54,"unpackedSize":205129,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQC8HFnPLDMHeD3R/DU971hiA9NfA59wdtORjcsBZF358QIhANT7XID/EXFDwXo/560upzPaRZOvKCS6YCuVFf1dGPj0"}]},"_npmUser":{"name":"haiku-trade","email":"thomas@haiku.trade"},"directories":{},"maintainers":[{"name":"haiku-trade","email":"thomas@haiku.trade"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/haiku-mcp-server_0.0.9_1776857788835_0.8160664051425821"},"_hasShrinkwrap":false}},"time":{"created":"2026-02-05T12:10:27.990Z","modified":"2026-04-22T11:36:29.073Z","0.0.1":"2026-02-05T12:10:28.131Z","0.0.2":"2026-02-05T14:51:17.250Z","0.0.3":"2026-02-09T10:29:51.123Z","0.0.4":"2026-02-23T11:09:59.944Z","0.0.5":"2026-02-27T09:44:02.949Z","0.0.6":"2026-03-02T13:30:29.959Z","0.0.7":"2026-03-11T11:38:43.558Z","0.0.8":"2026-04-22T09:17:16.231Z","0.0.9":"2026-04-22T11:36:28.964Z"},"bugs":{"url":"https://github.com/Haiku-Trading/haiku-mcp-server/issues"},"author":{"name":"Haiku"},"license":"MIT","homepage":"https://docs.haiku.trade","keywords":["mcp","haiku","blockchain","defi","ai-agent"],"repository":{"type":"git","url":"git+https://github.com/Haiku-Trading/haiku-mcp-server.git"},"description":"MCP server for Haiku API - enables AI agents to execute any blockchain transactions","maintainers":[{"name":"haiku-trade","email":"thomas@haiku.trade"}],"readme":"# Haiku MCP Server\n\nAn MCP (Model Context Protocol) server that enables AI agents to execute blockchain transactions via the [Haiku API](https://docs.haiku.trade).\n\n[![npm version](https://badge.fury.io/js/haiku-mcp-server.svg)](https://www.npmjs.com/package/haiku-mcp-server)\n[![GitHub](https://img.shields.io/badge/GitHub-Haiku--Trading%2Fhaiku--mcp--server-blue)](https://github.com/Haiku-Trading/haiku-mcp-server)\n\n## Features\n\n- **Token Discovery**: List supported tokens and DeFi assets across 21 blockchain networks\n- **Balance Checking**: Get wallet balances across all supported chains\n- **Trading Quotes**: Get quotes for swaps and portfolio rebalancing\n- **Transaction Building**: Convert quotes to unsigned EVM transactions\n- **Wallet Integration**: Extract EIP-712 payloads for external wallet signing (Coinbase, AgentKit, Safe, etc.)\n- **Self-Contained Execution**: Optional end-to-end execution with WALLET_PRIVATE_KEY env var\n- **Yield Discovery**: Find the highest-yielding DeFi opportunities across protocols and chains, filtered by APY, TVL, and category\n- **Portfolio Analysis**: Analyze a wallet's holdings and surface context-specific yield opportunities based on what it actually holds\n\n## Installation\n\n```bash\nnpm install haiku-mcp-server\n```\n\nOr run directly with npx:\n\n```bash\nnpx haiku-mcp-server\n```\n\n## Configuration\n\n### Environment Variables\n\n| Variable | Required | Description |\n|----------|----------|-------------|\n| `HAIKU_API_KEY` | No | Your Haiku API key for higher rate limits. Contact contact@haiku.trade to request one. |\n| `HAIKU_BASE_URL` | No | API base URL. Defaults to `https://api.haiku.trade/v1` |\n| `WALLET_PRIVATE_KEY` | No | Private key (0x hex) for self-contained execution via `haiku_execute`. |\n| `RPC_URL_{chainId}` | No | Override RPC URL for a specific chain (e.g., `RPC_URL_42161` for Arbitrum). |\n\n> **Note:** The API works without a key, but providing one unlocks higher rate limits for production use.\n\n### Claude Desktop Configuration\n\nAdd to your `claude_desktop_config.json`:\n\n```json\n{\n  \"mcpServers\": {\n    \"haiku\": {\n      \"command\": \"npx\",\n      \"args\": [\"haiku-mcp-server\"]\n    }\n  }\n}\n```\n\nWith API key for higher rate limits:\n\n```json\n{\n  \"mcpServers\": {\n    \"haiku\": {\n      \"command\": \"npx\",\n      \"args\": [\"haiku-mcp-server\"],\n      \"env\": {\n        \"HAIKU_API_KEY\": \"your-api-key-here\"\n      }\n    }\n  }\n}\n```\n\n## Available Tools\n\n### `haiku_get_tokens`\n\nGet supported tokens and DeFi assets for trading.\n\n**Parameters:**\n- `network` (optional): Filter by chain ID (e.g., 42161 for Arbitrum)\n- `category` (optional): Filter by token category:\n  - `token` - Vanilla tokens (ETH, USDC, etc.)\n  - `collateral` - eg. Aave aTokens (deposited collateral)\n  - `varDebt` - eg. Aave variable debt tokens\n  - `vault` - eg. Yearn/Morpho yield vaults\n  - `weightedLiquidity` - eg. Balancer LP tokens\n  - `concentratedLiquidity` - eg. Uniswap V3 LP positions\n\n**Example:**\n```json\n{\n  \"network\": 42161,\n  \"category\": \"token\"\n}\n```\n\n### `haiku_get_balances`\n\nGet token balances for a wallet address across all chains.\n\n**Parameters:**\n- `walletAddress` (optional): Wallet address or ENS name. Required when `WALLET_PRIVATE_KEY` is not set; omit to auto-derive from `WALLET_PRIVATE_KEY` when it is set.\n\n**Example:**\n```json\n{\n  \"walletAddress\": \"0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045\"\n}\n```\nOmit `walletAddress` when `WALLET_PRIVATE_KEY` is set to use the derived address.\n\n### `haiku_get_quote`\n\nGet a quote for a token swap or portfolio rebalance.\n\n> **Note:** Quotes are valid for 5 minutes, but execute as quickly as possible after quoting — the longer you wait, the more likely prices have moved and the transaction will fail on-chain.\n\n**Parameters:**\n- `inputPositions` (required): Map of token IID to amount to spend\n- `targetWeights` (required): Map of output token IID to weight (must sum to 1)\n- `slippage` (optional): Max slippage as decimal (default: 0.003)\n- `receiver`: Receiving wallet address. **Required when `WALLET_PRIVATE_KEY` is not set** — must be provided explicitly. When `WALLET_PRIVATE_KEY` is set, auto-derived if omitted. When `WALLET_PRIVATE_KEY` is not set (Path B), you must pass `receiver` explicitly.\n\n**Example:**\n```json\n{\n  \"inputPositions\": {\n    \"arb:0x82aF49447D8a07e3bd95BD0d56f35241523fBab1\": \"1.0\"\n  },\n  \"targetWeights\": {\n    \"arb:0xaf88d065e77c8cC2239327C5EDb3A432268e5831\": 0.5,\n    \"arb:0xFd086bC7CD5C481DCC9C85ebE478A1C0b69FCbb9\": 0.5\n  },\n  \"slippage\": 0.005\n}\n```\nExample above omits `receiver` (valid when `WALLET_PRIVATE_KEY` is set). For Path B, include `\"receiver\": \"0x...\"`.\n\n### `haiku_prepare_signatures`\n\nExtract and normalize EIP-712 signing payloads from a quote for external wallet signing (Path B only). When using `quoteId`, the quote must have been obtained in the same session.\n\nUse this when a wallet MCP handles signing (Coinbase Payments MCP, wallet-agent, AgentKit, Safe, etc.). Returns standardized typed data that any wallet's `signTypedData` can consume, plus step-by-step instructions.\n\n**Parameters:**\n- `quoteId` (preferred): Quote ID from `haiku_get_quote` — server resolves the full quote from session cache. QuoteId only works when the quote was returned by `haiku_get_quote` in the same MCP session; otherwise use `quoteResponse`.\n- `quoteResponse` (fallback): Full response object from `haiku_get_quote`, if quoteId is unavailable\n\n**Returns:**\n- `requiresPermit2`: Whether Permit2 signature is needed\n- `permit2`: EIP-712 payload to pass to `signTypedData` (if required)\n- `requiresBridgeSignature`: Whether bridge signature is needed\n- `bridgeIntent`: EIP-712 payload to pass to `signTypedData` (if required)\n- `sourceChainId`: Chain ID for the transaction\n- `instructions`: Step-by-step instructions for completing the flow\n\n**Example:**\n```json\n{\n  \"quoteId\": \"abc123...\"\n}\n```\n\n### `haiku_discover_yields`\n\nDiscover yield-bearing opportunities across DeFi protocols, ranked by APY or TVL.\n\nUse this to answer questions like \"best lending yields on Arbitrum\", \"highest APY vaults\nwith at least $1M TVL\", or \"what can I do with USDC on Base\". The `iid` field in results\ncan be used directly as a key in the `targetWeights` object in `haiku_get_quote`.\n\n**Parameters:**\n- `network` (optional): Filter by chain ID (e.g., 42161 for Arbitrum)\n- `category` (optional): `lending` (Aave collateral), `vault` (Yearn/Morpho), `lp` (Balancer/Uniswap), `all` (default)\n- `minApy` (optional): Minimum APY as a percentage (e.g., `5` means ≥5% APY)\n- `minTvl` (optional): Minimum TVL in USD (e.g., `1000000` means ≥$1M). Filters to established mainstream vaults.\n- `sortBy` (optional): `apy` (default) or `tvl`, descending\n- `limit` (optional): Max results (default 20)\n\n**Example:**\n```json\n{\n  \"network\": 42161,\n  \"category\": \"lending\",\n  \"minTvl\": 1000000,\n  \"sortBy\": \"apy\",\n  \"limit\": 10\n}\n```\n\n### `haiku_analyze_portfolio`\n\nAnalyze a wallet's DeFi portfolio and surface relevant yield opportunities.\n\nReturns current positions enriched with available APY options, collateral health factors,\nand context-specific opportunities based on what the wallet actually holds. Pair with\n`haiku_discover_yields` for broader market context, then use `haiku_get_quote` to execute.\n\n**Parameters:**\n- `walletAddress` (required): Wallet address (0x...) to analyze\n\n**Example:**\n```json\n{\n  \"walletAddress\": \"0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045\"\n}\n```\n\n### `haiku_execute`\n\nExecute a quote. Two distinct paths depending on who holds the private key.\n\n**Path A — Self-contained** (`WALLET_PRIVATE_KEY` set in env): Haiku signs Permit2/bridge payloads internally and broadcasts. Returns a tx hash.\n\n**Parameters:**\n- `quoteId` (required): Quote ID from `haiku_get_quote`\n- `sourceChainId` (recommended): Chain ID from the quote response. Omit only if the quote was obtained in the same session — the server can recover from cache.\n- `permit2SigningPayload` (optional): Pass through from `haiku_get_quote` if present\n- `bridgeSigningPayload` (optional): Pass through from `haiku_get_quote` if present (cross-chain only)\n- `approvals` (optional): Pass through from `haiku_get_quote` if present\n\n**Example:**\n```json\n{\n  \"quoteId\": \"abc123...\",\n  \"sourceChainId\": 42161,\n  \"permit2SigningPayload\": { /* from haiku_get_quote, if present */ },\n  \"approvals\": [ /* from haiku_get_quote, if present */ ]\n}\n```\n\n---\n\n**Path B — External wallet** (no `WALLET_PRIVATE_KEY`, using a wallet MCP): You sign and broadcast. `broadcast: false` is **required** — without `WALLET_PRIVATE_KEY`, haiku cannot sign or send the final EVM transaction. If you call `haiku_execute` with `broadcast: true` and no `WALLET_PRIVATE_KEY`, the server returns an error directing you to set `broadcast: false` and broadcast the returned transaction via your wallet MCP.\n\nBefore calling `haiku_execute`:\n1. If `approvals` is non-empty in the quote: broadcast each approval as a transaction `{ to, data, value }` (include `value` when present, e.g. for native token) via your wallet MCP and wait for confirmation.\n2. If signatures are required: call `haiku_prepare_signatures` with the quoteId, sign the returned EIP-712 payloads via your wallet MCP, then pass the signatures here.\n\n**Parameters:**\n- `quoteId` (required): Quote ID from `haiku_get_quote`\n- `sourceChainId` (recommended): Chain ID from the quote response. Omit only if the quote was obtained in the same session — the server can recover from cache.\n- `broadcast` (required): Must be `false` — haiku returns the unsigned tx for you to broadcast\n- `permit2Signature` (optional): Signature from signing the Permit2 payload via your wallet MCP\n- `userSignature` (optional): Signature from signing the bridge payload via your wallet MCP (cross-chain only)\n\n**Example:**\n```json\n{\n  \"quoteId\": \"abc123...\",\n  \"sourceChainId\": 42161,\n  \"broadcast\": false,\n  \"permit2Signature\": \"0x...\"\n}\n```\nReturns `{ transaction: { to, data, value, chainId } }` — pass `transaction` to your wallet MCP's `sendTransaction`.\n\n## Token IID Format\n\nTokens are identified using the IID format: `chainSlug:tokenAddress`\n\nExamples:\n- `arb:0x82aF49447D8a07e3bd95BD0d56f35241523fBab1` - WETH on Arbitrum\n- `arb:0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee` - Native ETH on Arbitrum\n- `base:0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913` - USDC on Base\n\n## Supported Chains\n\n| Chain | Chain ID | Slug |\n|-------|----------|------|\n| Arbitrum | 42161 | arb |\n| Avalanche | 43114 | avax |\n| Base | 8453 | base |\n| Berachain | 80094 | bera |\n| BNB Smart Chain | 56 | bsc |\n| Bob | 60808 | bob |\n| Ethereum | 1 | eth |\n| Gnosis | 100 | gnosis |\n| Hyperliquid | 999 | hype |\n| Katana | 747474 | katana |\n| Lisk | 1135 | lisk |\n| MegaETH | 4326 | megaeth |\n| Monad | 143 | monad |\n| Optimism | 10 | opt |\n| Plasma | 9745 | plasma |\n| Polygon | 137 | poly |\n| Scroll | 534352 | scroll |\n| Sei | 1329 | sei |\n| Sonic | 146 | sonic |\n| Unichain | 130 | uni |\n| World Chain | 480 | worldchain |\n| ApeChain | 33139 | ape |\n\n## Workflow Examples\n\n### Path A: Self-Contained Swap (WALLET_PRIVATE_KEY set)\n\nHaiku handles all signing and broadcasting. Returns a tx hash.\n\n```\n1. haiku_get_quote(inputPositions, targetWeights) → returns quoteId, sourceChainId, permit2SigningPayload?, bridgeSigningPayload?, approvals\n2. haiku_execute(quoteId, sourceChainId, permit2SigningPayload?, bridgeSigningPayload?, approvals)\n   → Haiku broadcasts approvals, signs Permit2/bridge internally, broadcasts swap, returns tx hash\n```\n\n### Path B: External Wallet (wallet MCP handles signing + broadcasting)\n\nUse when WALLET_PRIVATE_KEY is not set and a separate wallet MCP holds the keys.\n\n**Simple swap (no Permit2 or bridge signatures needed, e.g. native ETH input):**\n```\n1. haiku_get_quote(inputPositions, targetWeights, receiver) → returns quoteId, sourceChainId, approvals\n2. For each item in approvals: broadcast as transaction { to, data, value } (include value when present) via wallet MCP and wait for confirmation\n3. haiku_execute(quoteId, sourceChainId, broadcast: false)\n   → returns { transaction: { to, data, value, chainId } }\n4. Broadcast transaction via wallet MCP\n```\n\n**With Permit2 or bridge signatures (e.g. ERC-20 input or cross-chain swap):**\n```\n1. haiku_get_quote(inputPositions, targetWeights, receiver) → returns quoteId, sourceChainId, approvals, permit2SigningPayload?, bridgeSigningPayload?\n2. For each item in approvals: broadcast as transaction { to, data, value } (include value when present) via wallet MCP and wait for confirmation\n3. haiku_prepare_signatures(quoteId) → returns normalized EIP-712 payloads + step-by-step instructions\n4. Sign payloads via wallet MCP (e.g. coinbase_sign_typed_data) → get permit2Signature?, userSignature?\n5. haiku_execute(quoteId, sourceChainId, permit2Signature?, userSignature?, broadcast: false)\n   → returns { transaction: { to, data, value, chainId } }\n6. Broadcast transaction via wallet MCP (e.g. coinbase_send_transaction)\n```\n\n### Yield Discovery\n\n```\n1. haiku_discover_yields with category/network/minTvl filters → find opportunities, note iid\n2. haiku_get_quote with the chosen iid as a key in targetWeights\n3. Execute via Path A or Path B above\n```\n\n### Portfolio Analysis & Optimization\n\n```\n1. haiku_analyze_portfolio with wallet address → review positions and opportunities\n2. Optionally haiku_discover_yields for broader market context\n3. haiku_get_quote to rebalance into higher-yielding positions\n4. Execute via Path A or Path B above\n```\n\n## Transaction Signing\n\nTwo modes depending on your setup:\n\n**Self-contained** (`WALLET_PRIVATE_KEY` set): `haiku_execute` signs everything internally and broadcasts. Returns a tx hash. No external signing needed.\n\n**External wallet** (no `WALLET_PRIVATE_KEY`): Use `haiku_execute` with `broadcast: false` (required — haiku cannot sign or broadcast without the private key). If you call `haiku_execute` with `broadcast: true` and no `WALLET_PRIVATE_KEY`, the server returns an error directing you to set `broadcast: false` and broadcast the returned transaction via your wallet MCP. Returns `{ transaction: { to, data, value, chainId } }` for your wallet MCP to broadcast. If Permit2 or bridge signatures are required, call `haiku_prepare_signatures` first. If approvals are present in the quote, broadcast each approval `{ to, data, value }` (include `value` when present, e.g. for native token) via your wallet MCP before calling `haiku_execute`.\n\nThe external wallet design allows agents to use any signing infrastructure (wallet MCPs, hardware wallets, custodial services, MPC, etc.).\n\n## Cross-Chain Bridge Signatures\n\nFor cross-chain swaps, the quote may return `isComplexBridge: true`, indicating a bridge intent signature is required in addition to (or instead of) Permit2.\n\n**Self-contained (Path A):** Pass `bridgeSigningPayload` from the quote to `haiku_execute` — it handles the bridge signature internally.\n\n**External wallet (Path B):** Call `haiku_prepare_signatures` with the quoteId — it returns a normalized `bridgeIntent` EIP-712 payload. Sign it via your wallet MCP and pass the result as `userSignature` to `haiku_execute`.\n\n## Transport Modes\n\n### Stdio (default)\n\nStandard MCP stdio transport — used by Claude Desktop, Cursor, etc.\n\n```bash\nnpx haiku-mcp-server\n```\n\n### Streamable HTTP\n\nHTTP transport for remote hosting, Smithery, and web-based MCP clients.\n\n```bash\nnpx haiku-mcp-server --http\nnpx haiku-mcp-server --http --port=8080\n```\n\nEndpoints:\n- `POST /mcp` — MCP Streamable HTTP endpoint\n- `GET /health` — Health check\n\n## Development\n\n```bash\n# Install dependencies\nnpm install\n\n# Build\nnpm run build\n\n# Run locally (stdio, works without API key)\nnpm start\n\n# Run locally (HTTP)\nnpm run start:http\n\n# Run with API key for higher rate limits\nHAIKU_API_KEY=your-key npm start\n```\n\n## License\n\nMIT\n","readmeFilename":"README.md"}