NitroStack Logo
/cli
/cursor

Cursor Command

Overview

The cursor command automatically configures your NitroStack MCP server inside Cursor IDE, allowing AI agents in Cursor to immediately discover and invoke your tools.

It writes configuration directly to .cursor/mcp.json (project-level) or ~/.cursor/mcp.json (global).


Usage

Bash
npx @nitrostack/cli cursor [options]
# or using alias:
nitrostack-cli c [options]

When run without flags in an interactive terminal, the command displays a guided prompt to select the connection type and scope.


Options

OptionShorthandDescriptionDefault
--global-gInstall configuration globally to ~/.cursor/mcp.jsonfalse
--local-lInstall configuration locally to .cursor/mcp.jsontrue
--type <type>-tConnection type: command, legacy-sse, or streamable-httpcommand
--url <url>-uCustom HTTP URL for legacy-sse or streamable-httpAuto-generated
--port <port>-pServer port used to generate default HTTP URL3000
--forceOverwrite existing configuration if server name already existsfalse

Connection Types

1. Direct Command (command) — Default for Local Dev

Cursor spawns the MCP server directly as a subprocess over standard I/O (STDIO):

JSON
{
  "mcpServers": {
    "my-server": {
      "command": "node",
      "args": ["/path/to/my-server/dist/index.js"]
    }
  }
}
Bash
nitrostack-cli cursor --type command

2. Streamable HTTP (streamable-http)

Connects Cursor to a running NitroStack server using the modern Streamable HTTP endpoint:

JSON
{
  "mcpServers": {
    "my-server": {
      "url": "http://localhost:3000/mcp"
    }
  }
}
Bash
nitrostack-cli cursor --type streamable-http --port 3000

3. Legacy SSE (legacy-sse)

Connects Cursor to the legacy Server-Sent Events endpoint:

JSON
{
  "mcpServers": {
    "my-server": {
      "url": "http://localhost:3000/sse"
    }
  }
}
Bash
nitrostack-cli cursor --type legacy-sse --port 3000

Next Steps