KyttoMCP / MCP config file locations / Cursor MCP setup

Reference · Cursor

Cursor MCP server setup: mcp.json location and examples

Add MCP servers to Cursor in ~/.cursor/mcp.json for all projects, or .cursor/mcp.json for one project. Both use a mcpServers JSON object. This guide covers local commands, remote URLs, environment variables and the enable toggle in Cursor.

Paths and configuration checked against Cursor’s documentation · Updated 15 November 2026

Cursor MCP configuration
WhatmacOSWindows
Global config~/.cursor/mcp.json%USERPROFILE%\.cursor\mcp.json
Project config.cursor/mcp.json in the project root
Format and keyPlain JSON, servers under mcpServers

Global or project? A server in ~/.cursor/mcp.json is available everywhere; one in a project’s .cursor/mcp.json belongs to that project. Cursor’s documentation does not say which one wins when both define the same name, so give a server the same name in both places only if you can tell which one you are testing.

How to add an MCP server in Cursor

Create the global or project file shown above, then add a server definition. Open Customize in Cursor to check its status and enable it. Use the command or URL supplied by the server’s maintainer; only run local servers you trust.

Local server: mcp.json example

A local (stdio) server has a command, optional args and optional env. A remote server has a url and optional headers.

{
  "mcpServers": {
    "my-server": {
      "type": "stdio",
      "command": "python",
      "args": ["mcp-server.py"],
      "env": { "API_KEY": "value" }
    }
  }
}

Remote server: URL example

{
  "mcpServers": {
    "my-remote": {
      "url": "https://example.com/mcp"
    }
  }
}

These are templates: replace mcp-server.py or the example URL with your server’s actual path or endpoint. Keep existing servers in the same mcpServers object.

Variables you can use

Cursor expands these in command, args, env, url and headers, which keeps secrets and machine-specific paths out of a file you commit:

The on/off toggle is not in the file

Cursor lets you switch a server off without removing it, from Customize in the sidebar. That state is stored inside Cursor, not in mcp.json. The file can look completely correct while the server is switched off in the interface, and editing the file cannot turn it back on. If a server is in the file and not running, check the toggle first.

Smaller things that cost time