Skip to main content

Configuring MCP Server with Cursor IDE

Overview

Cursor IDE provides built-in support for Model Context Protocol (MCP) servers, enabling AI-powered development workflows. This guide shows you how to connect your Cequence AI Gateway MCP server to Cursor.

Configuration Steps

1. Open Cursor Settings

Method 1: Keyboard Shortcut

  • macOS: Press Cmd + ,
  • Windows/Linux: Press Ctrl + ,

Method 2: Menu

  • Click on Cursor in the menu bar
  • Select Settings

2. Navigate to MCP Configuration

  1. In the Settings panel, navigate to Tools & Integrations
  2. Click on MCP Servers or New MCP Server
  3. Click Add Server or the + button

3. Add Configuration

Add your MCP server configuration in JSON format:

{
"mcpServers": {
"your-server-name": {
"command": "npx",
"args": [
"-y",
"@cequenceai/mcp-remote",
"your-mcp-server-url"
]
}
}
}

4. Configuration Parameters

Replace the following placeholders:

  • your-server-name: A descriptive name for your MCP server (e.g., "github-actions", "jira-automation", "slack-bot")
  • your-mcp-server-url: The URL provided by Cequence AI Gateway after creating your MCP server

5. Multiple MCP Servers

To add multiple MCP servers in Cursor:

{
"mcpServers": {
"github": {
"command": "npx",
"args": ["-y", "@cequenceai/mcp-remote", "https://your-github-mcp-url"]
},
"jira": {
"command": "npx",
"args": ["-y", "@cequenceai/mcp-remote", "https://your-jira-mcp-url"]
},
"gitlab": {
"command": "npx",
"args": ["-y", "@cequenceai/mcp-remote", "https://your-gitlab-mcp-url"]
}
}
}

6. Save and Restart

  1. Click Save or Apply
  2. Restart Cursor IDE for the changes to take effect (if required)

Alternative: Direct Config File Edit

Cursor also stores MCP configuration in a settings file that you can edit directly:

macOS/Linux:

~/.cursor/config/mcp.json

Windows:

%USERPROFILE%\.cursor\config\mcp.json

Edit this file with the same JSON structure shown above.

Verification

Once configured, verify your MCP server integration:

  1. Open the Cursor AI chat panel
  2. Type a command related to your configured service
  3. Check if the AI assistant can access your MCP server tools
  4. Look for MCP server indicators in the Cursor status bar

Using MCP Servers in Cursor

In Chat Panel

Ask questions or give commands that leverage your MCP server:

"List my open GitHub pull requests"
"Create a new Jira ticket for bug fix"
"Get latest commits from main branch"

In Code Editor

Use AI features that can interact with your MCP servers:

  • Code suggestions based on your project data
  • Automated refactoring with context from your tools
  • Documentation generation using your API data

Troubleshooting

MCP Server Not Loading

Issue: MCP server configuration doesn't appear or load

Solutions:

  • Verify JSON syntax is correct (no trailing commas, proper quotes)
  • Check the MCP server URL is correct and accessible
  • Restart Cursor completely (quit and relaunch)
  • Check Cursor's developer console for errors (View → Developer → Toggle Developer Tools)

Connection Issues

Issue: "Cannot connect to MCP server"

Solutions:

  • Verify your internet connection
  • Ensure the MCP server is deployed and running
  • Check firewall settings aren't blocking connections
  • Verify your authentication is valid

NPX Not Found

Issue: "npx command not recognized"

Solutions:

  • Install Node.js: nodejs.org
  • Verify installation: Open terminal and run node --version
  • Ensure npx is available: npx --version
  • Restart Cursor after installing Node.js

MCP Tools Not Appearing

Issue: MCP server connected but tools don't show up

Solutions:

  • Check if the MCP server has any endpoints configured
  • Verify OAuth authentication is completed (if required)
  • Review MCP server logs in Cequence AI Gateway
  • Ensure proper permissions are set for the API integration

Configuration File Location

If you prefer to edit the config file directly, create it if it doesn't exist:

macOS/Linux:

mkdir -p ~/.cursor/config/
touch ~/.cursor/config/mcp.json

Windows (PowerShell):

New-Item -ItemType Directory -Force -Path "$env:USERPROFILE\.cursor\config"
New-Item -ItemType File -Force -Path "$env:USERPROFILE\.cursor\config\mcp.json"

Example Configuration

Here's a complete example with multiple MCP servers for development:

{
"mcpServers": {
"github-devops": {
"command": "npx",
"args": [
"-y",
"@cequenceai/mcp-remote",
"https://mcp.aigateway.cequence.ai/v1/servers/github-abc123"
]
},
"jira-project": {
"command": "npx",
"args": [
"-y",
"@cequenceai/mcp-remote",
"https://mcp.aigateway.cequence.ai/v1/servers/jira-xyz789"
]
}
}
}

Best Practices

  1. Descriptive Names: Use clear, descriptive names for your MCP servers
  2. Organization: Group related servers (e.g., all dev tools, all monitoring tools)
  3. Security: Don't share your MCP server URLs publicly
  4. Testing: Test each server individually before adding multiple servers
  5. Documentation: Keep track of which MCP server does what

Additional Resources