Visual Studio Code with GitHub Copilot can use ContextPin through MCP extensions. This guide shows you how to set up the integration.
MCP Extension for VS Code
VS Code requires an MCP extension to connect to servers like ContextPin. Several community extensions provide this functionality.
Step 1: Install MCP Extension
- Open VS Code Extensions (
⌘⇧X) - Search for "MCP Client" or "Model Context Protocol"
- Install a compatible extension
The MCP ecosystem is evolving. Check the VS Code marketplace for the latest MCP extensions.
Step 2: Configure the Extension
After installation, configure the extension with your ContextPin settings:
- Open VS Code Settings (
⌘,) - Search for the MCP extension settings
- Add ContextPin as a server
Configuration Values
Add this to your VS Code settings.json:
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"]
}
}
} Using with Copilot Chat
Once configured, you can reference ContextPin in Copilot Chat:
Opening Copilot Chat
- Click the Copilot icon in the sidebar
- Or use keyboard shortcut
⌘⇧I
Referencing Contexts
"@contextpin list contexts"
"Read my Code Standards from @contextpin"
"Using @contextpin API Guidelines, help me design this endpoint" Enhancing Inline Suggestions
While inline Copilot suggestions don't directly access MCP, you can:
- Use Copilot Chat to generate code following your contexts
- Copy the result into your file
- Or ask Copilot Chat to apply changes directly
Alternative: Direct API Integration
If MCP extensions aren't available or suitable, you can:
Use Workspace Files
Export your contexts as markdown files in your project:
- In ContextPin, select a context
- Export as Markdown
- Save in your project (e.g.,
.docs/folder) - Copilot can then reference these files naturally
Use Copilot Instructions
Create a .github/copilot-instructions.md file:
# Copilot Instructions
When generating code for this project, follow these guidelines:
## Code Standards
- Use TypeScript with strict mode
- Follow functional patterns
- Max function length: 30 lines
## Naming Conventions
- Components: PascalCase
- Functions: camelCase
- Constants: SCREAMING_SNAKE_CASE Verify the Setup
- Restart VS Code after configuration changes
- Open Copilot Chat
- Try: "@contextpin list my contexts"
- If successful, you'll see your ContextPin contexts
Troubleshooting
Extension Not Working
- Check the extension's documentation for specific setup steps
- Verify the extension is enabled
- Look for error messages in VS Code's Output panel
No Connection to ContextPin
- Make sure ContextPin is running
- Verify the command path is correct
- Check the workspace ID
Copilot Not Recognizing MCP
- MCP support in Copilot may require specific extensions
- Consider using the alternative approaches above
- Check for updates to Copilot that may add MCP support
Current Status
Native MCP support in VS Code and GitHub Copilot is still evolving. Check the latest documentation for your specific extensions, as capabilities may have expanded since this guide was written.
Next Steps
- Other MCP Clients — Explore more options