# VS Code and GitHub Copilot

## VS Code

Open the **VS Code / GitHub Copilot** tab on [MCP setup](/mcp) and choose **Install in VS Code**. Check the `i2v` name and `https://i2v.ai/api/mcp` on the server details page. Choose **Install** for your user profile or **Install in Workspace** to save the server in `.vscode/mcp.json`. [VS Code installation links](https://code.visualstudio.com/api/extension-guides/ai/mcp#create-an-mcp-installation-or-lookup-url)

1. To add the server manually, run **MCP: Add Server** from the Command Palette. Choose **HTTP**, enter `https://i2v.ai/api/mcp`, and name it `i2v`. Select the user or workspace destination. Use **Global → Copilot Global** when your Copilot harness offers it and you want to share the personal configuration with Copilot CLI. Keep credentials out of checked-in configuration.
2. In the Command Palette, run **MCP: List Servers**, select **i2v**, and choose **Start Server** if it is stopped. For a workspace install in Restricted Mode, review the folder before granting trust.
3. When VS Code asks to authenticate to i2v.ai MCP, choose **Allow** and open the authorization page. On the i2v.ai consent screen, leave write access unchecked for model and account queries. Select write access to upload assets or submit paid generation jobs.

VS Code can display the scopes it requested for the saved session. Confirm the scopes i2v.ai granted in [Connections](/settings/connections) or the `get_account` result. A read-only authorization returns `mcp:read` only. [VS Code MCP guide](https://code.visualstudio.com/docs/agent-customization/mcp-servers)

## GitHub Copilot CLI

Add i2v.ai directly by URL.

```bash
copilot mcp add --transport http i2v https://i2v.ai/api/mcp
```

Run `copilot mcp get i2v` to check the configured URL. In an interactive session, open `/mcp` to check the connection. If the server needs authorization, run `/mcp auth i2v` and complete sign-in in your browser. Leave write access unchecked for model discovery and account queries. Select it on the i2v.ai consent screen when you also want to upload assets or submit generation jobs. [Copilot CLI MCP commands](https://docs.github.com/en/copilot/reference/copilot-cli-reference/cli-command-reference#oauth-re-authentication)

Copilot Global can share server configuration with the CLI on the same host. If your CLI does not offer MCP authorization, use the VS Code flow above. [Copilot CLI configuration guide](https://docs.github.com/en/copilot/how-tos/copilot-cli/customize-copilot/add-mcp-servers)

Your organization may require an administrator to approve MCP servers or restrict them to an allowlist. See [GitHub's organization policy guide](https://docs.github.com/en/copilot/how-tos/administer-copilot/manage-mcp-usage/configure-mcp-registry).

## Verify read access

> Use i2v.ai's `list_models` with `mediaType: image`. Continue until you reach `total`, then use `get_account` to show the granted scopes. Do not create any generation tasks.

Expand the tool output and check that Copilot called i2v.ai and returned model IDs and scopes.

For a first paid request, follow [Generation and recovery](/docs/mcp/workflow).

## Disconnect

Revoke access in i2v.ai [Connections](/settings/connections), then run `copilot mcp remove i2v` to remove the CLI user entry. For a VS Code entry, use its **MCP Servers** panel. See [Account, access, and updates](/docs/mcp/account-and-access) for permission troubleshooting.