Context7 for VS Code: Setup & Config
Context7 retrieves current library documentation and code examples for VS Code.
What you can do with Context7 in VS Code
Ground coding assistance in targeted library documentation, including version-specific examples.
- Retrieve library-specific API documentation while generating code.
- Resolve an ambiguous library name to a Context7 identifier.
Before you start: Context7 in VS Code
- Node.js 18 or later for the setup CLI
- A compatible coding agent or MCP client
This is a setup command, not a persistent server launch. Choose MCP mode during setup. Manual HTTP configuration passes a key in the CONTEXT7_API_KEY header, not an environment variable. A free API key is recommended for higher limits.
Context7 VS Code configuration
Choose VS Code configuration scope
For Context7, open Workspace: .vscode/mcp.json. Merge into servers; preserve existing inputs.
Add Context7 to VS Code
Use the context7-mcp entry below in servers. Keep Context7's documented http connection fields and your other VS Code entries.
Check Context7 in VS Code
Context7: Start in VS Code’s MCP controls; inspect output and trust prompts.
Config file · Workspace: .vscode/mcp.json
{
"servers": {
"context7-mcp": {
"type": "http",
"url": "https://mcp.context7.com/mcp"
}
}
}Context7 tools available to VS Code
Context7's stored tool list documents 2 tools; compare it with VS Code's connected tool list, because the stored list is not a live check.
- resolve-library-id
Look for resolve-library-id among VS Code's agent-mode tools after starting Context7 through the MCP controls.
Match a library name and task to a Context7 library identifier.
- query-docs
Look for query-docs among VS Code's agent-mode tools after starting Context7 through the MCP controls.
Troubleshooting Context7 in VS Code
- The Context7 entry connects to mcp.context7.com with type http. Start it through VS Code's MCP controls and review the endpoint before accepting trust prompts.
- Context7: check http connectivity to mcp.context7.com from VS Code; a stdio command is not a replacement for this endpoint.
- Transport mismatch: Context7's catalog lists stdio; the displayed VS Code configuration uses http.
- Known limitation: Community-contributed documentation is not guaranteed accurate, complete, or secure.
- Known limitation: The backend, parsing engine, and crawler are not included in the repository.
- Known limitation: Higher rate limits are tied to using an API key.
- General VS Code troubleshooting lives in the /clients/vscode guide.
Context7 — details. VS Code guide