directus / directus/mcp

Error on setting up MCP on Claude desktop

Open
#2 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
84
Forks
19
PR merge metrics
No merged PRs in 30d

Description

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

```json
{
"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. (/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](https://github.com/Eunoia/roamImporter/) to `jsdom`, but I can't tell how to solve.

The same goes for email/pass access.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the Claude Desktop setup in the README and reproduce the npx @directus/content-mcp@latest command using the reported configuration. Trace the jsdom stack location shown in the error and check the supported runtime requirements. Done means the MCP server initializes without the syntax error and both token and email/password access work.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, node.js, typescript
Domain
api, backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.