Cursor is an AI-powered code editor that supports MCP for enhanced context. This guide shows you how to connect ContextPin to Cursor.
Configuration
Cursor supports MCP configuration through its settings.
Step 1: Open Cursor Settings
- Open Cursor
- Press
⌘,(Mac) orCtrl+,(Windows/Linux) - Search for "MCP" or navigate to Features → MCP
Step 2: Add MCP Server
- Click Add MCP Server
- Enter a name:
contextpin - For the command, enter the path to ContextPin's MCP binary
- Add the workspace argument
Step 3: Configuration Values
macOS
Name: contextpin
Command: /Applications/ContextPin.app/Contents/MacOS/contextpin-mcp
Arguments: --workspace YOUR_WORKSPACE_ID Windows
Name: contextpin
Command: C:\Program Files\ContextPin\contextpin-mcp.exe
Arguments: --workspace YOUR_WORKSPACE_ID Linux
Name: contextpin
Command: /opt/contextpin/contextpin-mcp
Arguments: --workspace YOUR_WORKSPACE_ID
Get your workspace ID from ContextPin: Settings → MCP
Alternative: JSON Configuration
You can also add the configuration directly to Cursor's settings JSON:
- Open Command Palette (
⌘⇧P) - Search "Open Settings (JSON)"
- Add the MCP configuration:
{
"mcp.servers": {
"contextpin": {
"command": "/Applications/ContextPin.app/Contents/MacOS/contextpin-mcp",
"args": ["--workspace", "YOUR_WORKSPACE_ID"]
}
}
} Verify the Connection
- Restart Cursor after adding the configuration
- Open a new chat or composer session
- You should see ContextPin listed as an available tool
- Ask: "List my ContextPin contexts"
Using ContextPin in Cursor
In Chat Mode
Open Cursor's chat panel (⌘L) and reference your contexts:
"Read my Code Standards context and review the selected code"
"Using my API Guidelines, help me design this endpoint"
"Search my contexts for database migration patterns" In Composer Mode
When using Cursor's Composer for multi-file edits:
"Based on my Component Guidelines context, create a new UserProfile component
with tests following my Testing Strategy context" Inline Editing
Select code and use ⌘K for inline edits:
"Refactor this following my Code Standards from ContextPin" Using @ Mentions
Reference contexts directly:
"Using @contextpin[API Guidelines], create error handling for this endpoint" Recommended Workflow
- Set context first — Start conversations by referencing relevant contexts
- Use specific contexts — Point to exactly which guidelines to follow
- Iterate with context — Keep contexts available throughout the conversation
Troubleshooting
ContextPin Not Appearing
- Restart Cursor after configuration changes
- Verify the command path is correct
- Check that ContextPin is running
- Look for error messages in Cursor's Output panel (select "MCP")
Path Not Found
- Verify ContextPin is installed at the specified location
- Use absolute paths, not relative
- On Windows, use double backslashes or forward slashes
Empty Context List
- Create at least one context in ContextPin
- Verify the workspace ID matches your ContextPin workspace
- Check ContextPin's MCP status in Settings
Slow Response
- Make sure ContextPin is already running before starting Cursor
- Keep contexts focused and not too large
Pro Tips
- Pin important contexts — Create a "Current Project" context with key info
- Use cross-references — Link related contexts for comprehensive guidance
- Keep contexts updated — As your project evolves, update your contexts
Next Steps
- Keyboard Shortcuts — Speed up your workflow