> ## Documentation Index
> Fetch the complete documentation index at: https://marrow-docs.hologrow.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Using Gemini CLI

# Using Gemini CLI with Marrow

Use Gemini CLI when you want a terminal-first Google Gemini agent that can read your synced Marrow data over MCP.

## Prerequisites

* At least one data source connected in [Integrations](../Marrow%20Basics/Features/Integrations.md) and syncing in [Data Explorer](../Marrow%20Basics/Features/Data%20Explorer.md)
* [Gemini CLI](https://github.com/google-gemini/gemini-cli) installed and signed in
* An MCP key from [AI Platforms](../Marrow%20Basics/Features/AI%20Platforms.md)

## Step 1: Get Marrow credentials

From **AI Hub → AI Platforms**:

* MCP server URL: `https://mcp.marrow.ai/mcp/v1`
* Create an **MCP key** and copy it (shown only once)

See also: [MCP overview](./MCP.md)

## Step 2: Add the Marrow MCP server

From your project root:

```bash theme={null}
gemini mcp add --transport http --scope project \
  -H "Authorization: Bearer YOUR_MCP_KEY" \
  marrow "https://mcp.marrow.ai/mcp/v1"
```

Replace `YOUR_MCP_KEY` with your key from AI Platforms.

* `--transport http` is required for remote streamable HTTP servers (default is stdio).
* `--scope project` writes to `.gemini/settings.json`; use `--scope user` for `~/.gemini/settings.json`.

## Step 3: Reload Gemini CLI

Restart your Gemini CLI session so it loads the new MCP server. You can confirm with:

```bash theme={null}
gemini mcp list
```

## Step 4: Test the connection

```
Show me my Amazon Seller sales for the last 7 days.
```

If Gemini CLI returns real data from your synced accounts, you are connected.

## Optional: config with an environment variable

To avoid storing the key inline, edit the Marrow entry in settings and reference an env var (supported by Gemini CLI headers interpolation):

```json theme={null}
{
  "mcpServers": {
    "marrow": {
      "httpUrl": "https://mcp.marrow.ai/mcp/v1",
      "headers": {
        "Authorization": "Bearer ${MARROW_MCP_KEY}"
      }
    }
  }
}
```

Then export `MARROW_MCP_KEY` in your shell before starting Gemini CLI.

## Security

* Marrow is **read-only** — it never posts or changes store/ad settings.
* Prefer env-based keys for shared machines or committed project configs.
* Rotate or revoke keys from AI Platforms anytime.

## Related

* [MCP overview](./MCP.md)
* [AI Platforms](../Marrow%20Basics/Features/AI%20Platforms.md)
* [Skills](../Marrow%20Basics/Features/Skills.md)
