Connecting Claude Code

Connect Claude Code in your terminal to Pertento with a personal token, or with the same sign-in claude.ai uses.

2 min read


There are two ways. A personal token is the quickest. Signing in through your browser works too, and needs no token to copy.

With a personal token

  1. 1In Pertento, open Settings → Agent access and click New token.
  2. 2Give it a name that says where it will be used, for example "Claude Code, laptop".
  3. 3Choose what it may do, which websites it may reach, and how long it lasts. See Scopes and websites for an AI assistant.
  4. 4Enter your password, confirm with your passkey if you are asked to, and click Create token.
  5. 5The next screen shows your token, with a ready-made command under Add it to Claude Code. Click Copy the command.
  6. 6Paste the command into a terminal and run it.

The command looks like this, with your own token in place of ptk_…:

claude mcp add --transport http pertento https://app.pertento.ai/mcp --header "Authorization: Bearer ptk_…"

Then start Claude Code and ask it about your experiments, for example "How is experiment 1234 doing?".

The token is shown only once, and Pertento keeps no copy. Anyone who has it can act as you within its scopes, so keep it out of shared files and code repositories. If you lose it, revoke it and make a new one.

With sign-in instead

Add the server without a token:

claude mcp add --transport http pertento https://app.pertento.ai/mcp

Then:

  1. 1Start Claude Code, run /mcp, choose Pertento and pick authenticate.
  2. 2Your browser opens Pertento's consent screen, which names Claude Code as a verified app. Choose the scopes, websites and how long the connection lasts, enter your password, and click Allow.

This connection is listed under Connected apps in Agent access, not under your tokens.