Troubleshooting · MCP Server for Odoo

"Authorization failed" connecting to the Odoo MCP Server

The Bearer token your AI client is sending is missing, incorrect, or no longer valid. Check the key is still Active under MCP → API Keys, confirm it has not been rotated to a new version, and verify the whole token was copied.

What you are seeing

  • The MCP client reports "Authorization failed" when it connects
  • The connection is refused immediately, before any tool appears
  • A 401 response with an invalid_token error from the /mcp endpoint
  • The connection worked yesterday and stopped without any config change

What causes it

The Bearer token is missing, incorrect, or has been revoked. The MCP Server authenticates every request against an API key, so a token that no longer matches an active key is rejected before Odoo does anything else.

How to fix it

  1. Confirm the key is still Active. Open MCP → API Keys in Odoo and find the key the client uses. If its state is not Active, it has been archived or revoked and every request with it will fail. Reactivate it or issue a new key.
  2. Check whether the token has been rotated. Token rotation issues a new token version and invalidates the previous one. If the key was rotated after you configured the client, the client is still sending the old version. Generate a new token version and paste that into the client.
  3. Verify the whole token was copied. The plaintext token is shown once, at creation. A token truncated by a double-click selection, or carrying a trailing space or newline from a copy-paste, fails exactly like a wrong token. Re-copy it in full, or issue a fresh key if you no longer have it.
  4. Read the rejection reason in the Audit Log. Every failed request is logged. Open the Audit Log and find the entry for the failed attempt — it names the exact reason the request was rejected, which distinguishes a bad token from a key that is active but lacks model access.

How to confirm it is fixed

Reconnect the client. A working key returns the tool list immediately; if the client now connects but shows no tools, the token is fine and the problem has moved on to model access.

Related questions

Why did my Odoo MCP token stop working on its own?

Almost always because it was rotated. Rotating a key issues a new token version and invalidates the old one immediately, so any client still holding the previous version starts failing at the next request. Nothing expires on a timer by itself — check MCP → API Keys for the key's current version, generate a new token, and update the client.

Does "Authorization failed" mean my Odoo credentials are wrong?

No. The MCP Server authenticates with its own API key, not with your Odoo login. An "Authorization failed" response points at the Bearer token in the AI client's configuration, not at the Odoo user's password. The Odoo user only determines what the key is allowed to see once the token itself is accepted.

If that was not it

The full setup reference lives in the MCP Server documentation, and How to connect Claude to Odoo walks through a clean install from the start. Free setup support is included with the MCP Server for Odoo — if none of the above matches what you are seeing, send us the audit log entry and we will read it with you.