Context7 MCP setup: check the library and version
Start with a library from your project. Check its identifier, version and original source before adopting an example.
Instructions for the wrong major version can look convincing while missing the needs of your project. First record the package name, the installed version from your lockfile and a specific question. A small, repeatable request is easier to assess than a general request for every piece of documentation.
Connect Context7 using OAuth
Context7 documents https://mcp.context7.com/mcp/oauth for clients that support MCP OAuth. The example below uses that sign-in method. Save it in .vscode/mcp.json, start the connection in the editor and complete sign-in in your browser. If the file already exists, add the entry to its existing servers object.
{
"servers": {
"context7": {
"type": "http",
"url": "https://mcp.context7.com/mcp/oauth"
}
}
}
Use the VS Code guide for the initial setup. If your client does not open the expected sign-in flow, check its OAuth support and the exact URL first. Context7 also documents API key connections; keep their settings separate from this OAuth example.
Choose the library before retrieving content
The documented tools are resolve-library-id and query-docs. Resolve the library name first, then use the returned identifier for your documentation question. A similar name may refer to a different project, so compare the associated source as well.
| Detail | Where to find it | What to compare |
|---|---|---|
| Package and version | Your project lockfile | The major version actually installed |
| Library identifier | Library search response | Project identity and source |
| Source passage | Answer to the specific question | Original URL and section |
Make your first request reproducible
Choose a function whose behaviour you already know from your project. Write down the question with its package and version, leaving out private project material.
Resolve the library name. Record the selected identifier and explain why its source fits when several results have similar names.
Ask about that specific function. Compare its parameters and return value with the linked original documentation and the version used by your project.
Check a small example in a separate test file. Record the source, version reference, retrieval date and outcome so you can repeat the exercise after an update.
Keep missing version information visible
If the source does not establish a clear version reference, leave that point unresolved. A current web page does not automatically describe an older installation. The documentation server comparison shows which details to record when working with other sources too.
- Do I have to guess a library identifier?
- No. Begin with library search and use an identifier returned by that tool. Check the source before building the documentation request around the result.
- Is every package version available?
- Do not infer that from a successful request. Check whether the specific result belongs to your requested version. If the match is unclear, keep it on your verification list.
- Why does no sign-in window appear?
- Check the complete OAuth endpoint and client support. Opening the URL in an ordinary browser tab does not replace establishing an MCP connection.
- Should I immediately adopt the returned example?
- First compare import paths, parameters and prerequisites. Run a bounded test outside your main workflow and record any differences you observe.
Use the Context7 registry search to find additional declarations. Compare the package information and sources with your selected connection.
Vendor documentation read on 3 October 2026. Run the proposed checks in your own environment.
- Context7: MCP clients and OAuth
Show retrieval command
curl -s https://context7.com/docs/resources/all-clients - Context7: tools and library selection
Show retrieval command
curl -s https://github.com/upstash/context7 - VS Code: MCP configuration
Show retrieval command
curl -s https://code.visualstudio.com/docs/agent-customization/mcp-servers