getting error
+1 have the same issue
I have the same issue, the mcp server for cursor isn't working. I'm using windows.
+1, I have the same error.
I have the same error.
Running Cursor (Linux) also get "client closed".
2025-04-19 09:52:04.679 [info] >>>>> MCP Startup
2025-04-19 10:50:01.444 [info] ext7: Handling CreateClient action
2025-04-19 10:50:01.445 [info] ext7: Starting new stdio process with command: npx -y @upstash/context7-mcp@latest
2025-04-19 10:50:01.445 [error] ext7: Client error for command A system error occurred (spawn npx ENOENT)
2025-04-19 10:50:01.445 [error] ext7: Error in MCP: A system error occurred (spawn npx ENOENT)
2025-04-19 10:50:01.446 [info] ext7: Client closed for command
2025-04-19 10:50:01.447 [error] ext7: Error in MCP: Client closed
2025-04-19 10:50:01.470 [info] ext7: Handling CreateClient action
2025-04-19 10:50:01.470 [info] ext7: Starting new stdio process with command: npx -y @upstash/context7-mcp@latest
2025-04-19 10:50:01.470 [error] ext7: Client error for command A system error occurred (spawn npx ENOENT)
2025-04-19 10:50:01.470 [error] ext7: Error in MCP: A system error occurred (spawn npx ENOENT)
2025-04-19 10:50:01.471 [info] ext7: Client closed for command
2025-04-19 10:50:01.471 [error] ext7: Error in MCP: Client closed
2025-04-19 10:50:01.473 [info] ext7: Handling ListOfferings action
2025-04-19 10:50:01.473 [error] ext7: No server info found
2025-04-19 10:50:01.473 [info] ext7: Handling ListOfferings action
2025-04-19 10:50:01.473 [error] ext7: No server info found
2025-04-19 10:50:12.836 [info] ext7: Handling ReloadClient action
2025-04-19 10:50:12.836 [info] ext7: Starting new stdio process with command: npx -y @upstash/context7-mcp@latest
2025-04-19 10:50:12.837 [error] ext7: Client error for command A system error occurred (spawn npx ENOENT)
2025-04-19 10:50:12.837 [error] ext7: Error in MCP: A system error occurred (spawn npx ENOENT)
2025-04-19 10:50:12.837 [error] ext7: Failed to reload client: A system error occurred (spawn npx ENOENT)
2025-04-19 10:50:12.851 [info] ext7: Client closed for command
2025-04-19 10:50:12.851 [error] ext7: Error in MCP: Client closed
2025-04-19 10:50:12.876 [info] ext7: Handling ListOfferings action
2025-04-19 10:50:12.876 [error] ext7: No server info found
2025-04-19 10:50:13.722 [info] ext7: Handling ReloadClient action
2025-04-19 10:50:13.722 [info] ext7: Starting new stdio process with command: npx -y @upstash/context7-mcp@latest
2025-04-19 10:50:13.722 [error] ext7: Client error for command A system error occurred (spawn npx ENOENT)
2025-04-19 10:50:13.722 [error] ext7: Error in MCP: A system error occurred (spawn npx ENOENT)
2025-04-19 10:50:13.722 [error] ext7: Failed to reload client: A system error occurred (spawn npx ENOENT)
2025-04-19 10:50:13.723 [info] ext7: Client closed for command
2025-04-19 10:50:13.723 [error] ext7: Error in MCP: Client closed
2025-04-19 10:50:13.724 [info] ext7: Handling ListOfferings action
2025-04-19 10:50:13.724 [error] ext7: No server info found
2025-04-19 10:50:36.551 [info] ext7: Handling CreateClient action
2025-04-19 10:50:36.551 [info] ext7: Starting new stdio process with command: npx -y @upstash/context7-mcp@latest
2025-04-19 10:50:36.551 [error] ext7: Client error for command A system error occurred (spawn npx ENOENT)
2025-04-19 10:50:36.551 [error] ext7: Error in MCP: A system error occurred (spawn npx ENOENT)
2025-04-19 10:50:36.552 [info] ext7: Client closed for command
2025-04-19 10:50:36.552 [error] ext7: Error in MCP: Client closed
2025-04-19 10:50:36.577 [info] ext7: Handling CreateClient action
2025-04-19 10:50:36.577 [info] ext7: Starting new stdio process with command: npx -y @upstash/context7-mcp@latest
2025-04-19 10:50:36.577 [error] ext7: Client error for command A system error occurred (spawn npx ENOENT)
2025-04-19 10:50:36.577 [error] ext7: Error in MCP: A system error occurred (spawn npx ENOENT)
2025-04-19 10:50:36.578 [info] ext7: Client closed for command
2025-04-19 10:50:36.578 [error] ext7: Error in MCP: Client closed
2025-04-19 10:50:36.579 [info] ext7: Handling ListOfferings action
2025-04-19 10:50:36.579 [error] ext7: No server info found
2025-04-19 10:50:36.579 [info] ext7: Handling ListOfferings action
2025-04-19 10:50:36.579 [error] ext7: No server info found
2025-04-19 10:51:53.354 [info] ext7: Handling CreateClient action
2025-04-19 10:51:53.354 [info] ext7: Starting new stdio process with command: npx -y @upstash/context7-mcp@latest
2025-04-19 10:51:53.354 [error] ext7: Client error for command A system error occurred (spawn npx ENOENT)
2025-04-19 10:51:53.354 [error] ext7: Error in MCP: A system error occurred (spawn npx ENOENT)
2025-04-19 10:51:53.355 [info] ext7: Client closed for command
2025-04-19 10:51:53.355 [error] ext7: Error in MCP: Client closed
2025-04-19 10:51:53.370 [info] ext7: Handling CreateClient action
2025-04-19 10:51:53.370 [info] ext7: Starting new stdio process with command: npx -y @upstash/context7-mcp@latest
2025-04-19 10:51:53.370 [error] ext7: Client error for command A system error occurred (spawn npx ENOENT)
2025-04-19 10:51:53.370 [error] ext7: Error in MCP: A system error occurred (spawn npx ENOENT)
2025-04-19 10:51:53.370 [info] ext7: Client closed for command
2025-04-19 10:51:53.370 [error] ext7: Error in MCP: Client closed
2025-04-19 10:51:53.371 [info] ext7: Handling ListOfferings action
2025-04-19 10:51:53.371 [error] ext7: No server info found
2025-04-19 10:51:53.372 [info] ext7: Handling ListOfferings action
2025-04-19 10:51:53.372 [error] ext7: No server info found
2025-04-19 10:51:55.876 [info] ext7: Handling ReloadClient action
2025-04-19 10:51:55.876 [info] ext7: Starting new stdio process with command: npx -y @upstash/context7-mcp@latest
2025-04-19 10:51:55.876 [error] ext7: Client error for command A system error occurred (spawn npx ENOENT)
2025-04-19 10:51:55.876 [error] ext7: Error in MCP: A system error occurred (spawn npx ENOENT)
2025-04-19 10:51:55.876 [error] ext7: Failed to reload client: A system error occurred (spawn npx ENOENT)
2025-04-19 10:51:55.877 [info] ext7: Client closed for command
2025-04-19 10:51:55.878 [error] ext7: Error in MCP: Client closed
2025-04-19 10:51:55.887 [info] ext7: Handling ListOfferings action
2025-04-19 10:51:55.888 [error] ext7: No server info found
2025-04-19 10:52:44.005 [info] ext7: Handling ReloadClient action
2025-04-19 10:52:44.005 [info] ext7: Starting new stdio process with command: npx -y @upstash/context7-mcp@latest
2025-04-19 10:52:44.006 [error] ext7: Client error for command A system error occurred (spawn npx ENOENT)
2025-04-19 10:52:44.006 [error] ext7: Error in MCP: A system error occurred (spawn npx ENOENT)
2025-04-19 10:52:44.006 [error] ext7: Failed to reload client: A system error occurred (spawn npx ENOENT)
2025-04-19 10:52:44.007 [info] ext7: Client closed for command
2025-04-19 10:52:44.007 [error] ext7: Error in MCP: Client closed
2025-04-19 10:52:44.020 [info] ext7: Handling ListOfferings action
2025-04-19 10:52:44.020 [error] ext7: No server info found
2025-04-19 10:53:08.209 [info] ext7: Handling ReloadClient action
2025-04-19 10:53:08.209 [info] ext7: Starting new stdio process with command: npx -y @upstash/context7-mcp@latest
2025-04-19 10:53:08.209 [error] ext7: Client error for command A system error occurred (spawn npx ENOENT)
2025-04-19 10:53:08.210 [error] ext7: Error in MCP: A system error occurred (spawn npx ENOENT)
2025-04-19 10:53:08.210 [error] ext7: Failed to reload client: A system error occurred (spawn npx ENOENT)
2025-04-19 10:53:08.211 [info] ext7: Client closed for command
2025-04-19 10:53:08.211 [error] ext7: Error in MCP: Client closed
2025-04-19 10:53:08.227 [info] ext7: Handling ListOfferings action
2025-04-19 10:53:08.227 [error] ext7: No server info found
2025-04-19 10:53:09.180 [info] ext7: Handling ReloadClient action
2025-04-19 10:53:09.180 [info] ext7: Starting new stdio process with command: npx -y @upstash/context7-mcp@latest
2025-04-19 10:53:09.180 [error] ext7: Client error for command A system error occurred (spawn npx ENOENT)
2025-04-19 10:53:09.181 [error] ext7: Error in MCP: A system error occurred (spawn npx ENOENT)
2025-04-19 10:53:09.181 [error] ext7: Failed to reload client: A system error occurred (spawn npx ENOENT)
2025-04-19 10:53:09.182 [info] ext7: Client closed for command
2025-04-19 10:53:09.183 [error] ext7: Error in MCP: Client closed
2025-04-19 10:53:09.185 [info] ext7: Handling ListOfferings action
2025-04-19 10:53:09.185 [error] ext7: No server info found
Could you please try bunx instead of npx?
Also at which point this started to happen? The first install? Or when you tried to reload the server?
For windows could you try this please:
{
"servers": {
"context7": {
"type": "stdio",
"command": "C:\\Windows\\System32\\cmd.exe",
"args": [
"/c",
"npx",
"-y",
"@upstash/context7-mcp@latest"
]
}
}
}
Could you please try
bunxinstead ofnpx?Also at which point this started to happen? The first install? Or when you tried to reload the server?
First install.
bunx gives me the same error "client closed".
2025-04-19 14:08:25.048 [info] >>>>> MCP Startup
2025-04-19 14:08:25.048 [info] ext7: Handling CreateClient action
2025-04-19 14:08:25.048 [info] ext7: Starting new stdio process with command: bunx -y @upstash/context7-mcp@latest
2025-04-19 14:08:25.048 [error] ext7: Client error for command A system error occurred (spawn bunx ENOENT)
2025-04-19 14:08:25.048 [error] ext7: Error in MCP: A system error occurred (spawn bunx ENOENT)
2025-04-19 14:08:25.048 [info] ext7: Client closed for command
2025-04-19 14:08:25.048 [error] ext7: Error in MCP: Client closed
2025-04-19 14:08:25.048 [info] ext7: Handling ListOfferings action
2025-04-19 14:08:25.048 [error] ext7: No server info found
Same here, using MacOS, Cursor, tried both npx and bunx
The error spawn npx ENOENT means that your system tried to run the npx command, but couldn’t find it.
Run npx -v in your terminal.
If it says “command not found”, install Node.js.
Ensure Node.js is in your PATH.
The error
spawn npx ENOENTmeans that your system tried to run the npx command, but couldn’t find it.Run
npx -vin your terminal. If it says “command not found”, install Node.js.Ensure Node.js is in your PATH.
This is what I get. I will go away for a few hours and can continue troubleshoot.
$ npx -v 10.8.2
$ which nodejs /usr/bin/nodejs
$ nodejs -v v20.19.0
My guess that it could be releated that Cursor runs as appimage. I will get back here later when I can google some more.
Hm... this is strange. Last message before I left I had troubleshooted for about 20 minutes. Just came back to my computer and refreshed the MCP and it now works.
Has it been self-resolved?
Does it work for you now? @fisforfaheem @kamiljaneczek @rivenrowe @JvdsReform @R3verseIN
Hm... this is strange. Last message before I left I had troubleshooted for about 20 minutes. Just came back to my computer and refreshed the MCP and it now works.
Has it been self-resolved?
Does it work for you now? @fisforfaheem @kamiljaneczek @rivenrowe @JvdsReform @R3verseIN
no
For Windows user:
Create npm folder in this path:
C:\Users\<User>\AppData\Roaming\npm
For Windows user:
Create npm folder in this path:
C:\Users\<User>\AppData\Roaming\npm
its already there Directory of C:\Users\r3versein\AppData\Roaming\npm
18-04-2025 21:20
C:\Users\r3versein\AppData\Roaming\npm>
Would anyone be interested to hop on a call and share their screen so that we can try to solve the issue together? I can't reproduce it.
For windows could you try this please:
{ "servers": { "context7": { "type": "stdio", "command": "C:\\Windows\\System32\\cmd.exe", "args": [ "/c", "npx", "-y", "@upstash/context7-mcp@latest" ] } } }
Doesn't work for me
I got the same issue.
using Cursor 0.49.2 and macOS.
when I change the mcp configuration to the following
"context7": {
"command": "npx",
"args": ["--no-install", "@upstash/context7-mcp", "--stdio"]
}
}
it works but I got a different issue then:
When the MCP tool "get-library-docs" is used, it fails because the parameter is at 2000 tokens. But it says it has to be at 5000
Parameters:
{
"context7CompatibleLibraryID": "/flutter/flutter",
"topic": "create app",
"tokens": 2000
}
Result:
{"error": "MCP error -32602: MCP error -32602: Invalid arguments for tool get-library-docs: [\n {\n \"code)": \"custom\", \n \"message)": \ "Must be a number >= 5000\", \n \"path\": [\n \"tokens\"\n ]\n 3\n]"}
When I tell the agent to use at least 5000 tokens it works.
So the LLM doesn’t correct its error on its own here? Do you think we should completely remove the minimum limit? In our tests, we saw that without the limit, LLMs tend to use very small context windows and don’t really benefit from using Context7.
So the LLM doesn’t correct its error on its own here? Do you think we should completely remove the minimum limit? In our tests, we saw that without the limit, LLMs tend to use very small context windows and don’t really benefit from using Context7.
Unfortunately the agent/ LLM doesn't correct the token parameter (tried different models - all the same).
I got it working for me with this MCP config with Cursor 0.49.2 and macOS, so the used parameter always 5000 token, which is in my opionion definitely needed because like you already said the LLM doesn't benefit from such small context.
"context7": { "command": "npx", "args": [ "--no-install", "@upstash/context7-mcp", "--stdio" ], "toolParams": { "get-library-docs": { "tokens": { "defaultValue": 5000, "minimum": 5000 }
So it uses minimum 5000 tokens and it never gets down the 5000 token