# Set up MockFlow Bridge

> Install MockFlow Bridge, start it in a terminal and pair your board, so Mida generates with Claude Code, Codex or another AI agent on your computer.

Source: https://mockflow.com/docs/set-up-mockflow-bridge

Setting up MockFlow Bridge takes a few minutes the first time: you install it, start it in a terminal window and pair your board with the code it shows. After that, starting Bridge is one command. For what Bridge does, see [What is MockFlow Bridge](/docs/what-is-mockflow-bridge).

## Before you start

You need two things on your computer:

- **Node.js 18 or newer.** Bridge runs on Node.js. Install it from [nodejs.org](https://nodejs.org), then check the version in a terminal (Terminal on macOS, Command Prompt on Windows):

```bash
node --version
```

- **An AI agent, signed in.** Install the one you use and sign in once:

| Agent | Install | Sign in |
| --- | --- | --- |
| Claude Code | `npm i -g @anthropic-ai/claude-code` | `claude` |
| Codex | `npm i -g @openai/codex` | `codex login` |
| opencode | See [opencode.ai](https://opencode.ai) | `opencode` |

If you do not use any of these, BridgeAI, the agent built into Bridge, works with an API key from OpenRouter, Azure OpenAI or Amazon Bedrock instead.

> **Plan** Bridge is available on every plan. On Basic, it runs with Claude Code on one board at a time. Plus and Max include Bridge Pro, with every agent and several boards at once. See [MockFlow pricing](https://mockflow.com/pricing/).

## Install and start MockFlow Bridge

Install Bridge once, in a terminal window:

```bash
npm i -g @mockflow/mockflow-bridge
```

Then start it:

```bash
mockflow-bridge
```

Leave the terminal window open. Bridge keeps running, shows the agent it found and prints a six digit pairing code. If you close the window, the connection stops.

![The MockFlow Bridge terminal window, waiting for a board. It shows Agent: Claude Code, Board: none yet, and the line Open MockFlow and enter code 688732 to connect a board](https://assets.mockflow.com/docs/media/73251ad7910b4b51801f913fb820aa9a.webp)

If more than one agent is installed, Bridge asks which one to use the first time and remembers your choice.

## Pair your board with Bridge

![The MockFlow board with Mida open. The AI button in the tool bar and the Connect action on the Connect your local agent strip at the top of Mida are numbered](https://assets.mockflow.com/docs/media/5807d9a2da8440a08a2fdb972f444f84.webp)

1. Open your board in MockFlow and click **AI** (1) in the tool bar at the bottom to open Mida.
2. On the **Connect your local agent** strip at the top of Mida, click **Connect** (2). The **Connect a local agent** dialog opens.
3. Under **Enter the pairing code**, type the code shown in your terminal and click **Pair**.

![The Connect a local agent dialog. Step 3, Enter the pairing code, has the code 688732 typed in next to the Pair button, and the status line reads Bridge found. Enter the pairing code above](https://assets.mockflow.com/docs/media/8d13c015a8624ba6ade140a057fe24ba.webp)

When pairing works, the strip turns green and reads **Connected to** followed by your agent's name (1). Mida confirms that it now answers and draws through your own agent.

![The Mida panel connected to Claude Code. The green strip at the top reads Connected to Claude Code, with Disable on the right, and a card confirms that Mida answers and draws through your own agent](https://assets.mockflow.com/docs/media/4ffe16816fa04649b8d12101a8bff560.webp)

Ask Mida for anything as usual, for example a flowchart of a process, a mind map of a topic or a kanban board for a sprint. The reply and the drawing now come from your agent, and no AI credits are used.

## Start Bridge again next time

You pair once per computer. Next time, run `mockflow-bridge` and open your board; if the strip does not show **Connected**, click **Connect** on it. A new pairing code is shown each time Bridge starts, and you only need it if the board asks for one again.

To stop using your agent, click **Disable** on the strip, or close the terminal window. The board goes back to MockFlow AI.

## Keep MockFlow Bridge up to date

Run this command to install the newest version. It checks first and installs only if there is a newer one:

```bash
mockflow-bridge update
```

While Bridge is running, it also tells you when a new version is available, and you can press **u** in its window to update.
