# Local stdio and workspace files

## Install and check the CLI

Use Node.js 20 or later. [Download the CLI](/cli/i2v-cli.mjs) or install the [i2v-models Skill](/cli) and use its bundled script. Put an active API key in `I2V_API_KEY` in the environment that starts the MCP process.

```bash
node /absolute/path/i2v-cli.mjs doctor --json
```

## Configure your host

Add this entry to a client that supports `mcpServers` JSON. If your client uses a different format, set the command to `node` and pass the absolute script path and `mcp` as two arguments.

```json
{
  "mcpServers": {
    "i2v": {
      "command": "node",
      "args": ["/absolute/path/i2v-cli.mjs", "mcp"]
    }
  }
}
```

Provide `I2V_API_KEY` through your client's secret settings or the process environment. The client may need an absolute Node executable path when launched from the desktop. Restart or reload it after edits.

## Use local files

Set `I2V_WORKSPACE_DIR` to an existing project directory to enable `upload_file` and `download_task`. The CLI checks file paths against that directory. Upload only the intended reference, and use the verified URL in generation inputs. To save an existing result, pass its task ID and an output path within the workspace. [Generation and recovery](/docs/mcp/workflow) covers the task lifecycle.

## Verify and update

Call `get_account` or `list_models`. If the host cannot discover tools, confirm Node can start the same script with the same environment. The stdio wrapper uses the hosted i2v.ai endpoint for model tools and checks released versions when it initializes. Run `doctor` for details. Restart the host after replacing the script. To disconnect, remove its config entry and rotate or deactivate its API key if that key should lose access.