Web3 MCP proxy for AI agents: DeFi swaps, bridges, market data, wallets, and gated writes.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
π‘ Paste into ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows)
See it in production: The Arena β 11 AI agents trade real capital through Web3Agent.
MCP package:
web3agent| npm: https://www.npmjs.com/package/web3agent | GitHub: https://github.com/Apegurus/web3agent | Contact: hello@apeguru.dev
Links: Website Β· GitHub Β· npm Β· Smithery Β· The Arena Β· X / @Web3AgentFi
Give your AI agent EVM execution and DeFi tooling: swaps, bridges, limit and trigger orders, exchange trading, market data, research, wallet management. 190+ MCP tools. One install.
Works out of the box with Claude Code, Cursor, Windsurf, OpenCode, and Codex. Self-custodial. By default, write operations go through a confirmation queue: nothing executes without your approval unless you explicitly disable confirmations.
EVM execution is a solved problem. Stop rebuilding it. Plug in and ship.
Once installed, your AI agent can execute real DeFi operations in plain language:
Common flows avoid ABI handling and transaction building. Generic contract reads and writes are available when you provide or register an ABI, or when explorer ABI lookup is available. The agent handles routing, transaction preparation, and the confirmation queue. You approve, it executes.
This detects Claude Code, Cursor, Windsurf, OpenCode, or Codex and configures the MCP server automatically. Restart your host, then ask:
For any other MCP-capable host, configure a stdio server that runs:
The generic MCP config shape is:
Writes are confirmation-gated by default, and wallet secrets are not exposed through MCP unless explicitly enabled.
For a step-by-step guide covering both human and agent setups, see docs/guides/universal-access.md.
Smithery URL publishing requires a hosted Streamable HTTP MCP endpoint. Web3Agent is distributed as a local stdio/npm server, so Smithery distribution uses an MCPB bundle instead:
The generated MCPB is a thin local bundle that launches the published npm package with npm exec --package web3agent@0.6.2.
npx web3agent init auto-configures Claude Code, Cursor, Windsurf, OpenCode, or Codex. No manual config edits for supported hosts.Use these after installation to get to value quickly:
| Host | Config location |
|---|---|
| Claude Code | ~/.claude/mcp.json |
| Cursor | .cursor/mcp.json |
| Windsurf | ~/.codeium/windsurf/mcp_config.json |
| OpenCode | .opencode/config.json |
| Codex | .codex/config.toml |
| OpenClaw | agent-mediated self-install via canonical guide |
Basic EVM operations use viem's chain registry and can target any viem-supported EVM chain when RPC access is available.
Enhanced swap and order integrations currently cover Ethereum, Base, Arbitrum, Optimism, Polygon, Linea, BSC, Avalanche, Sonic, Mode, Blast, Celo, and Gnosis. Token resolution, explorer, LI.FI, and market/research tools have provider-specific coverage; LI.FI bridge quotes and execution support 20+ chains through LI.FI's own chain list.
Default: Base (8453). Override with the CHAIN_ID env var or pass chainId per call.
| Capability | Provider | Notes |
|---|---|---|
| On-chain state | Native EVM tools | Balances, contract reads/writes, gas, ENS, multicall (27 tools) |
| Swaps | GOAT / Uniswap / Balancer | Same-chain, ERC-20/721 |
| Aggregated swaps | Orbs Liquidity Hub | Optimal pricing via solver network |
| Cross-chain bridges | LI.FI | 20+ chains |
| Lending | GOAT SDK / protocol integrations | Aave, Morpho, and major money-market surfaces where supported |
| Advanced orders | Orbs | Spot market, limit, TWAP, stop-loss, take-profit, delayed orders |
| Exchange trading | CCXT | Public/private access across 100+ exchanges (6 tools) |
| Block explorer | Blockscout + Etherscan | Address info, tx history, NFTs, contract ABIs, network stats (35 tools) |
| Market data | DefiLlama / CoinGecko / Binance | TVL, prices, DEX volume, stablecoin stats, sentiment (20 tools) |
| Research | DefiLlama / on-chain | Contract security, yield analysis, whale tracking, governance (13 tools) |
| Token resolution | Built-in registry + DexScreener | Symbol-to-address, long-tail assets |
| Wallet management | web3agent + Open Wallet Standard | CLI/MCP lifecycle, encrypted OWS vault when configured, legacy fallback |
| Confirmation queue | Built-in | Write operations require explicit approval by default |
| Agent protocols | aGDP / ACP / ERC-8183 / x402 / ERC-8004 | Agent marketplace, cooperation, payments |
| Price data | CoinGecko | Requires COINGECKO_API_KEY |
| 0x swaps | 0x | Requires ZEROX_API_KEY |
Scaffolds a ready-to-run project from one of three bundled templates:
Each starter uses the same web3agent lifecycle surfaces as MCP and CLI.
Root examples are included in the npm package:
The examples default to small USDC-denominated flows and only prepare wallet actions when you pass --prepare.
Use web3agent when you want AI agents to discover or interact with your protocol without every team rebuilding wallet, chain, token, quote, explorer, and confirmation plumbing.
Integration surfaces:
web3agent for app-owned agents and browser-wallet flowsGood first integration targets:
For protocol support or integration questions, open an issue at https://github.com/Apegurus/web3agent/issues or contact hello@apeguru.dev.
Wallet secret MCP tools are disabled by default so private keys and mnemonics do not enter an AI agent's inference context. Use the local web3agent wallet ... commands above for safe generation/import. If you explicitly accept the risk of agent-visible secrets, set WEB3AGENT_ALLOW_AGENT_VISIBLE_SECRETS=1 to re-enable the legacy MCP behavior.
wallet_deactivate only deactivates the current runtime session and returns to read-only ephemeral mode. Use confirmation-gated wallet_delete when you intentionally want to permanently remove persisted wallet material.
By default, web3agent keeps wallet secrets out of MCP tool responses and agent-visible inputs. The local web3agent wallet ... commands are the recommended way to generate or import private keys and mnemonics because they require an interactive TTY and refuse JSON secret output. Set WEB3AGENT_ALLOW_AGENT_VISIBLE_SECRETS=1 only if you explicitly accept that private keys or mnemonics can be sent through the MCP host and visible to the agent/inference provider.
For persisted server-side wallets, setting OWS_PASSPHRASE is not mandatory, but strongly recommended. When it is set on macOS/Linux and OWS is available, web3agent uses the Open Wallet Standard encrypted vault instead of the legacy filesystem-protected wallet store. The OWS spec minimum is 12 characters; web3agent warns on weak runtime passphrases and local wallet generation/import rejects shorter values. Use a 16+ character mixed passphrase in production. Configure it in the process that runs web3agent, whether that is npx web3agent as an MCP server or an app/service using createRuntime({ env: { OWS_PASSPHRASE: "..." } }).
If OWS_PASSPHRASE is missing, empty, OWS is unavailable, the platform is Windows, or OWS_FORCE_LEGACY=1 is set, web3agent falls back to legacy wallet storage protected by file permissions only. Migrating a legacy wallet.json leaves a plaintext wallet.json.migrated rollback backup; delete it after verifying OWS access. For multi-agent services, run separate wallet-using runtimes in separate processes until per-runtime wallet isolation is supported.
Use the package root for stable, typed EVM capabilities from another app or agent layer.
Use resolveCanonicalToken() for well-known registry tokens and native-token aliases. Use resolveToken() when you also want DexScreener discovery fallback for long-tail assets.
Use the root API when your app owns the signer (e.g. a browser wallet via wagmi or AppKit).
prepareOperation(...) returns the next wallet actions plus resumeStateresumeOperation(...) continues until the operation completesTransaction actions are only considered complete once you return a confirmed result:
resumeOperation() independently verifies the receipt before advancing.
Architecture notes: docs/architecture/browser-wallet-operations.md
Use web3agent/runtime when you need tool discovery, generic invocation, or upstream passthrough tools.
See WEB3_CONTEXT.md for the full environment variable reference.
For authenticated exchange access via CCXT tools, set CCXT_CONFIG_PATH to a JSON file containing named accounts and exchange credentials.
MIT
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/web3agent)<a href="https://allmcps.com/mcp/web3agent"><img src="https://allmcps.com/api/badge/web3agent?style=directory" alt="Web3agent on AllMCPs" /></a>