context7 MCP fails to connect with "Connection closed" error #7039
-
What happened?The context7 MCP fails to initialize and connect, resulting in "Connection closed" errors in the logs. Other configured MCPs (like the github MCP) work correctly with the same LibreChat deployment. The context7 MCP command itself works when executed directly in the terminal or VS Code Cline Extension Version InformationSteps to Reproduce
What browsers are you seeing the problem on?Firefox Relevant log outputMCP Configuration used: mcpServers:
github:
type: stdio
command: /usr/local/bin/github-mcp-server
env:
GITHUB_PERSONAL_ACCESS_TOKEN: redacted
args:
- stdio
context7:
command: /root/.nvm/versions/node/v22.14.0/bin/npx
stderr: inherit
initTimeout: 10000
args:
- -y
- "@upstash/context7-mcp@latest"
Code of Conduct
|
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
it will totally depend on your environment, and where mcpServers:
context7:
command: npx
args:
- -y
- "@upstash/context7-mcp@latest" npm logs:
docker logs:
|
Beta Was this translation helpful? Give feedback.
-
Suffering the same issue, I swapped out Updated mcp server json:
|
Beta Was this translation helpful? Give feedback.
-
I found the cause of the error: I used systemd to start LibreChat, but I didn't configure the correct PATH environment variables in systemd, which caused the program to fail to find npx. After fixing it, LibreChat can used context7 |
Beta Was this translation helpful? Give feedback.
I found the cause of the error: I used systemd to start LibreChat, but I didn't configure the correct PATH environment variables in systemd, which caused the program to fail to find npx. After fixing it, LibreChat can used context7