# Set up HaakCo Hosting MCP for your user

Connect the AI client you are running in to the user's Hosting deployment.
Use production unless the user specifies another Hosting installation.

## Codex and Claude Code

1. On the machine where the client runs, set the client argument below to `codex` (Codex app or CLI)
   or `claude` (Claude Code). The same command accepts `pi` for Pi.

2. Run the preview with the client substituted. For public production,
   use the explicit API URL below so that a saved CLI profile cannot select another installation.
   Add `--access read-only` if the user requests read-only access. The default requests read/write
   and full API access under the user's existing Hosting permissions.

   ```sh
   npx --yes --prefer-online @haakco/hostingctl@latest mcp setup \
     --api-url https://hosting.haak.co/api/v1 --client CLIENT --dry-run
   ```

3. Check the preview for the intended server, config location and scopes. Once the user
   has authorized that setup, run the same command with `--confirm` in place of `--dry-run`.
   Use `--location project` when the user requests project configuration. If the server name is
   already used for a different connection, choose a distinct name with `--name`, or use
   `--replace` only when the user asks to replace that entry. Preview again after changing flags.

4. Follow the printed client login steps. Ask the user to complete browser sign-in and OAuth
   consent, and to reload or restart the client if required. Have them check the account and
   scopes on the consent screen. Keep passwords, OAuth codes and tokens out of chat and config.

5. In the client, call Hosting `whoami` and confirm the expected company membership and granted access.
   Then call the Hosting `docs` tool to search for “application deployment.” Report the result.
   If the tools require a fresh session, tell the user how to resume the verification there.
   Verify with reads only.

## Other clients, including Claude web and Desktop

Use the client's remote MCP or custom connector settings. Add a server named Hosting with Streamable
HTTP and OAuth, using this URL for public production.

```text
https://hosting.haak.co/mcp
```

If only the user can operate those settings, give them the completed URL and guide them through
browser sign-in. Then verify the company and documentation search as in step 5. If the client
cannot add a remote OAuth server, say what is missing and link to the supported clients.

For supported clients and advanced configuration, see the
[Hosting MCP guide](https://hosting.haak.co/docs/mcp).
