get/mcp/indexSearch ⌘K

How to add an MCP server to Cursor

To add an MCP server to Cursor, create .cursor/mcp.json in your project, or ~/.cursor/mcp.json for every project.

Steps

  1. Create .cursor/mcp.json in your project, or ~/.cursor/mcp.json for every project.
  2. Add the server under mcpServers: command/args/env for a local package, url/headers for a hosted server.
  3. Save the file; the server appears in Cursor's MCP settings.

Checked against Cursor's official MCP documentation on 2026-12-01.

Copy-paste examples

Example: Playwright MCP (local package)

Claude Desktop / Cursor (mcpServers JSON)
{
  "mcpServers": {
    "playwright-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@playwright/mcp"
      ]
    }
  }
}

From the Playwright MCP server page.

Example: GitHub (hosted (remote) server)

Cursor (mcpServers JSON)
{
  "mcpServers": {
    "github-mcp-server": {
      "url": "https://api.githubcopilot.com/mcp/"
    }
  }
}

From the GitHub server page.

Find a server

Every server page on getmcpindex has a ready-made setup for Cursor under Set up in your MCP client. Search all servers, browse categories or remote servers.