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:
- 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). - 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:
-
Open your Claude Desktop configuration file:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json
- macOS:
-
Add your server under
mcpServers:
{
"mcpServers": {
"my-server": {
"command": "node",
"args": ["/absolute/path/to/my-server/dist/index.js"]
}
}
}
- 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:
npx @nitrostack/cli cursor
Option B: Manual Configuration
Create or edit .cursor/mcp.json in your project root:
{
"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:
- Install the Model Context Protocol extension from the VS Code Marketplace.
- In VS Code Settings, add your server configuration:
{
"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:
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
- Interactive UI Widgets: Return rich visual widgets to clients that support UI rendering.
- Authentication: Add API key or OAuth 2.1 protection.
- Deploy to Production: Deploy your server to Docker or cloud platforms.