Best AI Code Tools

How to set up MCP servers in Cursor

Updated Oct 26, 2026 · Sources listed at the end

In Cursor you can install MCP servers in one click from the Cursor Marketplace (via Customize), or define them yourself in an mcp.json file: .cursor/mcp.json in a project for project-specific tools, or ~/.cursor/mcp.json in your home folder for tools available everywhere.1

Example mcp.json (local server)

{
  "mcpServers": {
    "server-name": {
      "command": "npx",
      "args": ["-y", "mcp-server"],
      "env": { "API_KEY": "value" }
    }
  }
}

The same file can launch a Python server with "command": "python".1

Transports Cursor supports

TransportRunsAuth
stdioLocally, Cursor manages itManual
SSELocal or remote serverOAuth
Streamable HTTPLocal or remote serverOAuth

Values in mcp.json can use variables such as ${workspaceFolder} and ${userHome}.1 Team admins can distribute servers through a team marketplace.1

Footnotes

  1. Cursor docs, Model Context Protocol. ↩ ↩2 ↩3 ↩4

Tools mentioned

Sources

  1. Cursor docs: Model Context Protocol

Related lists

Related comparisons and alternatives

Related guides