StarkFiStarkFi

MCP Setup

Configure StarkFi MCP server in Claude, Cursor, Antigravity, and other AI clients

Step 1: Authenticate

Before the MCP server can execute any transactions, you must authenticate the CLI locally:

npx starkfi@latest auth login user@example.com
# Check your email for the OTP code
npx starkfi@latest auth verify user@example.com 123456

This creates a local session that the MCP server uses for all operations. The session persists across restarts.

Step 2: Configure Your AI Client

Claude Desktop

Add to claude_desktop_config.json:

{
	"mcpServers": {
		"starkfi": {
			"command": "npx",
			"args": ["-y", "starkfi@latest", "mcp-start"]
		}
	}
}

Cursor

Add to .cursor/mcp.json:

{
	"mcpServers": {
		"starkfi": {
			"command": "npx",
			"args": ["-y", "starkfi@latest", "mcp-start"]
		}
	}
}

Antigravity

Add to ~/.gemini/antigravity/mcp_config.json:

{
	"mcpServers": {
		"starkfi": {
			"command": "npx",
			"args": ["-y", "starkfi@latest", "mcp-start"]
		}
	}
}

Other MCP Clients

Any MCP-compatible client can connect. The server uses stdio transport (standard MCP protocol). Use the same command configuration:

  • Command: npx
  • Args: ["-y", "starkfi@latest", "mcp-start"]

Environment Variables

VariableRequiredDefaultDescription
STARKFI_API_URLNohttp://localhost:3001Backend auth server URL
STARKFI_NETWORKNomainnetNetwork: mainnet or sepolia
STARKFI_RPC_URLNoStarkzap presetCustom RPC endpoint

Step 3: Verify Connection

Once connected, ask your AI agent:

"What StarkFi tools are available?"

It should list all 27 tools across Auth, Wallet, Trade, Staking, and Lending categories.

You can also verify the session is active:

"Check my StarkFi auth status"

This calls get_auth_status and confirms the session, wallet address, and network.

Manual Start

You can also start the server manually for debugging:

starkfi mcp-start

The server communicates over stdio — it reads from stdin and writes to stdout following the MCP protocol.

Edit on GitHub

Last updated on

On this page