# Gemini CLI — CryptoDataAPI

> Add live crypto data to Gemini CLI: install the CryptoDataAPI Agent Skill and connect the MCP server in ~/.gemini/settings.json (httpUrl + headers). Free.

Give **Gemini CLI** live crypto market data — prices, funding, open interest, liquidations, market regimes, Fear & Greed, dealer gamma and whale activity — as native MCP tools.

Two parts: the **Agent Skill** (knowledge) and the **[MCP server](/ai-agents/mcp-server)** (live tools). Gemini CLI configures MCP servers in `~/.gemini/settings.json` under `mcpServers`, and supports remote HTTP (`httpUrl` + `headers`) as well as stdio (`command`/`args`).

- **Vendor:** Google
- **Agent docs:** https://google-gemini.github.io/gemini-cli/docs/tools/mcp-server.html
- **Config:** `~/.gemini/settings.json`
- **MCP transports:** http, stdio

## Step 1 — Install the Agent Skill

Install the skill with the skills CLI so Gemini knows how to use our data and workflows. See the [Agent Skill page](/ai-agents/agent-skill) for what's inside.

**Terminal:**
```bash
npx skills add Crypto-Data-API/cryptodataapi-skills -g -y
```

## Step 2 — Connect the MCP server

Because our auth is a custom `X-API-Key` header, the cleanest path is to edit `~/.gemini/settings.json` and use the remote **`httpUrl`** form with a `headers` block. Replace `cdk_live_YOUR_KEY` with your key — free one at [cryptodataapi.com/login](https://cryptodataapi.com/login).

Prefer a subprocess? Use the stdio block instead. You can also scaffold a server with `gemini mcp add --transport http cryptodataapi https://cryptodataapi.com/mcp`, then add the header line in `settings.json` (CLI header flags vary by version).

**~/.gemini/settings.json (remote HTTP):**
```json
{
  "mcpServers": {
    "cryptodataapi": {
      "httpUrl": "https://cryptodataapi.com/mcp",
      "headers": { "X-API-Key": "cdk_live_YOUR_KEY" }
    }
  }
}
```

**~/.gemini/settings.json (stdio):**
```json
{
  "mcpServers": {
    "cryptodataapi": {
      "command": "npx",
      "args": ["-y", "cryptodataapi-mcp"],
      "env": { "CRYPTODATA_API_KEY": "cdk_live_YOUR_KEY" }
    }
  }
}
```

## Step 3 — Try these prompts

Start Gemini CLI and run `/mcp` to confirm the server and its tools loaded. Then ask for a market read — see the example prompts below.

## Example prompts

- "What's the current market regime and which strategy baskets fit it?"
- "Compare BTC funding rates across exchanges and flag crowded positioning."
- "Which coins have the highest liquidation risk right now?"
- "Summarize the daily snapshot as a short morning market brief."
- "Is dealer gamma amplifying or dampening BTC moves today?"

## FAQ

### Does it cost anything?

No. The skill is free and the **Free** API tier (no card) covers the whole market-wide picture. Per-coin quant, gamma and whale signals need [Pro](/pricing).

### httpUrl or command — which should I use?

Use **`httpUrl`** (remote HTTP) with a `headers` block — no Node, always current, and it passes our `X-API-Key` cleanly. Use **`command`** (stdio, the `cryptodataapi-mcp` bridge) if you'd rather run a local subprocess; it needs Node.js and reads `CRYPTODATA_API_KEY`.

### Gemini doesn't list the tools — what now?

Run `/mcp` inside Gemini CLI to see connection status. A failed HTTP server usually means a typo in `httpUrl` or a missing/invalid `X-API-Key`; a failed stdio server usually means Node/`npx` isn't on PATH. Fix and restart the CLI.

## Related

- [MCP Server](https://cryptodataapi.com/ai-agents/mcp-server)
- [Agent Skill](https://cryptodataapi.com/ai-agents/agent-skill)
- [OpenAI Codex setup](https://cryptodataapi.com/ai-agents/openai-codex)
- [Claude Code setup](https://cryptodataapi.com/ai-agents/claude-code)
- [REST API docs](https://cryptodataapi.com/api/docs)

---

Canonical: https://cryptodataapi.com/ai-agents/gemini-cli
Machine-readable API map: https://cryptodataapi.com/llms.txt
Agent skill repo: https://github.com/Crypto-Data-API/cryptodataapi-skills (`npx skills add Crypto-Data-API/cryptodataapi-skills -g -y`)
Free API key (no signup): POST https://cryptodataapi.com/api/v1/auth/keys {"email":"you@example.com"}
