Local AI Automation and Permissions AI assistant · Q&A
Fix an “Invalid token” MCP response
Verify the current token, environment variable, and caller process without exposing credentials in logs.
Updated Aug 24, 2026This response means the bearer token sent by the caller does not match the token currently accepted by MaskPilot.
Fix it
- Copy the current MCP token from the MaskPilot client.
- Update the
MASKPILOT_MCP_TOKENenvironment variable. - Fully restart or reload the caller so it reads the new value.
- Connect to MCP again.
If the token appeared in a public log, screenshot, or repository, rotate it in the client immediately and then update the caller.
Do not place the token directly in a configuration file that can be committed. Prefer bearer_token_env_var and an environment variable.