Cursor

Set up ContextPin with Cursor AI code editor.

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

  1. Open Cursor
  2. Press ⌘, (Mac) or Ctrl+, (Windows/Linux)
  3. Search for "MCP" or navigate to Features → MCP

Step 2: Add MCP Server

  1. Click Add MCP Server
  2. Enter a name: contextpin
  3. For the command, enter the path to ContextPin's MCP binary
  4. 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:

  1. Open Command Palette (⌘⇧P)
  2. Search "Open Settings (JSON)"
  3. Add the MCP configuration:
{
  "mcp.servers": {
    "contextpin": {
      "command": "/Applications/ContextPin.app/Contents/MacOS/contextpin-mcp",
      "args": ["--workspace", "YOUR_WORKSPACE_ID"]
    }
  }
}

Verify the Connection

  1. Restart Cursor after adding the configuration
  2. Open a new chat or composer session
  3. You should see ContextPin listed as an available tool
  4. 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

  1. Set context first — Start conversations by referencing relevant contexts
  2. Use specific contexts — Point to exactly which guidelines to follow
  3. 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