Gemini

Developer integration guide — connect GoldenClaw to Google Gemini CLI via MCP.

Prerequisites

Setup

1. Add GoldenClaw MCP Server

Option A: CLI Command

Terminal
gemini mcp add --transport http \
  --header "Authorization: Bearer YOUR_API_KEY" \
  goldenclaw https://stage.goldenclaw.sh/mcp

Replace YOUR_API_KEY with your actual API key.

Option B: Config File

Edit ~/.gemini/settings.json (global) or .gemini/settings.json (project-scoped):

~/.gemini/settings.json
{
  "mcpServers": {
    "goldenclaw": {
      "httpUrl": "https://stage.goldenclaw.sh/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_API_KEY"
      }
    }
  }
}

Project vs global config

Project-scoped .gemini/settings.json applies only to that directory. Global config at ~/.gemini/settings.json works everywhere.

2. Verify Connection

Launch Gemini CLI and type:

"What's the current BTC/USDT price on Binance futures?"

You should see Gemini call the get_price tool and return the current price.

Example Prompts

"Calculate RSI for ETH/USDT on the 4h timeframe on Bybit"

"What are my open positions on Binance futures?"

"Show me Bollinger Bands for SOL/USDT on OKX"

"Analyze BTC/USDT: get price, RSI, and MACD on the 4h chart"

Available Tools

CategoryTools
Market Dataget_price, get_ohlcv, get_ticker, get_pairs, get_symbols, get_timeframes
Tradingplace_order, cancel_order, get_orders, get_positions, close_position
Accountget_balance, get_account
Analysiscalculate_indicator (35+ indicators)
Discoverylist_exchanges

See MCP Tools for full tool documentation.

Troubleshooting

"Unauthorized" error

Your API key may have expired or been revoked. Generate a new one from your Dashboard.

"Connection refused" or timeout

Check that the URL is exactly https://stage.goldenclaw.sh/mcp. Gemini CLI supports streamable HTTP, SSE, and stdio transports — GoldenClaw uses streamable HTTP.

Tools not appearing

Restart Gemini CLI after adding the config. Verify the JSON syntax in settings.json is valid.