From 72d7e741d06935fffc4a0bdf43fc17f180720fe8 Mon Sep 17 00:00:00 2001 From: Jyotirmoy Das Date: Fri, 25 Apr 2025 16:45:04 +0000 Subject: [PATCH 1/3] fix: Update Context7 MCP installation instructions with specific version and node options --- README.md | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index d654ed4..ac97ca6 100644 --- a/README.md +++ b/README.md @@ -60,7 +60,11 @@ Pasting the following configuration into your Cursor `~/.cursor/mcp.json` file i "mcpServers": { "context7": { "command": "npx", - "args": ["-y", "@upstash/context7-mcp@latest"] + "args": [ + "-y", + "--node-options=--experimental-vm-modules", + "@upstash/context7-mcp@1.0.6" + ] } } } @@ -107,7 +111,11 @@ Add this to your Windsurf MCP config file. See [Windsurf MCP docs](https://docs. "mcpServers": { "context7": { "command": "npx", - "args": ["-y", "@upstash/context7-mcp@latest"] + "args": [ + "-y", + "--node-options=--experimental-vm-modules", + "@upstash/context7-mcp@1.0.6" + ] } } } @@ -126,7 +134,11 @@ Add this to your VS Code MCP config file. See [VS Code MCP docs](https://code.vi "Context7": { "type": "stdio", "command": "npx", - "args": ["-y", "@upstash/context7-mcp@latest"] + "args": [ + "-y", + "--node-options=--experimental-vm-modules", + "@upstash/context7-mcp@1.0.6" + ] } } } @@ -167,7 +179,11 @@ Add this to your Claude Desktop `claude_desktop_config.json` file. See [Claude D "mcpServers": { "Context7": { "command": "npx", - "args": ["-y", "@upstash/context7-mcp@latest"] + "args": [ + "-y", + "--node-options=--experimental-vm-modules", + "@upstash/context7-mcp@1.0.6" +] } } } From 0843523f606fcd977c26aa2442260f86f0e83611 Mon Sep 17 00:00:00 2001 From: Jyotirmoy Das Date: Sun, 27 Apr 2025 18:06:37 +0000 Subject: [PATCH 2/3] Implement code changes to enhance functionality and improve performance --- README.md | 62 +++++++++++++++++++++++++++++++++++++------------------ 1 file changed, 42 insertions(+), 20 deletions(-) diff --git a/README.md b/README.md index ac97ca6..e39d97f 100644 --- a/README.md +++ b/README.md @@ -60,11 +60,7 @@ Pasting the following configuration into your Cursor `~/.cursor/mcp.json` file i "mcpServers": { "context7": { "command": "npx", - "args": [ - "-y", - "--node-options=--experimental-vm-modules", - "@upstash/context7-mcp@1.0.6" - ] + "args": ["-y", "@upstash/context7-mcp@latest"] } } } @@ -111,11 +107,7 @@ Add this to your Windsurf MCP config file. See [Windsurf MCP docs](https://docs. "mcpServers": { "context7": { "command": "npx", - "args": [ - "-y", - "--node-options=--experimental-vm-modules", - "@upstash/context7-mcp@1.0.6" - ] + "args": ["-y", "@upstash/context7-mcp@latest"] } } } @@ -134,11 +126,7 @@ Add this to your VS Code MCP config file. See [VS Code MCP docs](https://code.vi "Context7": { "type": "stdio", "command": "npx", - "args": [ - "-y", - "--node-options=--experimental-vm-modules", - "@upstash/context7-mcp@1.0.6" - ] + "args": ["-y", "@upstash/context7-mcp@latest"] } } } @@ -179,11 +167,7 @@ Add this to your Claude Desktop `claude_desktop_config.json` file. See [Claude D "mcpServers": { "Context7": { "command": "npx", - "args": [ - "-y", - "--node-options=--experimental-vm-modules", - "@upstash/context7-mcp@1.0.6" -] + "args": ["-y", "@upstash/context7-mcp@latest"] } } } @@ -306,6 +290,43 @@ If you see this error, try using `bunx` instead of `npx`. This often resolves module resolution issues, especially in environments where `npx` does not properly install or resolve packages. +Alternatively, you can also try the following setups depending on your editor: + +**VS Code:** + +```json +{ + "servers": { + "Context7": { + "type": "stdio", + "command": "npx", + "args": [ + "-y", + "--node-options=--experimental-vm-modules", + "@upstash/context7-mcp@1.0.6" + ] + } + } +} +``` + +**Cursor / Windsurf / Claude Desktop:** + +```json +{ + "mcpServers": { + "context7": { + "command": "npx", + "args": [ + "-y", + "--node-options=--experimental-vm-modules", + "@upstash/context7-mcp@1.0.6" + ] + } + } +} +``` + ### MCP Client Errors 1. Try removing `@latest` from the package name. @@ -314,6 +335,7 @@ This often resolves module resolution issues, especially in environments where ` 3. Try using `deno` as an alternative. + ## Context7 In Media - [Better Stack: "Free Tool Makes Cursor 10x Smarter"](https://youtu.be/52FC3qObp9E) From c4c1cdb69b246e9c517a26ce5ab810e306d9d466 Mon Sep 17 00:00:00 2001 From: Jyotirmoy Das Date: Sun, 27 Apr 2025 18:28:10 +0000 Subject: [PATCH 3/3] docs: Add note on Node.js version requirement for native fetch support and Resolved The conflicts --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index e39d97f..74aa66e 100644 --- a/README.md +++ b/README.md @@ -335,6 +335,7 @@ Alternatively, you can also try the following setups depending on your editor: 3. Try using `deno` as an alternative. +4. Make sure you are using Node v18 or higher to have native fetch support with `npx`. ## Context7 In Media