whoami() fails or Maestro is not connected
Do not re-run verify() to fix this
verify() rotates your API key. The old token stops working the instant the
new one is issued — including the copy already sitting in your client config.
So if your key was merely mistyped or stale, re-registering converts a
five-second fix into a broken setup, and the error you get afterwards looks
exactly the same. This is the single most common way a working install gets
worse.
Answer this first: which problem do you have?
A missing key and a rejected key report the identical error. You cannot tell
them apart from the message, so establish it directly:
- Did you install a key at all — from the portal's Connect Claude dialog, an
Authorizationheader, orMAESTRO_API_KEYin.mcp.json? - If yes, the key is present and being rejected. Do not rotate. Go to the
portal's Connect Claude dialog and re-show it, or rotate it there
deliberately and update your config in the same sitting. - If no, you have no key. Register and verify normally — nothing to invalidate.
If a key is installed and still rejected
Work down this list:
- Restart the client. Claude Code reads MCP configuration only at session
start, so a key added mid-session is not loaded. This is by far the most
common cause. - Check the header shape for a hosted server. It is
Authorization: Bearer <key>— the wordBearer, one space, then the token
with no quotes and no trailing whitespace. - Check for a second install. A server registered twice, at different
scopes or with different keys, resolves to whichever the client found first. - Confirm the URL. A hosted key authenticates against the hosted server. A
key pasted into a local stdio config authenticates nothing if the URL is
wrong.
Where the key lives, per client
| Client | Where |
|---|---|
| Claude Code, hosted | Authorization: Bearer <key> header on the connector |
| Claude Desktop, claude.ai | in the connector URL — …/mcp/k/<token> |
| Local stdio server | MAESTRO_API_KEY in the .mcp.json env block |
A key issued by verify() inside a running stdio session is active immediately,
with no restart.
It connects here but not in another folder
That is a different problem with a different fix — see
Maestro vanished in another repository.