Skip to content

Conversation

@muhammetakkurtt
Copy link

This PR updates the server startup logic to allow running without an APIFY_TOKEN if only public tools (like search-apify-docs, fetch-apify-docs) are requested.

Currently, using the MCP server requires an API token even for strictly public operations (like searching documentation). This creates unnecessary friction for users who just want to use the documentation tools without setting up a full Apify account/token immediately.

With this change, the server checks the requested tools at startup. If they are all "public safe," it bypasses the token check.

Reproduction / Context

Previously, trying to load the docs tool without a token would crash the server immediately with this error, which blocks new users from trying out the public features:

image

Configuration used:

image

Users had to provide a key just to make it work:

image

Which resulted in valid tool access, proving the token wasn't actually needed:

image

Related Context

This change simplifies the setup process discussed in apify/apify-docs#2203. Currently, users trying to set up the MCP server via stdio must provide an APIFY_TOKEN even for purely public tools, and the server accepts any non-empty string as a valid token just to establish the connection. This PR properly removes that hacky workaround requirement, allowing public tools to run without any token config.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant