A production-grade CLI, MCP server, and Telegram bot that gives both developers and AI agents full access to Starknet DeFi — powered by the Starkzap SDK.
npx starkfi@latest --helpMost DeFi tools are built for humans clicking buttons. StarkFi is built for agents.
- 🤖 42 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
# 1. Authenticate
npx starkfi@latest auth login user@example.com
npx starkfi@latest auth verify user@example.com <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 portfolio| 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 |
| 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 (41 commands)
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 |
→ Full MCP Documentation · Tool Schemas (MCP.md)
npx skills add ahmetenesdur/starkfiPre-packaged multi-step workflows for AI coding assistants — authenticate, swap, stake, lend, DCA, batch, and more.
Chat-based DeFi via natural language with BYOAI model (OpenAI, Claude, Gemini).
→ Bot Setup · Repository
src/
├── commands/ # 12 command groups (41 commands)
├── services/ # 15 service modules
├── mcp/ # MCP server (42 tools, stdio transport)
├── lib/ # 15 shared utilities
skills/ # 12 agent skills
server/ # Auth server (Hono + Privy TEE)
docs/ # Documentation site (Fumadocs)
→ Architecture Deep Dive · Security Model
StarkFi leverages all core Starkzap modules:
| Module | Usage |
|---|---|
| Wallets | OnboardStrategy.Privy + argentXV050 for email-based wallet onboarding |
| Paymaster | Gas abstraction with 5 tokens + developer-sponsored gasfree mode |
| 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) |
| Confidential | Privacy-preserving transfers via Tongo Cash (ZK proofs) |
| ERC-20 | Token presets, balance queries, transfers, approvals |
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 # Prettiercd server && pnpm install && cp .env.example .env && pnpm dev- 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.
MIT — ahmetenesdur