# Create a token
A token is a long password that lets your AI assistant talk to your engine.
If you have just installed the engine and use Claude Code, you already have one. The installer printed a command that includes it. Paste that command on your computer and skip this page: Connecting Claude Code.
Use this page when you need a token for a different assistant, a second computer or a replacement after you revoked one.
Do this on your VPS, logged in as root.
# 1. Ask the engine for your assistant's command
pae connect
It shows a list of assistants. Use the arrow keys and press Enter. To skip the list, name the assistant, for example Claude Code:
pae connect claude
The other names are claude-desktop, codex, chatgpt-desktop, gemini, grok, opencode, vscode, cursor, windsurf, pi, hermes and openclaw.
You should see a new token, shown once, and the exact command or prompt to use on your own computer. Copy both now. The engine cannot show the token a second time. If you lose it, create another.
# 2. Check that it works
pae mcp:check
It checks three things: HTTPS on your engine works, your token is accepted, and an assistant can complete the connection.
It asks for the token that step 1 printed. Paste it. Nothing shows as you type, so the token stays off your screen and out of your shell history. From a script, pipe it in instead: printf %s "$TOKEN" | pae mcp:check --stdin.
# Managing tokens later
pae mcp:token:list
Lists your tokens by name and ID. The token values themselves are not shown.
pae mcp:token:revoke <id>
Stops a token working at once. Run it the moment a token might have leaked. pae mcp:token:delete <id> removes it from the list altogether.
Software that holds a token can also replace or end it itself, over the engine's API. These are not assistant tools:
POST /api/tokens/current/rotatereturns a new token with the same name, permissions and lifetime. The old one keeps working for 10 minutes, so requests already on their way still succeed. A retry in that time returns the same new token.DELETE /api/tokens/currentrevokes the token that makes the call.
# A token limited to some projects
A token made with pae connect or pae mcp:token:create reaches every project on the engine. Software such as a control panel can instead ask the engine for a token limited to chosen projects. pae has no option for this, and pae mcp:token:list does not show it.
An assistant on a limited token sees and changes only those projects.
- A request that names another project is refused.
- Project lists show only its own projects.
- The tools about the whole server are not available to it. There are two exceptions: it can read general engine information (without the server's own name, system, kernel and uptime, and naming no other project), and it can inspect a repository.
- It cannot change a project's limits or suspend and unsuspend it, because those belong to you.
- It can clone a project or make a staging copy only under a new name that is already on its list. It must give that name (
new_username). The engine does not pick one for it. Without the name, or with a name outside the list, the request is refused with 403.
The assistant activity log records which project each request named and which token made it. Software can filter it by project, by a list of token ids and by part of a token name. A request keeps its token id after that token is deleted, so the calls of tokens a user has since removed still show up under their ids.
# Next
Set up your assistant: pick yours.
If you would rather work from your VPS with no assistant at all, you do not need a token: CLI commands.
# Troubleshooting
A certificate error from pae mcp:check.
Your engine is using a self-signed certificate. A pass on your VPS does not mean your own computer will connect. The fix belongs on the machine running the assistant: Trust a self-signed certificate.
A 401 error from pae mcp:check.
The token was not accepted. Check you copied the whole string with no line break in the middle. Assistants need an MCP token from pae connect or pae mcp:token:create, not an API token from pae api:token:create.
I want the setup line for every assistant at once.
pae mcp:token:create laptop
laptop is a label so you can tell your tokens apart. This prints the token, then a registration command for each assistant. --client=claude prints only one. A name the engine does not know is refused before any token is made, and the message lists the names it does know. --short prints only the token.
I need a token for a script or a control panel, not an assistant.
That is a different kind of token. Create it with pae api:token:create: CLI commands.