Add an MCP server to Cursor, and fix one that will not show up

The mcp.json Cursor reads, global or per project, with a keyed server that keeps the key out of git, and the five causes of a server that never appears.

Updated 5 min readmcpcursorsetuptroubleshooting

Tested 28 October 2026 with the configs' command lines on Linux and Windows 11, Node 22 (the app itself not run)On this page: 1 live demo

The short answer

  1. Pick the file: ~/.cursor/mcp.json for every project, or .cursor/mcp.json in the project for this one only. Use one, not both, for the same server.
  2. Add the server under mcpServers: "command": "npx", "args": ["-y", "@modelcontextprotocol/server-everything"] for a local one, or "url" plus "headers" for a remote one.
  3. Write keys as ${env:NAME}, never the value.
  4. Reload the window (Command Palette → Developer: Reload Window) and check the server's toggle and tool count in Cursor's MCP settings.
  5. If it is missing or red, open Output (Cmd/Ctrl+Shift+U) → MCP Logs.

Cursor reads MCP servers from a JSON file with the same mcpServers shape Claude Desktop uses, so most configs copy across unchanged.

Live demoBuild your Cursor mcp.json

The live demo loads here when scripts run. The text below says what it shows.

Type your server's name and the command that starts it (or its URL and the name of the variable that holds its key), pick every project or this one, your computer, and copy the result. It applies exactly the rules on this page and runs in your browser: nothing is sent or saved. With scripts off, the examples below are the same shapes.

A local server

{
  "mcpServers": {
    "everything": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-everything"]
    }
  }
}

@modelcontextprotocol/server-everything is the MCP project's own test server: free, on npm, no key, with an echo tool. Start with it to prove the setup, then swap in the command your server's README gives.

A server that needs a key

A remote server takes url and headers. Cursor fills in ${env:NAME} from the environment it started with, so the file holds no secret and a project copy is safe to commit. The example is Clinamen's hosted server, which needs a Clinamen Signature key (sales open at launch); any server that takes a bearer key works the same way:

{
  "mcpServers": {
    "clinamen": {
      "url": "https://mcp.clinamen.dev/mcp",
      "headers": { "Authorization": "Bearer ${env:CLINAMEN_LICENCE_KEY}" }
    }
  }
}

The syntax is ${env:NAME} with the env: part. A bare ${NAME} (the Claude Code form) reaches the server as text, and a server that reports it says unexpanded. Cursor also understands ${userHome} and ${workspaceFolder} in paths.

The variable has to exist in the environment Cursor was started with. Set it in your shell profile or with setx on Windows, then quit Cursor fully and start it again. On a Mac, Cursor started from the Dock may not see a variable exported only in ~/.zshrc; starting it from a terminal (cursor .) always does.

For a stdio server, Cursor can also read a .env file: "envFile": "${workspaceFolder}/.env.local". That works for local servers only, not remote ones.

Five reasons a server does not show up

  1. The JSON is broken. A trailing comma after the last server stops the whole file. Run it through any JSON checker.
  2. Cursor did not reload. It reads mcp.json at start and on window reload. Edit, then Developer: Reload Window.
  3. The same server is in both files. Keep it in the global file or the project file, not both.
  4. The command fails. Paste command and args into a terminal. A working MCP server waits for input, printing nothing or one startup line; press Ctrl+C. An error there is the error Cursor got. On Windows, if MCP Logs show spawn npx ENOENT, use "command": "cmd", "args": ["/c", "npx", "-y", "@modelcontextprotocol/server-everything"].
  5. Too many tools. Agents get worse at choosing when dozens of tools are on. Turn off servers you are not using in this project from the MCP settings.

Then check it from the chat: ask the agent to "call the echo tool of the everything server with hello". It should answer Echo: hello. A keyed server is only proven once one of its tools answers: Clinamen's hosted server, for one, connects with a missing key and then says why it refused it.

Something here did not work?

Every command on this page was run before it was published, on the systems named in "How we tested this". If a step fails for you, write to [email protected] with what you ran and what you saw, and we will fix the page.