fibx
OfficialFibX
A command-line tool for DeFi operations on Base, Citrea, HyperEVM, and Monad, powered by Fibrous aggregation and Privy Server Wallets.
Features
Multi-Chain Support: Base, Citrea, HyperEVM, and Monad
Portfolio: Cross-chain portfolio overview with USD valuations and DeFi positions
Token Swaps: Optimal routing via Fibrous aggregation with auto-slippage
Transfers: Send ETH or any ERC-20 token
Aave V3: Supply, borrow, repay, withdraw, and browse markets on Base
MCP Server: Built-in AI agent integration for Cursor, Claude Desktop, and Antigravity (11 tools, 4 categories)
Agent Skills: Prompt-based AI skills via fibx-skills
Privy Server Wallets: Server-side signing — the CLI receives signed transaction payloads or signatures, not Privy app credentials or raw keys
Policy-Enforced Signing: Configured chain allowlists and native-value caps are evaluated by Privy at signing time
Private Key Import: Use an existing wallet with AES-256-GCM encrypted local storage
Preflight Checks: Transaction flows validate or estimate execution where the underlying RPC supports it
Dry‑Run Mode:
--simulatepreviews write operations without broadcasting; gas estimates are included where availableJSON Output:
--jsonflag for scripting and pipelinesZero-Dependency Install: Single-file bundle via tsup —
npx fibxruns near-instantly
Related MCP server: Fibrous MCP Server
Supported Chains
Chain | Native Token | Aave V3 |
Base | ETH | ✅ |
Citrea | cBTC | — |
HyperEVM | HYPE | — |
Monad | MON | — |
Installation
Run directly with npx (no install needed):
npx fibx statusOr install globally:
npm install -g fibxRequirements
Node.js >= 18
A running fibx-server instance (required for Privy wallet operations; not needed for private key imports)
Quick Start — First Swap in 3 Minutes
Step 1: Get a Price Quote (no auth needed)
Try FibX instantly — no sign-up, no wallet, no keys:
npx fibx quote 0.01 ETH USDC # Check price on Base
npx fibx quote 100 USDC DAI --chain base # Compare pairs
npx fibx quote 0.5 MON USDC --chain monad # Check Monad pricesStep 2: Authenticate (pick one)
Option A — Email Login (Privy Server Wallet, no keys to manage):
npx fibx auth login you@email.com # Sends OTP to your email
npx fibx auth verify you@email.com 123456 # Verify & create walletOption B — Import Private Key (use an existing wallet):
npx fibx auth import # Paste your key (encrypted at rest)Step 3: Execute
npx fibx trade 0.01 ETH USDC # Execute the swap
npx fibx balance # Check your balancesThat's it. Three steps from zero to first swap.
Usage
Authentication
# Email OTP (uses Privy server wallet)
npx fibx auth login user@example.com
npx fibx auth verify user@example.com 123456
# Or import a private key (local signing, no server needed)
npx fibx auth import
# Check session status
npx fibx status
# Logout
npx fibx auth logoutSecurity: When using
auth import, your private key is encrypted at rest with AES-256-GCM. The encryption key is auto-generated per machine and stored in the OS config directory (e.g.~/.config/fibx-nodejs/encryption-keyon Linux). You can also set theFIBX_SESSION_SECRETenvironment variable for CI/Docker environments.
Global Options
Option | Description | Default |
| Target chain ( |
|
| Output results as JSON |
|
Balance
npx fibx balance
npx fibx balance --chain citreaPortfolio
Consolidated cross-chain portfolio view with USD valuations:
npx fibx portfolio # Table output across all chains
npx fibx portfolio --json # Structured JSON for scriptingShows all token holdings across Base, Citrea, HyperEVM, and Monad with USD values. Includes DeFi positions (Aave V3 collateral/debt) and total portfolio net worth. Token prices are sourced live from Fibrous.
Send
npx fibx send 0.001 0xRecipient # Send native token on Base (ETH)
npx fibx send 10 0xRecipient USDC # Send ERC-20 on Base
npx fibx send 1 0xRecipient --chain monad # Send MON on Monad
npx fibx send 0.1 0xRecipient --simulate # Preview without sendingQuote
Get swap prices without authentication:
npx fibx quote 0.01 ETH USDC # Price check on Base
npx fibx quote 1 MON USDC --chain monad # Check Monad prices
npx fibx quote 0.1 ETH USDC --json # JSON output for scriptsNo wallet or authentication required. Use
quoteto explore prices, thentradeto execute.
Swap
npx fibx trade <amount> <from> <to>
npx fibx trade 0.0001 ETH USDC
npx fibx trade 20 USDC DAI
npx fibx trade 1 MON USDC --chain monad
npx fibx trade 0.1 ETH USDC --simulate # Preview without broadcastingOptions: --slippage <n> (default: 0.5%), --approve-max, --simulate, --json
Note: The
tradecommand automatically detects Wrap (Native -> Wrapped) and Unwrap (Wrapped -> Native) operations and executes them directly via contract calls, bypassing aggregator routing to save gas.
Transaction Status
npx fibx tx-status <hash>
npx fibx tx-status 0x123...abc --chain monadWallet Info
npx fibx address # Print active wallet address
npx fibx wallets # Show active wallet detailsAave V3 (Base)
npx fibx aave status # Account health
npx fibx aave markets # List all active reserves with APY & TVL
npx fibx aave supply 1 ETH # Auto-wraps ETH -> WETH and supplies
npx fibx aave supply 100 USDC # Supply ERC-20
npx fibx aave borrow 50 USDC # Borrow
npx fibx aave repay 50 USDC # Repay
npx fibx aave repay max ETH # Auto-wraps ETH and repays full WETH debt
npx fibx aave withdraw max ETH # Withdraws WETH and auto-unwraps to ETH
npx fibx aave supply 1 ETH --simulate # Preview without broadcastingNote:
supply,repay, andwithdrawsupport automatic ETH <-> WETH wrapping/unwrapping on Base.
Configuration
Set custom RPC URLs to avoid rate limits on public endpoints:
npx fibx config set-rpc base https://mainnet.base.org
npx fibx config get-rpc base
npx fibx config reset-rpc base # Reset single chain to default
npx fibx config reset-rpc # Reset all chains to default
npx fibx config listHot-reload: Config changes are picked up automatically — no need to restart the CLI or MCP server.
AI Agent Integration
MCP Server
fibx includes a built-in MCP server for AI editors like Cursor, Claude Desktop, and Antigravity. See MCP.md for setup and available tools.
npx fibx mcp-startThe MCP server exposes 11 tools across 4 categories (Auth & Config, Wallet & Portfolio, Trading, DeFi). All write operations support a simulate=true preview that does not broadcast; gas estimates are returned only where available.
Agent Skills
For prompt-based agent integration (Claude Code, Cursor, etc.), see the fibx-skills repository.
Security
Letting an AI agent operate a wallet requires controls outside the model. fibx combines signing-layer policies, server-side validation, client hints, and explicit previews. These controls reduce risk, but the server credentials, MCP client configuration, and deployment policy remain part of the trust boundary:
Layer | What it does |
Privy signing policy | The default policy allowlists configured chains, caps each transaction's native-token |
fibx-server schemas |
|
MCP tool annotations | Every transactional tool advertises |
Simulation |
|
Local key storage | Imported private keys are encrypted at rest with AES-256-GCM using a per-machine key stored |
Wallet policy limits are configured per deployment — see the fibx-server wallet policy docs.
Note: policies are attached when a wallet is created. Wallets provisioned before policies were introduced keep signing without them until migrated.
Architecture
This repository is the CLI and MCP server. Three sibling repositories complete the stack:
Repository | Role |
fibx (this repo) | CLI + stdio MCP server, shipped as a single dependency-free bundle |
Hono backend that proxies Privy — holds the app secret so the CLI never does, and owns the wallet signing policy | |
Prompt-based Agent Skills for Claude Code, Cursor, and other skill-aware agents | |
Telegram bot that drives this CLI over MCP, with one process and separate config paths per active user |
src/
├── commands/ # CLI commands (auth, trade, send, aave, config)
├── mcp/ # Modular MCP server
│ ├── server.ts # Entry point + MCP_INSTRUCTIONS
│ ├── tools/ # Tool registrations (auth, wallet, trade, defi)
│ └── handlers/ # Tool implementations
├── services/ # Business logic (chain, fibrous, auth, defi, portfolio)
└── lib/ # Shared utilities (errors, fetch, format, crypto)Development
pnpm install
pnpm dev # run the CLI from source
pnpm test # vitest unit tests
pnpm typecheck # tsc --noEmit
pnpm lint # eslint
pnpm build # tsup bundle to dist/Related Links
Fibrous Finance — DEX aggregator powering swaps
License
Maintenance
Related MCP Servers
- Flicense-qualityDmaintenanceEnables cross-chain cryptocurrency swap quotes and operations using the deBridge DLN protocol. Provides read-only access to swap estimates, supported chains, token information, and order status tracking across multiple blockchain networks.Last updated1
- Flicense-qualityDmaintenanceProvides tools for multi-chain DeFi operations using the Fibrous SDK, enabling AI agents to find swap routes, build transactions, and execute swaps across Base, Starknet, and Scroll networks.Last updated1

Haiku DeFi MCPofficial
AlicenseAqualityFmaintenanceMCP server for DeFi execution — lets AI agents swap, provide liquidity, lend, bridge, and run yield strategies across 22 chains in a single transaction. 7 tools for token discovery, portfolio analysis, quoting, and execution via the Haiku API.Last updated7592MIT- FlicenseAqualityFmaintenanceDeFi execution and agent-to-agent economy tools for AI agents — swaps, yield, transfers, policy enforcement, trust scoring, A2A jobs, and P\&L across Ethereum, Base, Arbitrum, and Polygon.Last updated311
Related MCP Connectors
Non-custodial DeFi for AI agents: swaps, concentrated liquidity (V3/V4) zaps + ranges, 5 EVM chains
Cross-network DeFi API data, AMM analytics, and SDK docs for 17+ networks.
Multi-aggregator swap router for AI agents on Base. 10 bps fee. MCP-native, non-custodial.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/Fibrous-Finance/fibx'
If you have feedback or need assistance with the MCP directory API, please join our Discord server