# Gemini CLI

## Connect from your project

Open a project you trust and run the following commands. Gemini CLI saves the server in `.gemini/settings.json` for this project.

```bash
gemini mcp add i2v https://i2v.ai/api/mcp --scope project --transport http
gemini
```

Inside Gemini CLI, run `/mcp auth i2v` and follow the browser prompts. Check the status with `/mcp` inside Gemini CLI or `gemini mcp list` from the same project in your terminal. [Gemini CLI MCP configuration](https://geminicli.com/docs/tools/mcp-server/)

## Use an API key

Create an [i2v.ai API key](/me?section=api-keys) and set `I2V_API_KEY` in the environment that starts Gemini CLI. Merge this entry into your project settings. Gemini CLI resolves the value from the environment when it connects.

```json
{
  "mcpServers": {
    "i2v": {
      "type": "http",
      "url": "https://i2v.ai/api/mcp",
      "headers": { "Authorization": "Bearer ${I2V_API_KEY}" },
      "includeTools": ["list_models", "get_account", "get_usage"]
    }
  }
}
```

`includeTools` limits the tools Gemini CLI can see in this project. The API key retains its permissions on i2v.ai. For generation, use an authorized connection with write access or update the project's tool selection for your API key. [Account access and permissions](/docs/mcp/account-and-access)

## Install the Skills

From your project, clone the official repository into a sibling folder or use the path of a checkout you already have.

```bash
git clone https://github.com/i2v-ai/i2v-skills.git ../i2v-skills
gemini skills install ../i2v-skills/i2v-models --scope workspace
gemini skills install ../i2v-skills/i2v-integrate --scope workspace
gemini skills list
```

Review the installation prompt and restart Gemini CLI. Workspace Skills are discovered from a trusted folder. Use `i2v-models` for choosing, quoting, and generating media, and `i2v-integrate` for connecting a backend or workflow. [Gemini CLI Agent Skills](https://geminicli.com/docs/cli/skills/) · [Workspace trust](https://geminicli.com/docs/cli/trusted-folders/)

## Verify and disconnect

Ask Gemini CLI to list image models with `list_models` and continue until it reaches `total`. Ask for your USD balance with `get_account` and recent usage with `get_usage` for `30d`. These checks use read operations.

If the connection is listed but Plan Mode hides the MCP tools, switch to a regular Gemini CLI session and approve the specific read operations you want to run.

To disconnect, revoke OAuth in [Connections](/settings/connections) or revoke the key in [API keys](/me?section=api-keys). Remove the project entry with `gemini mcp remove i2v --scope project`.