web3-tools-mcp 3.1.0 → 3.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. package/CHANGELOG.md +29 -0
  2. package/README.md +23 -11
  3. package/dist/chains.d.ts +609 -65
  4. package/dist/chains.d.ts.map +1 -1
  5. package/dist/chains.js +89 -28
  6. package/dist/chains.js.map +1 -1
  7. package/dist/client.d.ts.map +1 -1
  8. package/dist/client.js +2 -4
  9. package/dist/client.js.map +1 -1
  10. package/dist/http-server.d.ts +1 -1
  11. package/dist/http-server.d.ts.map +1 -1
  12. package/dist/http-server.js +3 -2
  13. package/dist/http-server.js.map +1 -1
  14. package/dist/index.js +0 -5
  15. package/dist/index.js.map +1 -1
  16. package/dist/tools/index.d.ts.map +1 -1
  17. package/dist/tools/index.js +2 -0
  18. package/dist/tools/index.js.map +1 -1
  19. package/dist/tools/read/advanced.d.ts +16 -16
  20. package/dist/tools/read/balance.d.ts +6 -6
  21. package/dist/tools/read/contract-info.d.ts +12 -12
  22. package/dist/tools/read/contract.d.ts +10 -10
  23. package/dist/tools/read/defi.d.ts +86 -0
  24. package/dist/tools/read/defi.d.ts.map +1 -0
  25. package/dist/tools/read/defi.js +210 -0
  26. package/dist/tools/read/defi.js.map +1 -0
  27. package/dist/tools/read/gas.d.ts +16 -16
  28. package/dist/tools/read/logs.d.ts +4 -4
  29. package/dist/tools/sign/transactions.d.ts +12 -12
  30. package/dist/tools/sign/wallet.d.ts +4 -4
  31. package/dist/types.d.ts +0 -1
  32. package/dist/types.d.ts.map +1 -1
  33. package/dist/utils.d.ts.map +1 -1
  34. package/dist/utils.js +1 -2
  35. package/dist/utils.js.map +1 -1
  36. package/dist/wallet-client.d.ts.map +1 -1
  37. package/dist/wallet-client.js +2 -2
  38. package/dist/wallet-client.js.map +1 -1
  39. package/package.json +2 -2
  40. package/src/chains.ts +101 -31
  41. package/src/client.ts +2 -3
  42. package/src/http-server.ts +3 -3
  43. package/src/index.ts +0 -5
  44. package/src/tools/index.ts +2 -0
  45. package/src/tools/read/defi.ts +287 -0
  46. package/src/types.ts +0 -1
  47. package/src/utils.ts +1 -2
  48. package/src/wallet-client.ts +9 -2
package/CHANGELOG.md CHANGED
@@ -2,6 +2,35 @@
2
2
 
3
3
  Notable changes per release. Dates are release dates; unreleased work sits at the top.
4
4
 
5
+ ## [3.2.0] — 2026-10-02
6
+
7
+ ### Added
8
+
9
+ - Monad, Robinhood Chain, Arc, Plasma, Ink, Mantle, Celo and HyperEVM (`hyperevm`).
10
+ `get_portfolio` skips Plasma and Mantle, where Alchemy has no token API, and
11
+ `get_contract_abi` cannot reach Ink, which Etherscan does not index.
12
+ - **`get_portfolio`** values a wallet across chains in one call: Alchemy finds the native and
13
+ ERC20 balances, DefiLlama prices them, largest first. Tokens DefiLlama cannot price are
14
+ left out and counted, which drops the spam airdrops that otherwise bury a wallet's real
15
+ holdings. Offered when `ALCHEMY_API_KEY` is set.
16
+ - **`get_token_prices`** prices up to 25 tokens on a chain in USD, now or at a past
17
+ timestamp, from DefiLlama's free API — the zero address for the native token. Tokens it
18
+ cannot price come back as unpriced.
19
+ - **`get_yield_pools`** lists DefiLlama's lending, staking and liquidity pools on the
20
+ supported chains, filtered by token, protocol, stablecoins and TVL, highest APY first.
21
+
22
+ ### Changed
23
+
24
+ - The signing page moved from `/` to `/sign/`, leaving the root free for a host's own page.
25
+ Signing links in the old `/#t=…` form no longer open it. `SIGN_PATH` is exported for hosts
26
+ building links.
27
+
28
+ ### Removed
29
+
30
+ - Infura: `INFURA_API_KEY` and `--infura-api-key`. Any other provider still works through
31
+ `CUSTOM_RPC`, chain by chain.
32
+ - Sonic. Alchemy serves no token API there, and its DeFi activity has largely moved on.
33
+
5
34
  ## [3.1.0] — 2026-10-01
6
35
 
7
36
  Mostly fixes, several of them for security — worth taking on any hosted server.
package/README.md CHANGED
@@ -1,11 +1,13 @@
1
1
  <div align="center">
2
2
 
3
- # web3-tools-mcp
3
+ <img src="https://raw.githubusercontent.com/hajnalben/web3-tools-mcp/main/wallet-relay/public/icon.png" alt="Web3 Tools logo" width="112" height="112">
4
4
 
5
- **Your agent proposes the transaction. You approve it — in your own wallet, on your phone.** 📱
5
+ # Web3 Tools MCP
6
6
 
7
- 32 MCP tools for reading any EVM network and signing transactions in *your own* wallet.
8
- Every transaction is decoded, named and simulated before you approve it.
7
+ **Everything onchain your agent needs — read, price, simulate, sign — with you holding the keys.** 🔐
8
+
9
+ 35 MCP tools across 19 EVM networks, signing in *your own* wallet on your phone or in the browser.
10
+ Every transaction is decoded, named and simulated before it reaches your wallet.
9
11
 
10
12
  [![npm](https://img.shields.io/npm/v/web3-tools-mcp?color=%233856d6&label=npm)](https://www.npmjs.com/package/web3-tools-mcp)
11
13
  [![downloads](https://img.shields.io/npm/dm/web3-tools-mcp?color=%233856d6)](https://www.npmjs.com/package/web3-tools-mcp)
@@ -123,7 +125,7 @@ returns the page URL any time you want to open it yourself.
123
125
  ## 🧰 Tools
124
126
 
125
127
  <details>
126
- <summary><b>32 tools</b> — reads, writes, ENS, logs, tracing</summary>
128
+ <summary><b>35 tools</b> — reads, writes, ENS, logs, tracing</summary>
127
129
 
128
130
  ### ✍️ Transactions & signing
129
131
  | Tool | |
@@ -173,6 +175,9 @@ of your wallet.
173
175
  | `estimate_gas` | Gas for any transaction |
174
176
  | `trace_transaction` | Call tree, prestate or state diff |
175
177
  | `debug_call` | Trace a call without broadcasting, through a node at `ANVIL_RPC_URL` |
178
+ | `get_portfolio` | A wallet's native and ERC-20 holdings across chains, valued in USD; tokens DefiLlama cannot price — spam, mostly — are left out. Needs `ALCHEMY_API_KEY` |
179
+ | `get_token_prices` | USD prices from DefiLlama, now or at a past timestamp, up to 25 tokens; the zero address prices the native token |
180
+ | `get_yield_pools` | DefiLlama yield pools by chain, token and protocol, highest APY first |
176
181
 
177
182
  Tracing prefers an RPC that exposes `debug_*`, and otherwise uses a node you already run at
178
183
  `ANVIL_RPC_URL` (default `127.0.0.1:8545`, e.g. `anvil --fork-url …`) — nothing is started
@@ -194,7 +199,7 @@ ENS tools take `mainnet` (ENS), `linea` (Linea Names) or `base` (Basenames).
194
199
  </details>
195
200
 
196
201
  <details>
197
- <summary>🌐 <b>13 networks</b></summary>
202
+ <summary>🌐 <b>20 networks</b></summary>
198
203
 
199
204
  | Network | Chain ID | Hypersync |
200
205
  | --- | --- | --- |
@@ -204,12 +209,19 @@ ENS tools take `mainnet` (ENS), `linea` (Linea Names) or `base` (Basenames).
204
209
  | Base | 8453 | ✅ |
205
210
  | BNB Chain | 56 | ✅ |
206
211
  | Gnosis | 100 | ✅ |
207
- | Sonic | 146 | ✅ |
208
212
  | Optimism | 10 | ✅ |
209
213
  | Polygon | 137 | ✅ |
210
214
  | zkSync Era | 324 | ✅ |
211
215
  | Linea | 59144 | ✅ |
212
216
  | Unichain | 130 | ✅ |
217
+ | Monad | 143 | ✅ |
218
+ | Robinhood Chain | 4663 | ✅ |
219
+ | Arc | 5042 | ✅ |
220
+ | Plasma | 9745 | ✅ |
221
+ | Ink | 57073 | ✅ |
222
+ | Mantle | 5000 | ✅ |
223
+ | Celo | 42220 | ✅ |
224
+ | HyperEVM | 999 | ✅ |
213
225
  | Localhost | 1337 | ❌ |
214
226
 
215
227
  Adding one is a single entry in [`mcp/src/chains.ts`](https://github.com/hajnalben/web3-tools-mcp/blob/main/mcp/src/chains.ts).
@@ -305,7 +317,7 @@ What you lose is reach, not stability — so here is the honest version:
305
317
  | Key | Free from | Without it |
306
318
  | --- | --- | --- |
307
319
  | `WALLETCONNECT_PROJECT_ID` | [walletconnect](https://dashboard.walletconnect.com) | 📱 **No phone signing at all.** Browser wallet only, so a hosted instance has no way to sign |
308
- | `ALCHEMY_API_KEY`<br>or `INFURA_API_KEY`<br>or `CUSTOM_RPC` | [alchemy](https://alchemy.com) · [infura](https://infura.io) | **No historical state.** Public endpoints answer `403 Archive requests require a personal token`, which takes out balances, storage and calls at a past block, event ranges, and `trace_transaction` |
320
+ | `ALCHEMY_API_KEY`<br>or `CUSTOM_RPC` | [alchemy](https://alchemy.com) | **No historical state.** Public endpoints answer `403 Archive requests require a personal token`, which takes out balances, storage and calls at a past block, event ranges, and `trace_transaction` |
309
321
  | `ETHERSCAN_API_KEY` | [etherscan](https://etherscan.io/apis) | `get_contract_abi`, `get_contract_source_code` and `get_contract_source_file` refuse. Signing previews still decode — they try Sourcify first, then recover the ABI from bytecode |
310
322
  | `HYPERSYNC_API_KEY` | [envio](https://envio.dev) | `get_logs` asks the RPC first and falls back to Hypersync when the RPC refuses the range. Without a token that fallback is gone, so wide or past ranges depend on your provider's limits |
311
323
 
@@ -314,7 +326,7 @@ and browser signing. Add `WALLETCONNECT_PROJECT_ID` for your phone and one provi
314
326
  history, and everything above lights up.
315
327
 
316
328
  Every key has a matching flag (`--etherscan-api-key`, …), RPC selection falls back
317
- Alchemy → Infura → public, and `CUSTOM_RPC` overrides all of it.
329
+ Alchemy → public, and `CUSTOM_RPC` overrides both, chain by chain.
318
330
  `npx web3-tools-mcp --help` lists them; [.env.example](https://github.com/hajnalben/web3-tools-mcp/blob/main/.env.example) documents each one.
319
331
 
320
332
  ```bash
@@ -410,8 +422,8 @@ Render's free Key Value instance is not an option here — no persistence, so th
410
422
  disappears at its next maintenance.
411
423
 
412
424
  Both signers work on a hosted instance. The signing page is served from the same port as
413
- `/mcp`, so `https://your-host/#t=<relay token>` is your wallet page — no second service to
414
- deploy. Ask the agent for `wallet_status` to get the link; it is behind `MCP_TOKEN` and never written to the logs. Unless
425
+ `/mcp`, so `https://your-host/sign/#t=<relay token>` is your wallet page — no second service to
426
+ deploy. The root is left free for a page of your own. Ask the agent for `wallet_status` to get the link; it is behind `MCP_TOKEN` and never written to the logs. Unless
415
427
  you set `WALLET_TOKEN`, the relay secret is minted fresh each boot rather than stored, so the
416
428
  URL changes when you redeploy.
417
429