# Connect Vizard Agent: setup guide for AI agents

This is the plain-text page at https://mcp.agent.vizard.ai/install, written for an AI agent that sets up Vizard
for its user. People in a browser see https://mcp.agent.vizard.ai/docs#install instead.

The user asked you to connect Vizard Agent, the MCP server at

    https://mcp.agent.vizard.ai/mcp

Vizard Agent is Video AGI: once it is connected, the user describes a video in their
chat, and Vizard does the whole job in the user's own Vizard account and hands back the
finished video. This guide covers Claude Code, Codex and OpenCode.

Read the whole guide before you run anything. If your fetch tool summarized or shortened
this page, read it word for word with `curl -fsSL https://mcp.agent.vizard.ai/install`.

## Ground rules

- Run the commands yourself. The user's only part is signing in to Vizard on the page
  that opens in their browser.
- Never ask for the user's Vizard password. They type it only on the Vizard sign-in page.
- Keep the user posted in their own language: one short line on what you are doing, and
  say clearly when they need to act.
- A sign-in command waits for the browser for about five minutes. Start it so it can
  keep running: in the background with its output in a log file that you read, or with
  a timeout of at least six minutes. Run one sign-in at a time, and start another only
  after the previous one has exited.
- Agents load MCP tools when a session starts, so Vizard's tools appear in the user's
  next session, not in this one. Don't try them here.
- If Vizard tools such as `create_video_project` are already available to you in this
  conversation, Vizard is already connected: tell the user and stop.

## Where are you running?

- Claude Code on the user's computer (terminal, IDE extension or desktop app): follow
  "Claude Code".
- Codex on the user's computer (CLI, IDE extension or the Codex app): follow "Codex".
- OpenCode: follow "OpenCode".
- Somewhere without a shell on the user's computer (claude.ai or ChatGPT chat, Claude
  Code on the web, Codex cloud tasks, any remote workspace): run nothing, because
  changes made there never reach the user's computer. Tell the user one of these:
  - In Claude: open claude.ai, go to Customize > Connectors, choose Add custom
    connector, enter https://mcp.agent.vizard.ai/mcp, click Connect and sign in to Vizard. Vizard then
    works in Claude on the web, desktop and mobile, and in Claude Code signed in with
    the same Claude account.
  - Or open Claude Code, Codex or OpenCode on their computer and paste:
    Read https://mcp.agent.vizard.ai/install and connect Vizard for me.

## Claude Code

1. Check the command: `claude --version`, then `claude mcp login --help`.
   - `claude` not found (common in the Claude desktop app): the claude.ai connector
     described above reaches Claude Code too, so ask the user to add it there. If they
     can't add one (the free Claude plan allows one custom connector; on Team and
     Enterprise plans an admin adds them), install the command with Anthropic's
     installer and continue: `curl -fsSL https://claude.ai/install.sh | bash` on macOS
     and Linux, `irm https://claude.ai/install.ps1 | iex` in Windows PowerShell.
   - `claude mcp login` doesn't exist: the command is too old. Run `claude update` and
     check again.
2. Check for an existing connection: `claude mcp list`.
   - A line with https://mcp.agent.vizard.ai/mcp that says `Connected`: Vizard is already connected. A line
     starting with `claude.ai Vizard` is the user's claude.ai connector, which works
     here too. Go to "Finish".
   - A line named `vizard` that says `Needs authentication`: go to step 4.
3. Add Vizard for all of the user's projects:

       claude mcp add --transport http --scope user vizard https://mcp.agent.vizard.ai/mcp

4. Sign in. `claude mcp login` won't run without a terminal ("stdin isn't a terminal"),
   so give it a pseudo-terminal, in the background, with plain output going to a log.
   On macOS and Linux:

       TERM=dumb NO_COLOR=1 FORCE_HYPERLINK=0 python3 -c 'import pty,sys; pty.spawn(sys.argv[1:])' claude mcp login vizard > /tmp/vizard-login.log 2>&1 &

   Without python3, use `script` in its place, keeping the rest of the line:
   `script -q /dev/null claude mcp login vizard` on macOS,
   `script -qc "claude mcp login vizard" /dev/null` on Linux. On Windows, open a console
   window for it, for example from PowerShell with
   `Start-Process cmd -ArgumentList '/k','claude mcp login vizard'`, and let the user
   finish there.

   Read the log. The command opens the Vizard sign-in page in the user's browser and
   prints its address after `If the browser didn't open, visit:`. Tell the user to sign
   in to Vizard there and click Connect; if no page opened, give them the address.
   Ignore `Or paste the redirect URL here`: the browser hands the sign-in back by
   itself. It worked when the log says `Authenticated with "vizard"`.
5. Check: `claude mcp get vizard` says `Connected`. Go to "Finish".

## Codex

If Codex runs your commands in a sandbox, run the commands below outside it (request
escalated permissions, saying it is to connect Vizard): inside the sandbox they can't
write `~/.codex/config.toml`, reach the network or receive the browser's sign-in.

1. Find the CLI: `codex --version`. In the Codex app, `codex` may be missing from PATH;
   then use the `codex` executable that ships inside the Codex app, by its full path.
   The CLI, the IDE extension and the app share `~/.codex/config.toml`, so any of them
   sets up all three. If there's no CLI at all, follow "Codex without a CLI" below.
2. Check for an existing connection: `codex mcp list`.
   - A `vizard` row with https://mcp.agent.vizard.ai/mcp whose Auth column doesn't say `Not logged in`:
     already connected. Go to "Finish".
   - A `vizard` row whose Auth column says `Not logged in`: go to step 4.
3. Add Vizard. This also starts the sign-in:

       codex mcp add vizard --url https://mcp.agent.vizard.ai/mcp

4. If the sign-in didn't start or didn't finish, run `codex mcp login vizard`.
   The command opens the Vizard sign-in page in the user's browser and prints its
   address after "Authorize `vizard` by opening this URL in your browser:". Tell the
   user to sign in to Vizard there and click Connect; if no page opened, give them the
   address. It worked when it prints `Successfully logged in to MCP server 'vizard'.`
5. Check: in `codex mcp list`, the `vizard` row's Auth column no longer says
   `Not logged in`. Go to "Finish".

Codex without a CLI: add these lines to `~/.codex/config.toml` (create the file if
needed, and keep everything already in it):

    [mcp_servers.vizard]
    url = "https://mcp.agent.vizard.ai/mcp"

Then ask the user to open the Codex app's Settings > MCP servers, select Restart, then
Authenticate next to vizard, and sign in to Vizard in the browser.

## OpenCode

1. Check: `opencode --version`, then `opencode mcp list`.
   - `vizard` is listed and doesn't say `needs authentication`: already connected. Go
     to "Finish".
   - `vizard` says `needs authentication`: go to step 3.
2. Add Vizard to OpenCode's global config. `opencode debug paths` shows the config
   folder on its `config` line (usually `~/.config/opencode`). Edit `opencode.json`
   there, or `opencode.jsonc` if that is the one that exists; create `opencode.json` if
   neither does. Merge this in and keep everything already there:

       {
         "$schema": "https://opencode.ai/config.json",
         "mcp": {
           "vizard": {
             "type": "remote",
             "url": "https://mcp.agent.vizard.ai/mcp"
           }
         }
       }

   `opencode mcp list` should now show vizard with `needs authentication`.
3. Sign in: `opencode mcp auth vizard`. It runs without a terminal, opens the Vizard
   sign-in page in the user's browser, prints its address under
   `Authorize in your browser`, and waits on local port 19876. Tell the user to sign in
   to Vizard there and click Connect; if no page opened, give them the address.
4. Check: `opencode mcp list` no longer says `needs authentication` for vizard. Go to
   "Finish".

## Finish

Tell the user, in their language:

- Vizard is connected.
- To load it, start a new session: in Claude Code a new session (in a terminal, exit
  and run `claude` again); in Codex a new thread, and if Vizard's tools aren't there,
  quit and reopen Codex; in OpenCode, quit and reopen it.
- In the new session, ask for a video and mention Vizard, for example: "Use Vizard to
  make a 30-second vertical promo from <link>".
- Projects use the credits in their Vizard account, and every project is also in their
  account at https://agent.vizard.ai.

## If something goes wrong

Setup is one job: when a step fails, fix the cause and continue from that step. Don't
stop with Vizard added but not signed in.

- No page opened: give the user the address the sign-in command printed.
- The user has no Vizard account: they can create one at https://agent.vizard.ai, then you start a
  fresh sign-in.
- The sign-in timed out or the page was closed: once the old command has exited, start
  one fresh sign-in.
- After signing in, the browser shows an error for a `localhost` or `127.0.0.1` address:
  the agent and the browser are on different machines. While the sign-in command is
  still waiting, ask the user to copy that address from the browser's address bar and
  send it to you, then open it on your machine with `curl '<address>'`.
- The Vizard page shows an error, or a command reports HTTP 5xx: wait a minute and
  retry. `curl -fsS https://mcp.agent.vizard.ai/healthz` shows whether the service is up.
- Timeouts, TLS or DNS errors: if the user runs a proxy, set `HTTPS_PROXY` to its actual
  address and retry.
- Still stuck: tell the user exactly which step failed and with what message.
  support@vizard.ai can help.
