Windsurf Setup
Connect Context Repo to Windsurf and access your prompts, documents, and collections directly from Cascade. Setup takes about two minutes.
Connect Context Repo to Windsurf and access your prompts, documents, and collections directly from Cascade. Setup takes about two minutes.
Before you start: You'll need a Context Repo account with an API key and Windsurf installed.
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 the Windsurf MCP configuration file. This file is located at:
~/.codeium/windsurf/mcp_config.jsonIf the file doesn't exist yet, create it. Add the Context Repo MCP Server:
{
"mcpServers": {
"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 in your config, add the "context-repo" entry inside the existing "mcpServers" object.
Restart Windsurf and verify
Restart Windsurf to load the new configuration. Open a Cascade chat and ask:
List my promptsYou should see your Context Repo prompts listed in the response. If you haven't created any prompts yet, Cascade will tell you the list is empty — that still means the connection is working.
What you can do
With Context Repo connected, you can ask Cascade 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 higherConfig file not found
The MCP config file lives at ~/.codeium/windsurf/mcp_config.json. If the .codeium/windsurf/ directory doesn't exist yet, create it:
mkdir -p ~/.codeium/windsurfThen create mcp_config.json with the JSON from the setup step above.
Authentication errors
Verify 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.
Tools don't appear in Cascade
Open the MCP settings panel by clicking the MCPs icon in the top-right menu of the Cascade panel. Context Repo should appear in the server list. If it shows an error, check the config file for JSON syntax issues and restart Windsurf.
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.
Other MCP Clients
Connect Context Repo to any MCP-compatible client using stdio, SSE, or Streamable HTTP transport. This guide covers the generic setup for clients not listed in our specific guides.