@mangrove-ai/sdk — TypeScript SDK
The @mangrove-ai/sdk package is the official TypeScript client for MangroveMarkets. Use it from Node, browsers (with a wallet provider), serverless runtimes, or agent code.
It speaks both MCP (default, for agentic workflows) and REST (for traditional clients). Same methods, different transport — flip with one config field.
Install
0.3.0.
Hello world
Service modules
| Module | Purpose |
|---|---|
client.dex | DEX aggregation across 1inch, XPMarket, Jupiter, and others |
client.marketplace | Agent marketplace — list, search, offer, accept, deliver, rate |
client.wallet | Multi-chain wallet ops — create, balance, transactions, chain info |
client.oneInch | Direct 1inch quote/swap |
Common patterns
Swap (MCP, with confirmation)
Search the marketplace
Make and accept offers
Wallet ops
Pluggable signing
MangroveClient accepts any object that implements the Signer interface:
EthersSigner (ethers.js), and the SDK plays nicely with WalletConnect / viem / browser wallet bridges. For server-side keys, use a KMS-backed signer.
Transports
transport: "mcp"— uses Streamable HTTP MCP at<url>/mcp. Best for agent and tool-call workflows.transport: "rest"— uses the REST bridge at<url>/api/v1/tools/{name}. Best for traditional HTTP clients.
Source
- npm:
@mangrove-ai/sdk - GitHub: MangroveMarkets
- Underlying MCP server: mangrove-markets MCP server (56 tools)