# Connect Claude Code

You need a [token](https://lalabase.com/docs/en/mcp/setup/tokens-for-agents) and the address of your server:

- hosted: `https://lalabase.com/api/mcp`
- self-hosted: `https://lalabase.example.com/api/mcp`, with your own domain

## Add the server

```sh
claude mcp add --transport http lalabase https://lalabase.com/api/mcp \
  --header "Authorization: Bearer your-token"
```

By default the entry applies to the current folder only. With `--scope user`, Lalabase is
available in all your projects:

```sh
claude mcp add --scope user --transport http lalabase https://lalabase.com/api/mcp \
  --header "Authorization: Bearer your-token"
```

<div class="docs-callout docs-callout--warning">
  <div class="docs-callout__title">Do not commit the token</div>
  <p>With <code>--scope project</code> the entry ends up in a file in the repository. Do not put a token there in plain text.</p>
</div>

## Check the connection

```sh
claude mcp list
```

`lalabase` should show as connected. Then ask in Claude Code:

> Which Lalabase projects can you reach?

The agent calls `list_projects` and names the projects your token sees. If the list stays empty
or an error comes back, see [troubleshooting](https://lalabase.com/docs/en/mcp/security/troubleshooting).

## Replace the token

A token expires after 90 days at the latest. Enter the new one like this:

```sh
claude mcp remove lalabase
claude mcp add --transport http lalabase https://lalabase.com/api/mcp \
  --header "Authorization: Bearer your-new-token"
```

`remove` finds the entry by itself, but `add` creates it for the current folder only again. If
you used `--scope user` before, pass it to the new `add` as well.

## What next

- [A ticket workflow](https://lalabase.com/docs/en/mcp/workflows/work-on-a-ticket) from start to finish
- [All tools](https://lalabase.com/docs/en/mcp/tools/overview)
