StarkFi
StarkFi is an advanced command-line interface and Model Context Protocol (MCP) toolkit designed for decentralized finance operations on Starknet. Engineered for both direct developer interaction and artificial intelligence agent workflows, it provides a highly optimized, abstracted layer over complex DeFi protocols.
The toolkit integrates the StarkZap SDK, Privy authentication, Fibrous trade aggregation, Vesu V2 lending, and AVNU paymaster services into a unified, secure environment.
System Architecture Overview
StarkFi abstracts the complexities of the Starknet ecosystem through the following core capabilities:
- Intelligent Trade Routing: Seamless token swaps aggregated via Fibrous for optimal execution paths.
- Multi-Swap: Execute up to 3 token swaps in a single transaction via Fibrous batch routing.
- Transaction Batching: Bundle different operations (swap + stake + supply + send) into a single Starknet multicall.
- Simulation / Dry Run: Estimate fees and validate any transaction without broadcasting — available on swap, send, multi-swap, and batch.
- Portfolio Dashboard: Consolidated view of all DeFi positions — token balances (with USD), staking, and lending.
- Advanced Gas Abstraction: All transactions are routed through the Paymaster by default. Gas is paid in STRK (configurable to ETH, USDC, USDT, DAI). Developer-sponsored (Gasfree) mode is also available.
- Delegation and Staking Management: Multi-token staking lifecycle controls (STRK, WBTC, tBTC, SolvBTC, LBTC), including entering pools, restaking, atomic compounding, and intent-based unstaking.
- Protocol-Level Lending: Direct integration with Vesu V2 for supplying collateral, borrowing assets, and managing debt positions.
- Native AI Integration: An embedded Model Context Protocol (MCP) server that exposes the entire toolkit to LLM-driven environments such as Cursor and Claude.
System Requirements
- Node.js: v18.0.0+
- Starknet Auth Server: Required for Email OTP (Privy TEE) and AVNU Paymaster gas abstraction.
Quick Start Configuration
1. Secure Authentication
StarkFi utilizes a remote Auth Server for email-based OTP.
npx starkfi auth login <user@example.com>
npx starkfi auth verify <user@example.com> <verification_code>
2. Primary Command Reference
Session and Wallet Management
npx starkfi auth logout
npx starkfi status
npx starkfi address
npx starkfi deploy
npx starkfi balance [--token <symbol>] [--json]
npx starkfi send <amount> <token> <recipient> [--simulate] [--json]
npx starkfi portfolio [--json]
Trading and Aggregation (Fibrous)
npx starkfi trade <amount> <from> <to> [--slippage <percent>] [--simulate] [--json]
npx starkfi multi-swap "<pairs>" [--slippage <percent>] [--simulate] [--json]
Transaction Batching (Multicall)
npx starkfi batch [--simulate] \
--swap "100 USDC ETH" \
--stake "50 STRK karnot" \
--supply "200 USDC 0xPool" \
--send "10 STRK 0xAddr"
Staking Operations
npx starkfi validators [--json]
npx starkfi pools <validator> [--json]
npx starkfi stake-status [validator] [--json]
npx starkfi stake <amount> --validator <name> [--token <symbol>] [--simulate]
npx starkfi rewards --validator <name> [--token <symbol>] <--claim|--compound>
npx starkfi unstake <intent|exit> --validator <name> [--token <symbol>] [--amount <amount>]
Environment Configuration
npx starkfi tx-status <hash>
npx starkfi config list
npx starkfi config set-rpc <url>
npx starkfi config get-rpc
npx starkfi config set-network <mainnet|sepolia>
npx starkfi config set-gasfree <on|off>
npx starkfi config set-gas-token <token|reset>
Lending and Borrowing (Vesu V2)
Pool data (assets, APY, pairs) is fetched dynamically from the Vesu API.
npx starkfi lend-pools
npx starkfi lend-pools <name>
npx starkfi lend-supply <amount> -p <pool> -t <token>
npx starkfi lend-withdraw <amount> -p <pool> -t <token>
npx starkfi lend-borrow -p <pool> \
--collateral-amount <n> --collateral-token <token> \
--borrow-amount <n> --borrow-token <token> \
[--use-supplied]
npx starkfi lend-repay <amount> -p <pool> -t <token> \
--collateral-token <token>
npx starkfi lend-status -p <pool> \
--collateral-token <token> [--borrow-token <token>]
npx starkfi lend-close -p <pool> \
--collateral-token <token> --borrow-token <token>
Artificial Intelligence Integration (MCP)
StarkFi is built from the ground up to operate as an MCP server, allowing AI assistants to reason about and execute DeFi operations.
npx starkfi mcp-start
For detailed integration instructions and the complete LLM tool registry, refer to the MCP Documentation.
Agent Skills
StarkFi ships with 10 agent skills — structured instruction sets that teach AI coding assistants (Cursor, Claude, Antigravity) how to use the CLI without custom prompting.
| Auth | authenticate-wallet |
| Wallet Data | balance, portfolio |
| Transaction | send, trade, multi-swap, batch, staking, lending |
| Utility | config |
npx skills add ahmetenesdur/starkfi
Each skill documents the exact commands, parameters, error handling, and multi-step workflows an agent should follow. For full details, see the Skills Documentation.
License
MIT License.