This guide provides detailed instructions for installing and configuring the Context7 MCP server on Windows environments. Follow these steps to integrate up-to-date library documentation into your AI coding assistant.
Open a terminal (Command Prompt or PowerShell) and run:
npm install -g @upstash/context7-mcp@latest
This will install the Context7 MCP package globally on your system.
Confirm that the package was installed successfully:
npm list -g | findstr context7
You should see output similar to:
├── @upstash/context7-mcp@1.0.4 (or latest version)
You will need these paths to configure your MCP settings:
# Get Node.js executable path
where node
# Example output: C:\Program Files\nodejs\node.exe
# Get global npm packages directory
npm root -g
# Example output: C:\Users\username\AppData\Roaming\npm\node_modules
Create a dedicated directory for MCP servers:
mkdir "C:\Users\%USERNAME%\Documents\Cline\MCP\context7-mcp"
The configuration file for Cursor is typically located at:
C:\Users\[username]\AppData\Roaming\Cursor\User\globalStorage\saoudrizwan.claude-dev\settings\cline_mcp_settings.json
Edit this file to add Context7 MCP:
{
"mcpServers": {
"github.com/upstash/context7-mcp": {
"command": "C:\\Program Files\\nodejs\\node.exe",
"args": ["C:\\Users\\[username]\\AppData\\Roaming\\npm\\node_modules\\@upstash\\context7-mcp\\dist\\index.js"],
"disabled": false,
"autoApprove": []
}
// Other MCP servers may be here
}
}
Note: Replace
[username]
with your actual Windows username.
If you’re using VS Code, the configuration file can be found at:
C:\Users\[username]\AppData\Roaming\Code\User\settings.json
Add the following configuration:
{
"mcp.servers": {
"Context7": {
"type": "stdio",
"command": "C:\\Program Files\\nodejs\\node.exe",
"args": ["C:\\Users\\[username]\\AppData\\Roaming\\npm\\node_modules\\@upstash\\context7-mcp\\dist\\index.js"]
}
}
}
After making changes to the configuration files, restart Cursor, VS Code, or your MCP-compatible application to apply the changes.
Once installed and configured, you can test Context7 MCP by:
Example:
How do I use React hooks? use context7
If you encounter any issues during installation or testing, refer to our Troubleshooting Guide.
For various configuration examples for different environments, see Configuration Examples.