This guide centers on the single most efficient way to configure Model Context Protocol (MCP) servers—especially Context7—in user scope on Windows, without touching workspace settings.
The MCP: Open User Configuration command automates locating or creating your user-level MCP file and opens it directly:
C:\Users\<YourUsername>\AppData\Roaming\Code\User\mcp.json
Steps:
- Press Ctrl+Shift+P to open the Command Palette.
- Type MCP: Open User Configuration and hit Enter.
- VS Code opens
mcp.json. If the file doesn’t exist, VS Code creates it with{}.
Benefits:
- No manual navigation or guesswork.
- Keeps workspace-level
.vscodefolders untouched for team projects. - Ensures a consistent, global MCP environment across all your VS Code instances.
With the file open, define servers under the top-level servers key:
- type:
"stdio"runs the server over stdin/stdout. - command:
"npx"avoids global installs and loads latest version. - gallery:
truemakes Context7 visible in the MCP gallery UI.
Save the file to register your server.
| Issue | Symptom | Fix |
|---|---|---|
npx Not Found (ENOENT) |
Server doesn’t launch | Use CMD wrapper: |
"command": "cmd",
"args": ["/c", "npx -y @upstash/context7-mcp@latest"]Or add Node.js to System PATH and restart VS Code. | | Permissions Errors | "Operation not permitted" | Run VS Code as Administrator or adjust PowerShell policy:
Set-ExecutionPolicy -Scope CurrentUser RemoteSigned
``` |
| File Not Created/Open | No `mcp.json` present | Ensure `chat.mcp.discovery.enabled` is `true` in `settings.json`, or manually create the file. |
| WSL vs Windows Mismatch | Changes affect only WSL | Run the command in **Windows-native** VS Code, not in WSL. |
---
### 4. Verify & Test
1. **Reload VS Code**: Command Palette → **Developer: Reload Window**.
2. **List Servers**: Command Palette → **MCP: Show Installed Servers** → Look for `context7` under **User Servers**.
3. **Test a Tool**: In Copilot chat, ask:get-library-docs @upstash/context7-mcp
A valid JSON response confirms Context7 is active.
---
### 5. Best Practices
- **Backup** `%USERPROFILE%\.mcp.json` for easy migration.
- **Use `npx`** to always run the latest MCP version.
- **Separate MCP config** from workspace settings to preserve shared repos.
- **Check Logs**: Help → Toggle Developer Tools → Console for MCP errors.
---
With **MCP: Open User Configuration** as your focus, setting up user-scope MCP servers on Windows becomes seamless, reliable, and entirely decoupled from workspace-level configurations.
{ "servers": { "context7": { "type": "stdio", "command": "npx", "args": ["-y", "@upstash/context7-mcp@latest"], "gallery": true } } }