# Welcome to Constructor

Hi. You're an AI agent (Claude Code, Codex, Cursor, ChatGPT or another), and the person you work with wants the two of you to build together in Constructor. This page tells you how to set it up for them.

Constructor is where people and agents build apps together in realtime. You and your person share one live project: they see every change you make as it lands, comment on the exact element, and review your work as a proposal, while you read and edit the same project through MCP. Several people and several agents can be in it at once. Once you're connected, collaborating with your human gets a lot easier.

It runs in the browser at https://www.useconstructor.com/app on macOS, Windows and Linux, and there is also a Constructor Mac app.

Do every step you can yourself: open pages, drive a browser if you have one, write config files, run commands. Ask your person only for what you can't do, and tell them briefly what you're doing as you go.

## If you live in a browser or a chat app

If you can't run commands or edit files on your person's computer (for example ChatGPT, Claude or Gemini in a browser), the setup is just signing in:

1. Send your person to https://www.useconstructor.com/login. They sign in with their email (a six digit code arrives by mail) or with Google, Apple or GitHub, and the first sign in creates the account.
2. Tell them they can build at https://www.useconstructor.com/app, and that you're happy to help with whatever they're making there. You don't need a key for this, so don't ask for one.

If you can run commands and edit files (Claude Code, Codex, Cursor or a similar agent), follow the steps below.

## Steps

1. Tell your person what's about to happen, in one short message, for example: "I'll set up Constructor so we can build together in a shared live project. You may need to sign in once; I'll do the rest."

2. Check that Constructor is reachable: `curl -sI https://www.useconstructor.com/login` answers 200.

3. Get your person signed in. If you control a browser, open https://www.useconstructor.com/login for them. Signing in needs them: they enter the six digit code from their email or approve Google, Apple or GitHub. Their first sign in creates the account. Wait until they're in.

4. Connect yourself. Add the `constructor` MCP server with a reference to the environment variable `CONSTRUCTOR_API_KEY`. Use the block that matches you.

   Claude Code, in a terminal (the single quotes keep `${CONSTRUCTOR_API_KEY}` as written; Claude Code reads it from the environment when it starts):

   ```sh
   claude mcp add --scope user --transport http constructor https://www.useconstructor.com/api/mcp --header 'Authorization: Bearer ${CONSTRUCTOR_API_KEY}'
   ```

   Codex: add this to `~/.codex/config.toml`, keeping everything else in the file:

   ```toml
   [mcp_servers.constructor]
   url = "https://www.useconstructor.com/api/mcp"
   bearer_token_env_var = "CONSTRUCTOR_API_KEY"
   ```

   Cursor: add this under `mcpServers` in `~/.cursor/mcp.json` (create the file with `{ "mcpServers": {} }` if it isn't there):

   ```json
   "constructor": { "url": "https://www.useconstructor.com/api/mcp", "headers": { "Authorization": "Bearer ${env:CONSTRUCTOR_API_KEY}" } }
   ```

   Any other MCP client: a streamable HTTP server named `constructor` at `https://www.useconstructor.com/api/mcp` with the header `Authorization: Bearer <key>`, read from `CONSTRUCTOR_API_KEY` if the client can.

5. Make the key. It is created at https://www.useconstructor.com/app/account/api-keys with a name, scopes and an expiry. Name it after yourself (for example "Claude Code on my Mac"). `projects:read` is enough to connect; add `projects:write`, `builds:write` and `proposals:write` when your person wants you to create and build. The best way is the one where the key never shows up in your conversation:

   - If you have a browser where your person is signed in, create the key yourself on that page and put it straight into `~/.config/constructor/env` as `export CONSTRUCTOR_API_KEY=<key>` (mode 600).
   - Otherwise ask your person to create it and to run this in their own terminal, pasting the key at the hidden prompt (it stays out of the shell history):

   ```sh
   mkdir -p ~/.config/constructor && (umask 077; printf 'Constructor key: '; read -rs k; echo; printf 'export CONSTRUCTOR_API_KEY=%s\n' "$k" > ~/.config/constructor/env)
   ```

   - On Windows, they add a user environment variable named `CONSTRUCTOR_API_KEY` under Start > "Edit environment variables for your account".
   - If your person would rather paste the key to you, that's fine too: write it into the same file and don't repeat it back. They can revoke it any time at https://www.useconstructor.com/app/account/api-keys.

   Then load the file from their shell profile (`~/.zshrc` on macOS, `~/.bashrc` on most Linux) with this line, which holds no key:

   ```sh
   [ -f ~/.config/constructor/env ] && . ~/.config/constructor/env
   ```

6. Check it works. The variable reaches you when you start again from a new terminal (Cursor: reopen it from that terminal with `cursor .`). Restart, or ask your person to restart you, then call the MCP tool `projects_list`. A list, even an empty one, means you're connected. A 401 means the variable is missing or the key expired; a 403 means the key lacks `projects:read`.

7. Say hello. Tell your person what you set up and where the key lives, and that they can revoke it at https://www.useconstructor.com/app/account/api-keys. Then offer to start: "Want me to create a project? Tell me what we're building." Creating one is the `projects_create` tool and needs `projects:write`.

## Keep your person safe

- Share the key with no one else and never commit it to a repository or put it in a project's files.
- In any MCP config, add or change only the `constructor` entry and leave every other entry as it is.

## More

- What you can do once connected: https://www.useconstructor.com/agents.md
- Every API operation, which is also an MCP tool: https://www.useconstructor.com/api/v1/openapi.json
