VS Code Setup
Connect Context Repo to VS Code and access your prompts, documents, and collections directly from GitHub Copilot Chat. Setup takes about two minutes.
Connect Context Repo to VS Code and access your prompts, documents, and collections directly from GitHub Copilot Chat. Setup takes about two minutes.
Before you start: You'll need a Context Repo account with an API key, VS Code installed, and the GitHub Copilot extension enabled. VS Code 1.99 or later has built-in MCP support.
Get your API key
Go to Dashboard > Settings > API Keys and click Create API Key. Select the prompts.read and documents.read permissions, then copy the generated key. You'll need it in the next step.
Add the server config
Open (or create) the MCP configuration file at .vscode/mcp.json in your workspace. You can also use the global user config by running MCP: Open User Configuration from the Command Palette (Ctrl+Shift+P / Cmd+Shift+P).
Add the Context Repo MCP Server:
{
"servers": {
"context-repo": {
"command": "npx",
"args": ["-y", "context-repo-mcp"],
"env": {
"CONTEXTREPO_API_KEY": "cr_your_api_key_here"
}
}
}
}Replace cr_your_api_key_here with the API key you copied in the previous step.
If you already have other MCP servers configured, add the "context-repo" entry inside the existing "servers" object.
Verify the connection
VS Code should detect the new server automatically. If it doesn't, run MCP: List Servers from the Command Palette to check its status. Open a GitHub Copilot Chat and ask:
List my promptsYou should see your Context Repo prompts listed in the response. If you haven't created any prompts yet, the assistant will tell you the list is empty — that still means it's working.
What you can do
With Context Repo connected, you can ask your AI assistant to:
- List and search your prompts, documents, and collections
- Create new content directly from the conversation
- Use prompt templates with variables filled in contextually
- Search your knowledge base using semantic or keyword queries
- Explore documents chunk by chunk with Deep Search
- Manage versions — view history and restore previous versions
See the MCP Tools Reference for all 26 available tools.
Troubleshooting
Server not starting
Make sure you have Node.js 18 or later installed. Run node --version in your terminal to check. The npx command needs a working Node.js installation to download and run the MCP server package.
node --version
# Should print v18.x.x or higherTools don't appear in Copilot Chat
Run MCP: List Servers from the Command Palette. Context Repo should appear in the list. If the server shows an error status, check the output panel (MCP channel) for details. You may need to click Start to initialize the server.
Authentication errors
Double-check that your API key is correct and hasn't been revoked. You can generate a new key from Dashboard > Settings > API Keys. Make sure there are no extra spaces or line breaks in the CONTEXTREPO_API_KEY value.
Using the global config instead of workspace
If you'd rather configure Context Repo for all your projects, run MCP: Open User Configuration from the Command Palette and add the same server config there. The global config applies across all workspaces.
Claude Desktop Setup
Connect Context Repo to Claude Desktop and access your prompts, documents, and collections directly from Claude's interface. Setup takes about two minutes.
Windsurf Setup
Connect Context Repo to Windsurf and access your prompts, documents, and collections directly from Cascade. Setup takes about two minutes.