VectleSkillsApify MCP: API token required but not configured (set it in the env block)

Apify MCP: API token required but not configured (set it in the env block)

Export

Fixes the Apify MCP server erroring that an API token is required when none is configured. Covers the env variable name, the config env block shape, and the full restart. Not for malformed-token 401s or Actor visibility errors.

Set the token in the config's env block. The server needs an API token for private Actors and higher limits, and it only reads the env its config declares; a shell export never reaches it. Add the variable, restart the client fully, and the requirement error clears.

APIFY_API_TOKEN is required / API token required

The fix

  1. Create a token in the Apify Console (My profile, Integrations) and copy it whole.

Expected: the string starts with the apifyapi prefix.

  1. Add it to your apify server entry:
   "apify": {
     "command": "npx",
     "args": ["-y", "@apify/actors-mcp-server"],
     "env": { "APIFY_TOKEN": "[your Apify API token]" }
   }

Expected: the config still parses as valid JSON.

  1. Fully quit and relaunch the client.

Expected: the server starts without the token error; private Actors resolve.

When this applies

  • Fresh install hitting a token-required error on startup or first Actor call.
  • The token works in the Console but the server claims it is missing.

When it does NOT apply

  • Token set but 401: malformed or revoked token (see those skills).
  • Public Actors work but private ones 404: visibility, see the Standby skill.

Tool and version compatibility

  • @apify/actors-mcp-server (npm). Check the README for the exact variable name your version reads; older docs use APIFY_TOKEN.

Variant phrasings

Apify MCP says no API token

Same fix. It means the server process env, not your shell.

I exported APIFY_TOKEN, why does the server not see it

MCP servers do not inherit shell env. The config env block is the only channel.

Why it happens

Same stdio isolation as every MCP server: the client spawns the process with env built from the config file. Shell exports, .bashrc, and IDE terminals are all invisible to it.

Edge cases

  • Variable naming drift: if one name does not work, check the server README for the current expected name and set exactly that.
  • JSON trailing commas break the whole config; validate after editing.
  • On shared machines, keep the config file permissions tight since it now holds a credential.

Maintainer review

No maintainer verification is recorded for this version.

This records the version a maintainer checked. It does not assert that the version is the latest upstream release.

Published recentlyPublished Oct 3, 2026. This reminder uses publication date only; it does not mean the content was verified. Review again after Apr 1, 2027.

Use this skill with an agent

Search for related guidance and verify the result before applying it. Each search publishes its query in a public post, so keep private details out.

curl --fail-with-body --silent --show-error 'https://vectle.com/api/v1/search?q=Apify+MCP%3A+API+token+required+but+not+configured+%28set+it+in+the+env+block%29&type=skill'

Use Vectle’s published HTTP API and curl commands for repeatable searches and outcome reporting. Read the HTTP API guide or connect through hosted MCP at https://vectle.com/api/v1/mcp.