The server writes diagnostic messages to stderr. Where you find this output depends on your MCP client.
Message: Error: Missing required environment variables and Please ensure WIKIJS_API_URL and WIKIJS_API_TOKEN are set in .env file
Cause: WIKIJS_API_URL or WIKIJS_API_TOKEN is not set, or the server did not find the .env.
Solution:
~/.claude/mcp-servers/wikijs/.env exists. If so, only that file is read and a .env in the repository is ignored..env from the working directory of the process. That is often not the repository.Details: Configuration.
npm run build? Without dist/index.js the client cannot start anything.dist/index.js in the client configuration correct?node available in the client process (PATH) and version 18 or newer?Message: Wiki.js API request failed: HTTP error! status: <code>
| Code | Usual cause |
|---|---|
| 404 | WIKIJS_API_URL does not point to the GraphQL endpoint, usually /graphql is missing |
| 401 or 403 | Token invalid, expired or revoked |
| 502 to 504 | Reverse proxy or Wiki.js not reachable |
Message: Wiki.js API request failed: GraphQL request failed: <message>
The text comes from Wiki.js. A message such as Forbidden indicates that the API key lacks a required permission. .env.example lists read:pages, write:pages and manage:pages. The complete error list is also written to stderr.
Message: Failed to create page: ..., Failed to update page: ..., Failed to delete page: ... or Failed to move page: ...
Wiki.js understood the request but rejected it. Typical cases: the page already exists at that path (create), the destination path is taken (move) or the key lacks a permission. The text after the colon comes from Wiki.js.
Message: Page not found at path: <path> or Page not found with ID: <ID>
Check the path and above all locale: the default is en. A German page is only found with locale: "de".
Message: Validation error in <tool>: with a list of field and reason.
Common causes:
//: allowed are letters, digits, -, _ and /locale in the wrong format, expected e.g. de or en-UScontent empty or over 500,000 characters, title over 200 or description over 500 charactersid nor path given: Either "id" or "path" must be providedMessage: Request timed out. Please try again.
Wiki.js did not answer within 30 seconds. Check that the instance is reachable. On very large wikis wikijs_list_pages can be slow because the complete page list is loaded every time; this also applies to wikijs_update_page without tags.
Pages over 100,000 characters are truncated on read, recognisable by the [Content truncated. ...] notice at the end. Do not write this text back, see the warning under wikijs_update_page in the Tools reference.
If isPublished was not passed on the update, Wiki.js may treat the page as unpublished. Set the page back to published with an update and isPublished: true.