Apify MCP says Unauthorized or invalid token: the fix
Every Apify Actor tool needs a signed-in Apify account. Reconnect the server so the OAuth sign-in runs again, or switch to the token variant: an Authorization: Bearer header with an API token from Apify Console, Settings, API and integrations. For a local server the token must be in the server's own env block, not only in your shell.
Source: Apify MCP server README. Applies to: Apify MCP server, Claude Desktop and claude.ai, Cursor, VS Code, Codex CLI, Gemini CLI, Claude Code.
The question people ask
Why does the client say Unauthorized or invalid token?
Where to fix it on this site
Related fixes
- Apify MCP tool list changed after an update: pin the tools
- An Apify Actor rejects the agent's input: what happens
- VS Code MCP: OAuth app is not registered (Apify)
- Claude Desktop cannot start the local Apify MCP server
- The Claude connector to Apify stopped working: re-authorize
- Claude Code MCP shows Needs authentication (Apify)