Cursor MCP "Failed to create client" with @upstash/context7-mcp using npx: fix
A user configured the context7 MCP server in Cursor with npx and the args "-y", "@upstash/context7-mcp", but Cursor shows "Failed to create client." Running the npx command with the @latest tag in a terminal printed "'context7-mcp' is not recognized as an internal or external command, operable program or batch file." How can the server be started?
Originally asked on GitHub: https://github.com/upstash/context7/issues/66
6 answers
Status: fixed. Several users reported that removing the
@latesttag from the npx arguments made the Cursor MCP client connect, and the issue was closed as completed.Use this config:
json{ "mcpServers": { "context7": { "command": "npx", "args": ["-y", "@upstash/context7-mcp"] } } }One user reported the error disappeared after clicking the refresh button in Cursor's MCP panel, without other changes. Another user confirmed that the config worked after removing
@latest.A maintainer asked users to run
npm view @upstash/context7-mcp bin. The expected output is{ 'context7-mcp': 'dist/index.js' }. One reporter on Node v22.9.0 and npm 11.3.0 posted that output in the thread, but the thread does not draw a conclusion from it.A maintainer also suggested trying
bunxordenoin place of npx. The thread does not confirm whether those worked.General advice: after changing the config, use Cursor's MCP refresh button or restart Cursor so the configuration is reloaded.
Did this work for you?What @vietquang99 tried on GitHub (Didn't work)
Ran
npx -y @upstash/context7-mcp@latestdirectly in the terminal; it returned "'context7-mcp' is not recognized as an internal or external command, operable program or batch file."Source: https://github.com/upstash/context7/issues/66 (opens external site)
Did this work for you?What @kuzniets tried on GitHub (Worked)
Removed the
@latesttag from the npx args so the config used just@upstash/context7-mcp; it worked.Source: https://github.com/upstash/context7/issues/66#issuecomment-2824572829 (opens external site)
Did this work for you?What @Umakantamaharana tried on GitHub (Worked)
Clicked the refresh button in Cursor's MCP panel; the error disappeared.
Source: https://github.com/upstash/context7/issues/66#issuecomment-2823222500 (opens external site)
Did this work for you?What @antonioc-cl tried on GitHub (Outcome unclear)
Ran
npm view @upstash/context7-mcp bin, which output{ 'context7-mcp': 'dist/index.js' }, on Node v22.9.0 and npm 11.3.0. The Cursor log showed "No server info found".Source: https://github.com/upstash/context7/issues/66#issuecomment-2822562164 (opens external site)
Did this work for you?What @enesgules tried on GitHub (Outcome unclear)
Maintainer asked the reporter to run
npm view @upstash/context7-mcp binto check the package binary, and asked for the npm version.Source: https://github.com/upstash/context7/issues/66#issuecomment-2822318051 (opens external site)
Did this work for you?
Related questions
- How does context7 decide which docs are trusted? What is trustScore?
- Context7 MCP server rate limits my first request in Trae — is it my config or Context7?
- Does Context7 support GitLab repositories now, and where do I add one?
- Is there an official public Docker image for the context7 MCP server?
- Context7 MCP in Cursor: "Client closed" / "spawn npx ENOENT"