mcp-connect

Cursor IDE Setup

This guide explains how to set up MCP Connect with the Cursor editor.

Prerequisites

Quick Setup

Step 1: Install MCP Extension

Install the MCP extension for Cursor (if not already installed):

  1. Open Cursor
  2. Go to Extensions (Ctrl+Shift+X / Cmd+Shift+X)
  3. Search for “MCP” or “Model Context Protocol”
  4. Install the official MCP extension

Step 2: Generate Configuration

Generate the Cursor configuration file:

mcp-connect generate --ide cursor

This creates or updates .vscode/settings.json in your project directory (Cursor uses the same directory structure as VSCode).

Step 3: Reload Window

Reload the Cursor window (Ctrl+R / Cmd+R) or restart Cursor for changes to take effect.

Step 4: Verify

  1. Open the MCP panel in Cursor
  2. Check that mcp-connect appears in the list of MCP servers
  3. Verify that all configured servers are accessible

Configuration Details

The generated configuration adds the following to .vscode/settings.json:

{
  "mcp.servers": {
    "mcp-connect": {
      "command": "/path/to/mcp-connect",
      "args": ["serve"]
    }
  }
}

Note: Cursor uses the same .vscode directory structure as VSCode, so configurations are compatible between both editors.

Custom Output Location

To specify a custom location for the settings file:

mcp-connect generate --ide cursor --output /path/to/settings.json

Workspace vs User Settings

The default configuration is written to .vscode/settings.json in your project directory. This is recommended because:

User Settings

To configure globally for all projects, use:

mcp-connect generate --ide cursor --output ~/.config/Cursor/User/settings.json

Or manually add to User Settings (File > Preferences > Settings > Open User Settings JSON):

{
  "mcp.servers": {
    "mcp-connect": {
      "command": "/absolute/path/to/mcp-connect",
      "args": ["serve"]
    }
  }
}

Manual Configuration

If you prefer to configure manually, add the following to .vscode/settings.json:

{
  "mcp.servers": {
    "mcp-connect": {
      "command": "/absolute/path/to/mcp-connect",
      "args": ["serve"]
    }
  }
}

Important:

Troubleshooting

MCP Connect Not Appearing

  1. Check extension: Ensure MCP extension is installed and enabled
  2. Check binary path: Verify the path in settings.json is correct
  3. Check permissions: Ensure mcp-connect is executable
  4. View output: Open Output panel and select “MCP” to see error messages

Servers Not Loading

  1. Verify configuration: Run mcp-connect config validate from terminal
  2. Test manually: Run mcp-connect serve --debug to see errors
  3. Check environment variables: Ensure .env file is in the project root
  4. Check MCP output: View MCP extension output for errors

Connection Errors

  1. Test connectivity: Run mcp-connect config test --all from terminal
  2. Check credentials: Verify tokens in .env are correct
  3. Network issues: Ensure you can reach the remote servers
  4. Check logs: Enable debug mode in Cursor MCP settings

Advanced Configuration

Custom Working Directory

If your .mcp-connect.json is in a different location:

{
  "mcp.servers": {
    "mcp-connect": {
      "command": "/path/to/mcp-connect",
      "args": ["serve"],
      "cwd": "/path/to/project"
    }
  }
}

Environment Variables

Set environment variables directly in Cursor config:

{
  "mcp.servers": {
    "mcp-connect": {
      "command": "/path/to/mcp-connect",
      "args": ["serve"],
      "env": {
        "GITHUB_TOKEN": "your-token-here",
        "CONTEXT7_API_KEY": "your-key-here"
      }
    }
  }
}

Note: Using .env file is recommended over hardcoding credentials.

Debug Mode

Enable debug logging for troubleshooting:

{
  "mcp.servers": {
    "mcp-connect": {
      "command": "/path/to/mcp-connect",
      "args": ["serve", "--debug"]
    }
  }
}

Updating Configuration

When you add or remove servers, regenerate the configuration:

mcp-connect generate --ide cursor

The command safely merges with existing settings, preserving other Cursor configuration.

Compatibility with VSCode

Since Cursor uses the same .vscode directory structure, configurations are compatible:

Multiple Projects

Each project can have its own .vscode/settings.json with different server configurations. This allows you to:

Integration with Cursor Features

MCP Connect works seamlessly with Cursor’s AI features:

Next Steps