Cursor

Cursor has native MCP support built in. Adding MCPGate gives your Cursor AI access to all your connected services — GitHub, Linear, Slack, and more — with full guardrail enforcement on every tool call.

Tip

Cursor supports OAuth for MCP servers. The recommended setup uses the base URL with no API key — Cursor will handle authentication automatically.

Setup

1

Create the Cursor MCP config file

Create a file at .cursor/mcp.json in your project root (for project-level config) or in your home directory at ~/.cursor/mcp.json (for global config):

.cursor/mcp.json
json
{
  "mcpServers": {
    "mcpgate": {
      "url": "https://api.mcpgate.sh/mcp"
    }
  }
}
2

Restart Cursor and authenticate

Restart Cursor. It will detect the new MCP server and prompt you to authenticate. Click Authenticate — your browser will open the MCPGate authorization page. Approve access and return to Cursor.

3

Verify the connection

Open the Cursor AI panel. MCPGate tools will now appear. Ask the AI to perform an action — such as searching your GitHub repositories — to confirm the integration is working.

Alternative: API Key Auth

If you prefer not to use OAuth, you can authenticate with an API key header instead. Replace mgw_YOUR_API_KEY with the key from your MCPGate dashboard:

.cursor/mcp.json
json
{
  "mcpServers": {
    "mcpgate": {
      "url": "https://api.mcpgate.sh/mcp",
      "headers": {
        "Authorization": "Bearer mgw_YOUR_API_KEY"
      }
    }
  }
}

Troubleshooting

If Cursor reports a connection error, verify the config file is valid JSON and that the URL is exactly https://api.mcpgate.sh/mcp. If tools appear but actions are blocked, open the Activity log in MCPGate to see the block reason and adjust your guardrail rules.