Windsurf is Codeium's AI-native IDE with Cascade, a powerful agentic AI. This guide shows you how to connect ContextPin to Windsurf for enhanced context.
Configuration
Windsurf uses MCP configuration similar to other VS Code-based editors.
Step 1: Open Settings
- Open Windsurf
- Press
⌘,(Mac) orCtrl+,(Windows/Linux) - Search for "MCP" in settings
Step 2: Add MCP Configuration
Add ContextPin as an MCP server. You may need to edit the settings JSON directly:
- Open Command Palette (
⌘⇧P) - Search "Preferences: Open Settings (JSON)"
- Add the MCP configuration
Configuration Values
macOS
{
"mcp.servers": {
"contextpin": {
"command": "/Applications/ContextPin.app/Contents/MacOS/contextpin-mcp",
"args": ["--workspace", "YOUR_WORKSPACE_ID"]
}
}
} Windows
{
"mcp.servers": {
"contextpin": {
"command": "C:\\Program Files\\ContextPin\\contextpin-mcp.exe",
"args": ["--workspace", "YOUR_WORKSPACE_ID"]
}
}
} Linux
{
"mcp.servers": {
"contextpin": {
"command": "/opt/contextpin/contextpin-mcp",
"args": ["--workspace", "YOUR_WORKSPACE_ID"]
}
}
}
Get your workspace ID from ContextPin: Settings → MCP
Step 3: Restart Windsurf
After saving the configuration, restart Windsurf for changes to take effect.
Verify the Connection
- Open Windsurf's Cascade panel
- Ask: "List my ContextPin contexts"
- You should see your contexts listed
Using ContextPin with Cascade
Basic Usage
Cascade can access your contexts when you reference them:
"Read my API Guidelines context"
"Based on my Code Standards, review this function"
"Search my contexts for database patterns" Using with Flows
When Cascade creates multi-step flows, your contexts inform each step:
"Using my Component Guidelines and Testing Strategy, create a new
UserDashboard component with full test coverage" Agentic Tasks
For complex, multi-file operations:
"Refactor the authentication module following my Auth Flow context.
Update all related tests according to my Testing Strategy." Tips for Cascade
Set Context Early
Start flows by establishing relevant context:
"I'm working on the payment system. Please read my Payment Flow
and Error Handling contexts first, then help me add refund support." Be Specific
Reference exactly which contexts apply:
"Using @[API Guidelines] specifically the 'Error Response Format'
section, create error handling for this endpoint" Iterate with Context
Cascade maintains context through the conversation:
You: "Read my Database Schema context"
Cascade: [reads context]
You: "Now add a comments table that follows this schema"
Cascade: [creates migration using the context]
You: "Add the API endpoints for comments"
Cascade: [uses both schema and API patterns from context] Troubleshooting
MCP Server Not Found
- Verify the command path exists
- Check that ContextPin is running
- Restart Windsurf after configuration changes
Configuration Not Loading
- Check JSON syntax (no trailing commas)
- Verify the settings file path
- Try re-adding the configuration
No Response from ContextPin
- Make sure ContextPin is running
- Check the workspace ID is correct
- Look for errors in Windsurf's Output panel
Best Practices
- Keep contexts focused — One topic per context for faster lookups
- Use cross-references — Link related contexts together
- Update regularly — Keep contexts in sync with your codebase
- Name clearly — Use descriptive names for easy reference
Next Steps
- Keyboard Shortcuts — Speed up your workflow