NitroStack Logo
/getting started
/connect to clients

Connect to Clients

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

1. 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:

JSON
{
  "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.

2. Cursor

To connect Cursor to your NitroStack server:

Option A: Automated Configuration via CLI

In your project directory, run:

Bash
npx @nitrostack/cli cursor

Option B: Manual Configuration

Create or edit .cursor/mcp.json in your project root:

JSON
{
  "mcpServers": {
    "my-server": {
      "url": "http://localhost:3000/mcp"
    }
  }
}

Start your server with npm run dev. Your tools will be discovered automatically in Cursor Composer.


3. 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:
JSON
{
  "mcp.servers": {
    "my-server": {
      "url": "http://localhost:3000/mcp"
    }
  }
}

4. ChatGPT / Web & Remote Clients

Connect web agents or remote orchestrators over Streamable HTTP:

  • Endpoint URL: http://localhost:3000/mcp (or your public HTTPS production URL)
  • Content Type: application/json
  • Protocol: JSON-RPC 2.0

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

Bash
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}'

Verification Checklist

  • Dev server is running on http://localhost:3000/mcp
  • Client configuration JSON file contains valid absolute paths or URLs
  • Client application was restarted after editing configuration
  • Tools appear in the client's tools menu or prompt window

Next Steps