| title | VS Code | ||
|---|---|---|---|
| description | Using Context7 with VS Code | ||
| product | Context7 | ||
| section | docs | ||
| source_url | https://context7.com/docs/clients/vscode | ||
| fetched | 2026-09-26 | ||
| tags |
|
Using Context7 with VS Code
The Context7 VS Code extension registers the Context7 MCP server with VS Code's built-in MCP support, so AI features like Copilot Chat in agent mode get current library documentation instead of relying on training data.
The extension connects to the hosted server at https://mcp.context7.com/mcp. There is no local server process to manage and nothing to update manually. The source is available at upstash/context7-vscode-extension.
Install Context7 MCP Server from the Visual Studio Marketplace, or search for Upstash.context7-mcp in the Extensions view.
Requires VS Code 1.101 or later.
The server registers automatically when the extension activates. To confirm, run the MCP: List Servers command and check that "Context7" is listed.
If you prefer to configure the MCP server yourself instead of using the extension, see All MCP Clients.
An API key gives you higher rate limits and access to private repositories. Create one in the Context7 dashboard.
Press `Cmd+,` (or `Ctrl+,` on Windows/Linux) and search for "context7". Paste your key into the **Context7: Api Key** field, or add it to `settings.json` directly:{
"context7.apiKey": "YOUR_API_KEY"
}Add "use context7" to your prompts in Copilot Chat:
use context7 to show me how to set up middleware in Next.js 15
use context7 for Prisma query examples with relations
use context7 for the Supabase syntax for row-level security
If you know the library ID, use it directly to skip resolution:
use context7 with /supabase/supabase for authentication docs
use context7 with /vercel/next.js for app router setup
The extension exposes the two Context7 tools to VS Code:
resolve-library-id: Resolves a package or product name to a Context7-compatible library IDquery-docs: Fetches up-to-date documentation for a library