Connect to clients

Connect Claude Desktop, Cursor, and VS Code

Connect your running NitroStack MCP server to AI clients including Claude Desktop, Cursor, Visual Studio Code, and ChatGPT.

Transport Selection

MCP supports two standard transport protocols:

  1. Stdio (stdio): The client launches your server as a local child process communicating over standard input/output. Ideal for single-user desktop applications (Claude Desktop).
  2. Streamable HTTP (http): The client communicates over HTTP POST and Server-Sent Events (SSE). Ideal for web clients, multi-user deployments, remote servers, and IDE network connections.

Client Configuration

Each client stores its MCP servers in its own configuration file. Pick yours below.

Claude Desktop

To connect Claude Desktop to your local server over stdio:

  1. Open your Claude Desktop configuration file:

    • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
    • Windows: %APPDATA%\Claude\claude_desktop_config.json
  2. Add your server under mcpServers:

{
  "mcpServers": {
    "my-server": {
      "command": "node",
      "args": ["/absolute/path/to/my-server/dist/index.js"]
    }
  }
}
  1. Restart Claude Desktop. The hammer icon in the prompt input will display your registered tools.

Cursor

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

Run it from your project folder:

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

Every option is optional; without them, the command asks.

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

Direct Command (command): Default for Local Dev Cursor spawns the MCP server directly as a subprocess over standard I/O (STDIO):

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

Streamable HTTP (streamable-http) Connects Cursor to a running NitroStack server using the modern Streamable HTTP endpoint:

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

Legacy SSE (legacy-sse) Connects Cursor to the legacy Server-Sent Events endpoint:

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

Visual Studio Code

Connect via the official MCP extension:

  1. Install the Model Context Protocol extension from the VS Code Marketplace.
  2. In VS Code Settings, add your server configuration:
{
  "mcp.servers": {
    "my-server": {
      "url": "http://localhost:3000/mcp"
    }
  }
}

ChatGPT / Web & Remote Clients

Web agents and remote orchestrators connect over Streamable HTTP. Point them at http://localhost:3000/mcp while developing, or at your public HTTPS URL in production. Requests are JSON-RPC 2.0 messages sent as application/json.

When authentication is enabled (e.g. using ApiKeyModule or OAuthModule), pass the authorization credentials in standard headers:

curl -X POST http://localhost:3000/mcp \
  -H "Content-Type: application/json" \
  -H "X-API-Key: <YOUR_API_KEY>" \
  -d '{"jsonrpc": "2.0", "method": "tools/list", "id": 1}'

See also

On this page