# Connect Claude Code to Sequential (MCP)

> Connect Claude Code to Sequential over MCP with a project access token: create the token, run one claude mcp add command, then start a new session.

> **In short**
>
> - Claude Code connects with a project access token. It does not use a sign-in to Sequential.
> - Only owners and admins can create the token.
> - After you add Sequential, start a new Claude Code session. The tools load only there.

## Before you start

- You must be an owner or admin of the project's organisation.
- You need Claude Code on your computer.
- claude.ai is different: it connects with a sign-in. See [Connect claude.ai to Sequential](/docs/connect-claude-ai).

## Connect Claude Code

1. Get a token. Use one of these places:
   - In onboarding, on the **Connect your agent** step, select **Claude Code** and press **Create token**. The token has the scopes of **Agent: read everything, plus Ask**. It expires in 90 days.
   - On **Agents**, or on the **Access tokens** tab of your project's settings.
2. Copy the command that Sequential shows. It has the token in it, and it has this form:

```sh
claude mcp add --transport http --scope user sequential https://api.usesequential.com/mcp --header "Authorization: Bearer <your token>"
```

3. Run the command once in a terminal. With `--scope user`, Sequential is added for every project on your computer.
4. Start a new Claude Code session. A server that you add with `--scope user` does not load into the session that added it.
5. Ask Claude Code to use Sequential, for example "Using Sequential, list my sessions from today". On **Agents**, the **Coding agents** card then shows that the token was used.

For a connection that can only read, use the path `/mcp/readonly` in place of `/mcp`. On `/mcp/readonly`, Sequential never lists a tool that writes.

> **The token is shown once**
>
> Sequential shows the token only once. Treat it like a password. Never put it into a shared chat, a ticket or a committed file. If you lose it, revoke it on **Agents** and create a new one.

## Sign-in from Claude Code does not work yet

Claude Code can also try to connect with a sign-in, through **Authenticate** in its `/mcp` menu. That sign-in sends you back to Claude Code through an address on your own computer, such as `http://localhost:<port>/callback`. Today Sequential does not accept such an address, so the sign-in does not complete. Use a token, as in the steps above.

## If it does not work

| You see | Cause | What to do |
|---|---|---|
| 401, "The access token is unknown, revoked or expired", or the Sequential tools do not load | The token is wrong, revoked or expired. | Create a new token and run the command again with it. |
| The tools are not in the session where you ran the command | This is expected. | Start a new Claude Code session. |
| "Tool not available for this token" | The token's scopes do not include that tool. On `/mcp/readonly`, no tool that writes is available. | Use a token with that scope, on `/mcp`. |

See [Your first hour](/docs/quickstart#connect-your-agent) and [Agent tools (MCP)](/docs/agent-tools).
