# andresdefi/zerodust [Health: Active]

**Category:** 💰 Finance & Fintech  
**Repository:** https://github.com/andresdefi/zerodust  
**GitHub Stars:** 2  
**npm Downloads (last month):** 421  
**Views:** 8  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/andresdefi-zerodust

## Description
Sweep an agent's native gas balance to exactly zero on 25+ EVM chains via EIP-7702 sponsored execution — a relayer pays the gas and is reimbursed from the sweep, so nothing is left stranded. Same-chain or cross-chain. Read-only by default; sweeping is opt-in and destination-allowlisted, so a prompt-injected agent still cannot redirect funds. npx @zerodust/mcp-server

## Tools
Capabilities this server exposes over MCP:

- **zerodust_get_chains** — List the EVM chains a native gas balance can be emptied to exactly zero on. Returns chain IDs, names, and native tokens. Call this to check whether a specific chain is supported before quoting or sweeping.
- **zerodust_get_destinations** — List the chains a balance on fromChainId can be swept to, receiving that chain's native gas (e.g. ETH on Base, BNB on BSC, HYPE on HyperEVM). Destinations are not limited to the chains ZeroDust sweeps from: any EVM chain a bridge serves qualifies. Call this before quoting a cross-chain sweep to pick where the funds should go.
- **zerodust_get_balances** — Find leftover native gas token (ETH, BNB, POL, ...) stranded across every supported EVM chain for one address, and report which of it can be recovered. Normally these balances are unrecoverable: you cannot transfer 100% of a gas token, because paying for the transfer consumes the thing you are transferring, so a remainder is always left behind. This reports what is stuck and what could be moved out. Useful when a wallet has small amounts scattered over many chains, when someone cannot send their full balance, or before closing out, winding down or decommissioning a wallet.
- **zerodust_get_quote** — Price out emptying a chain's native gas balance to exactly zero: how much actually arrives, the full fee breakdown, and whether the balance is even large enough to be worth recovering. Call this before sweeping so the user sees the numbers first. Returns a quote ID; quotes expire after about 60 seconds.
- **zerodust_get_sweep_status** — Check how a previously submitted sweep is progressing. Returns the current status (pending, simulating, executing, bridging, completed, failed), the transaction hash once there is one, and the error message if it failed.
- **zerodust_list_sweeps** — List past sweeps for a wallet address, with status and amounts. Useful for confirming a chain was already emptied before trying again.
- **zerodust_register_api_key** — Issue this agent its own ZeroDust API key for higher rate limits, with no human signup step. The read-only tools work without a key, so only call this when rate limits are actually being hit, or when setting up an unattended agent that will run repeatedly. The key is returned once and is not stored by this server - report it to the operator so they can set ZERODUST_API_KEY.
- **zerodust_info** — Explain how a native gas balance can be emptied to exactly zero, what it costs, and how to set this server up to do it. Call this when asked how ZeroDust works, why a full balance normally cannot be sent, or what sweeping will cost.
- **zerodust_get_agent_address** — Show which wallet this ZeroDust server signs with, where its key comes from, and which destinations it is allowed to sweep to. Call this before any sweep to confirm the right wallet is about to be emptied. Requires ZERODUST_ALLOW_EXECUTE=true plus a signing key; without them this tool returns an error and moves no funds. Pass dryRun=true to rehearse the whole flow without moving anything.
- **zerodust_sweep** — Empty one chain completely: move 100% of the native gas token off it and leave the balance at exactly zero. This is the operation an ordinary transfer cannot do, because sending the gas token requires keeping some gas token back to pay for the send. Use when the goal is to close out, wind down, decommission or fully exit a chain, or to recover a leftover or stranded balance that is too small to move normally. Moves real funds. Call zerodust_get_quote first to show the user what they will receive. Requires ZERODUST_ALLOW_EXECUTE=true plus a signing key; without them this tool returns an error and moves no funds. Pass dryRun=true to rehearse the whole flow without moving anything.
- **zerodust_sweep_all** — Empty every chain that still holds a native gas balance, consolidating all of it onto one destination chain and leaving each source at exactly zero. Use when the goal is to clean up a wallet across chains, collect scattered leftover gas, or retire a wallet entirely. Moves real funds across multiple chains. Call zerodust_get_balances first to show the user what will be swept. Requires ZERODUST_ALLOW_EXECUTE=true plus a signing key; without them this tool returns an error and moves no funds. Pass dryRun=true to rehearse the whole flow without moving anything.

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

```json
"mcpServers": {
  "zerodust": {
    "command": "npx",
    "args": ["-y","@zerodust/mcp-server"],
    "env": {
      "ZERODUST_API_KEY": "",
      "ZERODUST_ALLOW_EXECUTE": ""
    }
  }
}
```

**Requires environment variables:** `ZERODUST_API_KEY`, `ZERODUST_ALLOW_EXECUTE` — the values above are empty placeholders; fill in real credentials before running (see the repository for what each one is for).

## Documentation

## What andresdefi/zerodust MCP server does

ZeroDust addresses a limitation of ordinary native-token transfers: sending a wallet's entire gas balance normally requires retaining some of that same token to pay transaction fees. The MCP server exposes agent tools for identifying these stranded amounts and, when execution is enabled, moving the full balance so the source chain ends at exactly zero.

It works with native gas assets across supported EVM networks, including ETH, BNB, POL, and other chain-specific tokens. A sweep may deliver funds to an address on the same chain or use a bridge to reach another EVM chain. The balance and destination are bounded by the sweep request, while the fee limit is signed as part of the intent.

## How it works

For chains using EIP-7702, the wallet authorizes a temporary delegation and a ZeroDust sponsor submits the transaction. The sponsor pays the gas and is reimbursed from the amount being swept. Other supported networks use direct wallet transactions planned to the exact wei, with chain-specific protections or paymaster support where needed. Cross-chain delivery can use Relay, Across, Stargate, Gas.zip, or a chain's own bridge, depending on the route.

The normal workflow is read-only first: check supported chains, inspect balances, request a quote, and confirm the wallet and permitted destinations. A quote includes the expected amount received, fee details, and whether recovery is worthwhile; it expires after about 60 seconds. Execution can then be simulated with `dryRun=true` before submitting a real sweep.

## Setup and configuration

Run the local package with `npx @zerodust/mcp-server`. The MCP package and hosted agent services are paused and deprecated on npm, while the local server and SDK can still call the public ZeroDust API. Read-only operations work without an API key. `ZERODUST_API_KEY` can be supplied for higher rate limits; a key issued by the registration tool is returned once and should be reported to the operator for configuration.

Real execution requires `ZERODUST_ALLOW_EXECUTE=true` and a signing key. Without both, the address and sweep tools return an error and do not move funds. Keep execution disabled for agents that only need balance inspection, quoting, or history.

## Tools and capabilities

- `zerodust_get_chains` checks chain IDs, names, and native tokens supported for exact-zero recovery.
- `zerodust_get_balances` scans an address across supported chains and distinguishes stranded amounts from recoverable balances.
- `zerodust_get_quote` calculates expected delivery, fees, and a short-lived quote ID.
- `zerodust_get_agent_address` reports the signing wallet and allowed destinations, with a dry-run option.
- `zerodust_sweep` empties one chain; `zerodust_sweep_all` consolidates balances from multiple chains onto one destination chain.
- `zerodust_get_sweep_status` and `zerodust_list_sweeps` provide progress and historical records.
- `zerodust_info` explains the mechanism and costs, while `zerodust_register_api_key` issues an API key when rate limits require it.

## Limitations and notes

Fees include 1% of swept value, subject to a minimum and maximum, plus transaction gas, possible rollup data fees, and cross-chain bridge charges. Balances below $1 use a different percentage fee. Some routes deliver a token rather than native gas when no native-gas bridge is available, and the quote identifies that outcome.

Execution moves real funds. The destination must be confirmed before sweeping, and the quote should be shown first. ZeroDust reports internal security review and testing, but its contracts are not externally audited. The package is intended for local use rather than the disabled hosted MCP endpoint or agent key-signup service.

_Full upstream README: https://allmcps.com/mcp/andresdefi-zerodust/readme_

