Configuration
Customize network, RPC endpoint, and gas payment settings
Overview
StarkFi stores configuration settings locally using env-paths. All settings persist across terminal restarts and apply to both CLI and MCP server.
starkfi config listFor the full list of subcommands and flags, see the CLI Config Reference.
Quick Reference
| What you want to do | Command |
|---|---|
| See all settings | starkfi config list |
| Switch to testnet | starkfi config set-network sepolia |
| Use a custom RPC | starkfi config set-rpc <url> |
| Pay gas in USDC | starkfi config set-gas-token USDC |
| Let the developer pay gas | starkfi config set-gasfree on |
| Reset everything | starkfi config reset |
Network
Switch between Starknet mainnet and Sepolia testnet:
starkfi config set-network mainnet # Production (default)
starkfi config set-network sepolia # TestnetNetwork switching is instant — no re-login required. StarkFi resolves the network at runtime using a priority chain: config.network (user override) → session.network (login default).
Gas Abstraction
By default, you pay gas in STRK. StarkFi supports two alternative gas modes via the AVNU Paymaster — both let you transact without holding STRK.
Gasfree Mode — Developer Pays Everything
The developer sponsors all gas fees. Users transact for free.
starkfi config set-gasfree on # Enable
starkfi config set-gasfree off # DisableBest for onboarding new users, demos, and testing environments.
Gasless Mode — User Pays in Any Token
Users pay gas in an ERC-20 token they already hold — no STRK needed:
starkfi config set-gas-token USDC # Pay gas in USDC
starkfi config set-gas-token ETH # Pay gas in ETH
starkfi config set-gas-token reset # Revert to default (STRK)Supported Gas Tokens
| Token | Description |
|---|---|
| STRK | Default gas token |
| ETH | Ether |
| USDC | USD Coin |
| USDT | Tether |
| DAI | Dai Stablecoin |
Important: Gasfree and Gasless modes are mutually exclusive. Enabling one clears the other. Use
starkfi config listto verify your current mode.
For the technical details of how gas abstraction works, see AVNU Paymaster.
Environment Variables
These environment variables override configuration for advanced use cases:
| Variable | Purpose | Default |
|---|---|---|
STARKFI_API_URL | StarkFi auth server URL | Built-in default |
AVNU_PAYMASTER_API_KEY | API key for AVNU Paymaster (optional, for authenticated access) | — |
MCP Server Configuration
When using the MCP server with AI agents, the same settings are available through the config_action tool. See Auth & Config Tools for the full API reference.
See Also
- CLI Config Reference — Full subcommand reference with all flags
- AVNU Paymaster — Technical details of gas abstraction
- Auth & Config Tools — MCP tool equivalent for AI agents
Last updated on