For more detailed Cursor MCP configuration tutorials, please check the official Cursor documentation

Configuration Steps

Here’s a simple demonstration of the most basic configuration method. Make sure you have created the relevant directories and files:

1

Create Configuration Directory

mkdir -p .cursor
touch .cursor/mcp.json
2

Configure MCP Server

Add the following configuration to .cursor/mcp.json. Here we’ll use our own mock user service for testing:

{
  "mcpServers": {
    "user": {
      "url": "http://localhost:5235/gateway/user/sse"
    }
  }
}
3

Enable MCP Server

  1. Open Cursor settings
  2. Enable this MCP Server in the MCP section
  3. After enabling, you’ll see it become a small green dot
  4. It will also list the available Tools

Configuration Verification

After configuration is complete, you can see the following in Cursor’s settings interface:

Connection Status

Green dot indicates MCP Server connection is normal

Available Tools

The interface will display the list of available tools retrieved from MCP Gateway

Usage Example

Finally, you can try it in the Chat window, for example, ask it to help you register a user, then query that user’s information. If it works, you’re all set.

Example Conversation

Help me register a user Leo ifuryst@gmail.com
Help me query user ifuryst@gmail.com, if not found please register with username Leo

Through actual testing, we found that this mock service may cause model errors in some cases due to involving names and emails, resulting in inability to call. You can ignore this situation and configure actual APIs for use.

Common Issues

Advanced Configuration

For more complex use cases, you can configure multiple MCP Servers:

{
  "mcpServers": {
    "user-service": {
      "url": "http://localhost:5235/gateway/user/sse"
    },
    "order-service": {
      "url": "http://localhost:5235/gateway/order/sse"
    },
    "product-service": {
      "url": "http://localhost:5235/gateway/product/sse"
    }
  }
}

Each MCP Server corresponds to a business domain, which allows better organization and management of different functional modules.