Context7 MCP Relay
Context7 MCP Relay pulls up-to-date, version-specific documentation and code examples straight from the source — and places them directly into your prompt as VSCode Language Model Tools, which means this extension works even if MCP was disabled in Github Copilot and VSCode
Usage
The Context7 MCP Relay is automatically registered when the extension activates. It provides the following capabilities:
Available Functions
context7_resolve-library-id
- Resolves a package/product name to a Context7-compatible library ID
context7_get-library-docs
- Fetches up-to-date documentation for a library
Features
This extension integrates with an MCP (Model Context Protocol) server to provide enhanced AI capabilities.
- Resolve library id: Resolves a package/product name to a Context7-compatible library ID and returns a list of matching libraries.
You MUST call this function before 'context7_get-library-docs' to obtain a valid Context7-compatible library ID UNLESS the user explicitly provides a library ID in the format '/org/project' or '/org/project/version' in their query.
Selection Process:
- Analyze the query to understand what library/package the user is looking for
- Return the most relevant match based on:
- Name similarity to the query (exact matches prioritized)
- Description relevance to the query's intent
- Documentation coverage (prioritize libraries with higher Code Snippet counts)
- Trust score (consider libraries with scores of 7-10 more authoritative)
Response Format:
- Return the selected library ID in a clearly marked section
- Provide a brief explanation for why this library was chosen
- If multiple good matches exist, acknowledge this but proceed with the most relevant one
- If no good matches exist, clearly state this and suggest query refinements
For ambiguous queries, request clarification before proceeding with a best-guess match.
- Get library docs: Fetches up-to-date documentation for a library. You must call 'context7_resolve-library-id' first to obtain the exact Context7-compatible library ID required to use this tool, UNLESS the user explicitly provides a library ID in the format '/org/project' or '/org/project/version' in their query.
Installation
From Marketplace
- Open VS Code
- Go to Extensions view (
Ctrl+Shift+X
/ Cmd+Shift+X
)
- Search for "Context7 MCP Relay"
- Click Install
From VSIX
- Download the
.vsix
file
- Open VS Code
- Go to Extensions view (
Ctrl+Shift+X
/ Cmd+Shift+X
)
- Click the "..." menu and select "Install from VSIX..."
- Select the downloaded
.vsix
file
Configuration
Configure the extension using these settings:
context7-mcp-relay.CONTEXT7_API_KEY
: Context7 API Key (Optional) for higher rate limits and private repositories (Get yours by creating an account at context7.com/dashboard
MCP Server Connection
This extension connects to an MCP server using the following configuration:
- Transport Type: http
- URL:
https://mcp.context7.com/mcp
Contributing
Contributions are welcome! Please visit https://github.com/Vijay-Nirmal/MCPCopilotRelay for guidelines.
About This Extension
This extension was generated using MCP Copilot Relay, a tool for creating VS Code extensions from Model Context Protocol servers.
Enjoy! 🚀