starkfi
v0.7.2
Published
AI-native Starknet DeFi CLI + MCP Server + Agent Skills — Swaps, multi-swap, batch (multicall), staking, liquid staking (LST), lending, DCA, Troves vaults, confidential transfers, simulation, portfolio, gas abstraction
Maintainers
Readme
npx starkfi@latest --helpWhy StarkFi?
Most DeFi tools are built for humans clicking buttons. StarkFi is built for agents.
- 🤖 51 MCP tools — Any AI assistant (Cursor, Claude, Antigravity) can execute DeFi operations autonomously
- ⚡ Atomic Batching — Combine swap + stake + lend + send into a single multicall transaction
- 💸 Gas Abstraction — Pay gas in STRK, ETH, USDC, USDT, or DAI — or let the developer sponsor gas entirely
- 🔒 Confidential Transfers — Privacy-preserving transfers via Tongo Cash (ZK proofs)
- 📅 DCA — Recurring buy orders via AVNU and Ekubo
- 🧪 Simulate Everything — Dry-run any transaction before broadcasting
- 💬 Telegram Bot — Chat-based DeFi via natural language with BYOAI model
Quick Start
# 1. Authenticate
npx starkfi@latest auth login [email protected]
npx starkfi@latest auth verify [email protected] <OTP_CODE>
# 2. Check balance
npx starkfi@latest balance
# 3. Swap tokens
npx starkfi@latest trade 100 USDC ETH --simulate # Preview
npx starkfi@latest trade 100 USDC ETH # Execute
# 4. View portfolio
npx starkfi@latest portfolioWhat You Can Do
| Feature | CLI Example | Docs |
| --- | --- | --- |
| Swap | trade 100 USDC ETH --provider auto | Trading |
| Multi-Swap | multi-swap "100 USDC>ETH, 50 DAI>STRK" | Trading |
| Batch | batch --swap "0.1 ETH USDC" --stake "50 STRK karnot" | Batch |
| Stake | stake 100 -v karnot | Staking |
| Lend | lend-supply 100 -p Prime -t USDC | Lending |
| DCA | dca-create 1000 USDC ETH --per-cycle 10 --frequency P1D | DCA |
| Troves Vaults | troves-deposit 100 evergreen_strk | Troves |
| LST Staking | lst-stake 100 | LST |
| Confidential | conf-fund 100 --token USDC | Confidential |
| Portfolio | portfolio-rebalance --target "50 ETH, 30 USDC, 20 STRK" | Portfolio |
| Gas Modes | config set-gasfree on / config set-gas-token USDC | Configuration |
→ Full CLI Reference (50 commands)
AI Integration
MCP Server (51 Tools)
npx starkfi@latest mcp-startAdd to your AI client config (Cursor, Claude Desktop, Antigravity):
{
"mcpServers": {
"starkfi": {
"command": "npx",
"args": ["-y", "starkfi@latest", "mcp-start"]
}
}
}| Category | Tools | Count |
| --- | --- | --- |
| Auth & Config | get_auth_status, config_action | 2 |
| Wallet | get_balance, get_portfolio, deploy_account, send_tokens, get_tx_status, rebalance_portfolio | 6 |
| Trade | get_swap_quote, swap_tokens, get_multi_swap_quote, multi_swap, batch_execute | 5 |
| Staking | list_validators, list_pools, get_staking_info, get_stake_status, stake_tokens, unstake_tokens, claim_rewards, compound_rewards | 8 |
| Lending | list_lending_pools, get_lending_position, supply_assets, withdraw_assets, borrow_assets, repay_debt, close_position, monitor_lending_position, auto_rebalance_lending, lending_quote_health | 10 |
| DCA | dca_preview, dca_create, dca_list, dca_cancel | 4 |
| Confidential | confidential_setup, confidential_balance, confidential_fund, confidential_transfer, confidential_withdraw, confidential_ragequit, confidential_rollover | 7 |
| Troves Vaults | list_troves_strategies, get_troves_position, troves_deposit, troves_withdraw | 4 |
| LST Staking | get_lst_position, get_lst_stats, lst_stake, lst_redeem, lst_exit_all | 5 |
→ Full MCP Documentation · Tool Schemas (MCP.md)
Agent Skills (12 Workflows)
npx skills add ahmetenesdur/starkfiPre-packaged multi-step workflows for AI coding assistants — authenticate, swap, stake, lend, DCA, batch, and more.
Telegram Bot
Chat-based DeFi via natural language with BYOAI model (OpenAI, Claude, Gemini).
→ Bot Setup · Repository
Architecture
src/
├── commands/ # 14 command groups (50 commands)
├── services/ # 17 service modules
├── mcp/ # MCP server (51 tools, stdio transport)
├── lib/ # 15 shared utilities
skills/ # 14 agent skills
server/ # Auth server (Hono + Privy TEE)
docs/ # Documentation site (Fumadocs)→ Architecture Deep Dive · Security Model
Starkzap Modules
StarkFi leverages all core Starkzap v3 modules:
| Module | Usage |
| --- | --- |
| Wallets | OnboardStrategy.Privy + argentXV050 for email-based wallet onboarding |
| Paymaster | Gas abstraction with v3 { type: "paymaster", gasToken } union |
| Staking | Multi-token lifecycle (STRK, WBTC, tBTC, SolvBTC, LBTC) |
| DCA | Recurring buy orders via AVNU and Ekubo |
| TxBuilder | Atomic multicall batching (swap + stake + lend + send + DCA + troves) |
| Confidential | Privacy-preserving transfers via Tongo Cash (ZK proofs) |
| Troves | DeFi vault strategies — deposit/withdraw into yield-bearing vaults |
| Endur LST | Liquid staking (STRK → xSTRK) — yield embedded in share price |
| ERC-20 | Token presets, balance queries, transfers, approvals |
Development
git clone https://github.com/ahmetenesdur/starkfi.git
cd starkfi
pnpm install
pnpm build # Compile TypeScript → dist/
pnpm dev -- --help # Run with tsx (hot-reload)
pnpm lint # ESLint
pnpm format # PrettierAuth Server
cd server && pnpm install && cp .env.example .env && pnpm devContributing
- Fork the repository and create a feature branch
- Install dependencies:
pnpm install - Build and verify:
pnpm build && pnpm lint - Submit a pull request with a clear description
For bugs and feature requests, open an issue.
License
MIT — ahmetenesdur
