[GH-ISSUE #3854] [BUG]: MCP start failed: spawn npx ENOENT #2462

Closed
opened 2026-02-22 18:29:46 -05:00 by yindo · 4 comments
Owner

Originally created by @asterzhang01 on GitHub (May 20, 2025).
Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/3854

How are you running AnythingLLM?

AnythingLLM desktop app

What happened?

I'm trying to integrate MCP with the Anything desktop app. After configuring the anythingllm_mcp_servers.json file and starting the MCP server, I encountered the following error:

{"level":"info","message":"\u001b[36m[s]\u001b[0m Successfully started 0 MCP servers: []","service":"backend"}
{"level":"info","message":"\u001b[36m[s]\u001b[0m Attempting to start MCP server: mcp-trends-hub","service":"backend"}
{"level":"info","message":"\u001b[36m[s]\u001b[0m Failed to start single MCP server: mcp-trends-hub {\"error\":\"spawn npx ENOENT\",\"code\":\"ENOENT\",\"syscall\":\"spawn npx\",\"path\":\"npx\",\"stack\":\"Error: spawn npx ENOENT\\n    at ChildProcess._handle.onexit (node:internal/child_process:283:19)\\n    at onErrorNT (node:internal/child_process:476:16)\\n    at process.processTicksAndRejections (node:internal/process/task_queues:82:21)\"}","service":"backend"}

However, I can confirm npx exists in my environment:

➜  plugins which npx
/opt/homebrew/bin/npx

anythingllm_mcp_servers.json :

  "mcpServers": {
    "mcp-trends-hub": {
      "command": "npx",
      "args": [
        "-y",
        "@smithery/cli@latest",
        "run",
        "@baranwang/mcp-trends-hub",
        "--key",
        "*******"
      ]
    }
  }
}

Are there known steps to reproduce?

No response

Originally created by @asterzhang01 on GitHub (May 20, 2025). Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/3854 ### How are you running AnythingLLM? AnythingLLM desktop app ### What happened? I'm trying to integrate MCP with the Anything desktop app. After configuring the anythingllm_mcp_servers.json file and starting the MCP server, I encountered the following error: ``` {"level":"info","message":"\u001b[36m[s]\u001b[0m Successfully started 0 MCP servers: []","service":"backend"} {"level":"info","message":"\u001b[36m[s]\u001b[0m Attempting to start MCP server: mcp-trends-hub","service":"backend"} {"level":"info","message":"\u001b[36m[s]\u001b[0m Failed to start single MCP server: mcp-trends-hub {\"error\":\"spawn npx ENOENT\",\"code\":\"ENOENT\",\"syscall\":\"spawn npx\",\"path\":\"npx\",\"stack\":\"Error: spawn npx ENOENT\\n at ChildProcess._handle.onexit (node:internal/child_process:283:19)\\n at onErrorNT (node:internal/child_process:476:16)\\n at process.processTicksAndRejections (node:internal/process/task_queues:82:21)\"}","service":"backend"} ``` However, I can confirm npx exists in my environment: ``` ➜ plugins which npx /opt/homebrew/bin/npx ``` anythingllm_mcp_servers.json : ``` "mcpServers": { "mcp-trends-hub": { "command": "npx", "args": [ "-y", "@smithery/cli@latest", "run", "@baranwang/mcp-trends-hub", "--key", "*******" ] } } } ``` ### Are there known steps to reproduce? _No response_
yindo added the possible bug label 2026-02-22 18:29:46 -05:00
yindo closed this issue 2026-02-22 18:29:46 -05:00
Author
Owner

@PaoloC68 commented on GitHub (May 20, 2025):

have you tried to restart the Anything desktop app?

I had the same problem and restarting fixed it

@PaoloC68 commented on GitHub (May 20, 2025): have you tried to restart the Anything desktop app? I had the same problem and restarting fixed it
Author
Owner

@timothycarambat commented on GitHub (May 20, 2025):

https://docs.anythingllm.com/mcp-compatibility/desktop#command-availability

Often the issue is npx is not findable. which npx and then just use that path directly since that alias is probably just not being loaded in the spawned process to run the MCP server

@timothycarambat commented on GitHub (May 20, 2025): https://docs.anythingllm.com/mcp-compatibility/desktop#command-availability Often the issue is `npx` is not findable. `which npx` and then just use that path directly since that alias is probably just not being loaded in the spawned process to run the MCP server
Author
Owner

@PaoloC68 commented on GitHub (May 29, 2025):

@asterzhang01 see my PR #3909 , it fixes the problem

@PaoloC68 commented on GitHub (May 29, 2025): @asterzhang01 see my PR #3909 , it fixes the problem
Author
Owner

@kucukkanat commented on GitHub (Jul 7, 2025):

For me entering the absolute path of the executable fixed the issue

@kucukkanat commented on GitHub (Jul 7, 2025): For me entering the absolute path of the executable fixed the issue
yindo changed title from [BUG]: MCP start failed: spawn npx ENOENT to [GH-ISSUE #3854] [BUG]: MCP start failed: spawn npx ENOENT 2026-06-05 14:46:40 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Mintplex-Labs/anything-llm#2462