Skip to content

Error on setting up MCP on Claude desktop #2

@drapisarda

Description

@drapisarda

Hallo there,
I write to report a bug in the setting up of MCP on Claude Desktop.
I'm changing the config as described in the readme

{
  "globalShortcut": "",
  "mcpServers": {
    "directus": {
      "command": "npx",
      "args": [
        "@directus/content-mcp@latest"
      ],
      "env": {
        "DIRECTUS_URL": "https://admin.mydomain.io",
        "DIRECTUS_TOKEN": "myTokenHere",
      }
    }
  }
}

but I'm getting an error and this is what the error log reports

2025-05-30T15:23:31.820Z [directus] [info] Initializing server...
2025-05-30T15:23:31.997Z [directus] [info] Server started and connected successfully
2025-05-30T15:23:32.001Z [directus] [info] Message from client: {"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"claude-ai","version":"0.1.0"}},"jsonrpc":"2.0","id":0}
npx: installed 125 in 4.815s
/Users/myuser/.npm/_npx/4460/lib/node_modules/@directus/content-mcp/node_modules/jsdom/lib/jsdom/living/nodes/HTMLInputElement-impl.js:587
      this[filesSymbol] ||= FileList.createImpl(this._globalObject);
                        ^^^

SyntaxError: Unexpected token '||='
    at wrapSafe (internal/modules/cjs/loader.js:979:16)
    at Module._compile (internal/modules/cjs/loader.js:1027:27)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
    at Module.load (internal/modules/cjs/loader.js:928:32)
    at Function.Module._load (internal/modules/cjs/loader.js:769:14)
    at Module.require (internal/modules/cjs/loader.js:952:19)
    at require (internal/modules/cjs/helpers.js:88:18)
    at Object.<anonymous> (/Users/myuser/.npm/_npx/4460/lib/node_modules/@directus/content-mcp/node_modules/jsdom/lib/jsdom/living/generated/HTMLInputElement.js:1924:14)
    at Module._compile (internal/modules/cjs/loader.js:1063:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
2025-05-30T15:23:38.132Z [directus] [info] Server transport closed
2025-05-30T15:23:38.132Z [directus] [info] Client transport closed
2025-05-30T15:23:38.133Z [directus] [info] Server transport closed unexpectedly, this is likely due to the process exiting early. If you are developing this MCP server you can add output to stderr (i.e. `console.error('...')` in JavaScript, `print('...', file=sys.stderr)` in python) and it will appear in this log.
2025-05-30T15:23:38.133Z [directus] [error] Server disconnected. For troubleshooting guidance, please visit our [debugging documentation](https://modelcontextprotocol.io/docs/tools/debugging) {"context":"connection"}
2025-05-30T15:23:38.133Z [directus] [info] Client transport closed

It seems to be related to jsdom, but I can't tell how to solve.

The same goes for email/pass access.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions