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. The hosted auth server is currently offline, so first start your own and point the CLI at it (Self-hosting the auth server):
export STARKFI_API_URL=http://localhost:3001 # your auth server
npx starkfi@latest auth login user@example.com
# Check your email for the OTP code
npx starkfi@latest auth verify user@example.com 123456This creates a local session that the MCP server uses for all operations. The session persists across restarts and records which auth server issued it; the MCP server signs and sponsors transactions through that server, so keep it running.
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
| Variable | Required | Default | Description |
|---|---|---|---|
STARKFI_API_URL | No | https://starkfi-production.up.railway.app (offline) | Auth server used by auth login / auth verify. Later commands use the server recorded in the session. |
Step 3: Verify Connection
Once connected, ask your AI agent:
"What StarkFi tools are available?"
It should list all 51 tools across Auth, Wallet, Trade, Staking, Lending, DCA, Troves, LST, and Confidential 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-startThe server communicates over stdio — it reads from stdin and writes to stdout following the MCP protocol.
See Also
- MCP Overview — Tool categories, discovery, and architecture
- Auth & Config Tools — First tools to verify after setup
- Security Architecture — MCP security model and tool sandboxing
Last updated on