# Connect Claude Code

> Steps to add hiClient as an MCP server in Claude Code and authorize it from the browser.

Add hiClient as an MCP server in Claude Code, the terminal tool.

## Before you start {#before}

- A hiClient account with a verified e-mail.
- Claude Code installed.

## Steps {#steps}

1. In a terminal, add the server:

   ```bash
   claude mcp add --transport http hiclient https://mcp.hi-client.com/mcp
   ```

2. Open Claude Code and run:

   ```
   /mcp
   ```

3. Choose `hiclient` and authenticate. Claude Code opens hiClient in the browser.
4. Sign in to hiClient. If your account uses two-step verification, enter the code when asked.
5. Review the **Authorize an agent** screen and choose **Authorize**.
6. The browser hands the authorization back to Claude Code, on your own computer. You can now use the hiClient tools.

## The authorization screen {#consent}

Because Claude Code runs on your computer, the screen warns: *The answer is delivered to an application on your own computer.* That is expected when you started the connection.

Untick the permissions you do not want to grant. The checkboxes can only remove permissions. What each one allows: [Permissions](https://docs.hi-client.com/agents/permissions.md?lang=en).

> [!WARNING]
> Only authorize connections you started. If this screen appears without you having run `/mcp`, choose **Deny**.

## Test the connection {#test}

```
Use hiclient to tell me which account you are connected to and which permissions you have.
```

Claude Code calls `account_whoami`.

## Revoke access {#revoke}

1. Open [Connected agents](https://hi-client.com/account/portal/agents) in the portal.
2. Choose **Revoke** on Claude Code's row, or **Revoke all**.

The agent stops working on its next call. Removing the server from Claude Code (`claude mcp remove hiclient`) does not revoke the access in hiClient: do it in the portal too.
