---
title: "MGS9016: operator token predates the class prefix"
description: The operator token file does not hold an mgo_ token, usually because an older magus wrote it. Re-issue it with magus config token generate --force.
tags: [MGS9016, auth, operator, token, upgrade, "mgo_"]
---

# MGS9016: operator token predates the class prefix

The operator token file (`$XDG_STATE_HOME/magus/mcp_token`) does not hold a
well-formed `mgo_` token. An older magus wrote a bare random string there, or
the file was edited by hand. The server will not start on it, and every command
that reads it stops with this error.

```text
[MGS9016] auth: the operator token at /path/mcp_token is not an mgo_ token (it
predates the class prefix); re-issue it with `magus config token generate --force`
  see: .../MGS9016.md
```

## Why

A token's class is its prefix, and the server routes a presented token to the
one store that can hold its class. A file without the prefix could be matched
against the wrong store, so it is refused rather than guessed at. There is no
migration.

## Resolution

Re-issue it, then restart anything that held the old one:

```sh
magus config token generate --force
```

Clients should not hold the operator token at all: give an MCP client a
connector token (`magus config mcp connector create`) and a browser a console
token.

## See also

- [Tokens and grants](../../../concepts/tokens.md)
