# Connect your assistant

Use your connected assistant (Claude or ChatGPT), or another MCP client, with Lokl at `https://api.loklhq.com/mcp`.

Assistants change their menus often. If a step doesn't match what you see, follow your assistant's own help for adding a custom MCP connector.

## What you will see

Sign in on Lokl's page with the code emailed to you, then your authenticator code. Connecting an assistant needs two-factor authentication. Lokl asks you to set it up if you have not already.

On the consent page, choose your organization if you belong to more than one. Choose “Everything I can do”, read only, or access by area. Your assistant never gets more access than you have.

## Claude

These steps work on claude.ai and Claude Desktop. Custom connectors are available on all plans. A Free account can add one.

1. Open **Customize > Connectors**, then **+ Add > Add custom connector**.
2. Name it **Lokl**, enter `https://api.loklhq.com/mcp` as the URL, then choose **Continue**.
3. Choose **Sign in now**, then **Add**.
4. Sign in on Lokl's page with your emailed code and authenticator code.
5. Choose your organization and what to allow on the consent page.

In a chat, open **+ > Connectors** and turn Lokl on.

For Team or Enterprise, an Owner first adds Lokl under **Organization settings > Connectors > Add > Custom > Web**. Members then choose **Connect** under **Customize > Connectors**.

To remove Lokl, open **Customize > Connectors** and choose **Remove**.

## Claude Code

Run:

```sh
claude mcp add --transport http lokl https://api.loklhq.com/mcp
```

Add `-s user` to use Lokl in every project. Inside Claude Code, run `/mcp` to sign in and approve access on Lokl's pages.

To remove Lokl:

```sh
claude mcp logout lokl
claude mcp remove lokl
```

## ChatGPT

Full use, including changes, needs ChatGPT Business, Enterprise or Edu on the web. Pro can use Lokl's read tools only. ChatGPT's mobile app can't use Lokl yet. On Business, only admins and owners can add Lokl.

1. Open [chatgpt.com/plugins](https://chatgpt.com/plugins), then **+ > Add custom MCP server**.
2. Name it **Lokl**, set **Connection** to `https://api.loklhq.com/mcp`, and choose **OAuth** authentication.
3. Confirm, then choose **Create as a plugin**. Sign in and approve access on Lokl's pages, which name the assistant **ChatGPT**.
4. In a chat, type **@** and pick **Lokl**.

To disconnect, open **Settings > Plugins > Lokl > Connected accounts > Disconnect**.

## Codex

The Codex CLI and IDE extension share `~/.codex/config.toml`.

Run:

```sh
codex mcp add lokl --url https://api.loklhq.com/mcp
codex mcp login lokl
```

Sign in and approve access on Lokl's pages.

To use an [API key](/docs/api-keys) instead:

```sh
export LOKL_API_KEY=lokl_…
codex mcp add lokl --url https://api.loklhq.com/mcp --bearer-token-env-var LOKL_API_KEY
```

Or add this to `~/.codex/config.toml`, with `LOKL_API_KEY` set in your environment:

```toml
[mcp_servers.lokl]
url = "https://api.loklhq.com/mcp"
bearer_token_env_var = "LOKL_API_KEY"
```

To remove Lokl:

```sh
codex mcp logout lokl
codex mcp remove lokl
```

## Other clients

Use `https://api.loklhq.com/mcp` with streamable HTTP. Send your [API key](/docs/api-keys) in either `Authorization: Bearer lokl_…` or `x-api-key: lokl_…`.

Use one key per agent and allow only what it needs.

## Disconnecting

Lokl has no screen yet to see or end a connection. Remove Lokl in your assistant using the steps above. Connecting the same assistant again replaces your earlier choice.

A client using an API key can be disconnected by [revoking that key](/docs/api-keys).
