S

S2 Netbox MCP

by J-MaFf · io.github.J-MaFf/s2-netbox-mcp

Enables MCP-compatible clients to query and manage LenelS2 S2 NetBox physical access-control systems via the NBAPI, with read-only tools by default and opt-in write/destructive operations.

npm Local · stdio GlamaOfficial MCP Registry High confidence

Install

Add to ~/Library/Application Support/Claude/claude_desktop_config.json

Windows / Linux path
Windows: %APPDATA%\Claude\claude_desktop_config.json
Linux: ~/.config/Claude/claude_desktop_config.json
{
  "mcpServers": {
    "io-github-j-maff-s2-netbox-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "s2-netbox-mcp"
      ],
      "env": {
        "NETBOX_BASE_URL": "<VALUE>",
        "NETBOX_USERNAME": "<VALUE>",
        "NETBOX_PASSWORD": "<YOUR_VALUE>",
        "NETBOX_ENABLE_WRITES": "false",
        "NETBOX_ENABLE_DESTRUCTIVE": "false",
        "NETBOX_API_PATH": "/nbws/goforms/nbapi",
        "NETBOX_EVENT_API_PATH": "<VALUE>",
        "NETBOX_ALLOW_INSECURE_TLS": "false",
        "NETBOX_UNLOCK_NAME_PREFIX": "MCP Unlock Window",
        "NETBOX_LIVE_TEST_PORTALKEY": "<VALUE>",
        "NETBOX_UNLOCK_HOLIDAY_GROUPS": "8,7,6",
        "NETBOX_DAILY_UNLOCK_NAME_PREFIX": "MCP Daily Unlock Window",
        "NETBOX_DAILY_UNLOCK_HOLIDAY_GROUP": "5"
      }
    }
  }
}

Restart Claude Desktop to activate the new server.

Add to .cursor/mcp.json (project) or ~/.cursor/mcp.json (global)

Windows / Linux path
Windows: .cursor\mcp.json (project) or %USERPROFILE%\.cursor\mcp.json (global)
Linux: .cursor/mcp.json (project) or ~/.cursor/mcp.json (global)
{
  "mcpServers": {
    "io-github-j-maff-s2-netbox-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "s2-netbox-mcp"
      ],
      "env": {
        "NETBOX_BASE_URL": "<VALUE>",
        "NETBOX_USERNAME": "<VALUE>",
        "NETBOX_PASSWORD": "<YOUR_VALUE>",
        "NETBOX_ENABLE_WRITES": "false",
        "NETBOX_ENABLE_DESTRUCTIVE": "false",
        "NETBOX_API_PATH": "/nbws/goforms/nbapi",
        "NETBOX_EVENT_API_PATH": "<VALUE>",
        "NETBOX_ALLOW_INSECURE_TLS": "false",
        "NETBOX_UNLOCK_NAME_PREFIX": "MCP Unlock Window",
        "NETBOX_LIVE_TEST_PORTALKEY": "<VALUE>",
        "NETBOX_UNLOCK_HOLIDAY_GROUPS": "8,7,6",
        "NETBOX_DAILY_UNLOCK_NAME_PREFIX": "MCP Daily Unlock Window",
        "NETBOX_DAILY_UNLOCK_HOLIDAY_GROUP": "5"
      }
    }
  }
}

Cursor usually picks up config changes automatically; if the server does not appear, reload the window.

Add to .mcp.json (project) or ~/.claude.json (global)

Windows / Linux path
Windows: .mcp.json (project) or %USERPROFILE%\.claude.json (global)
Linux: .mcp.json (project) or ~/.claude.json (global)
{
  "mcpServers": {
    "io-github-j-maff-s2-netbox-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "s2-netbox-mcp"
      ],
      "env": {
        "NETBOX_BASE_URL": "<VALUE>",
        "NETBOX_USERNAME": "<VALUE>",
        "NETBOX_PASSWORD": "<YOUR_VALUE>",
        "NETBOX_ENABLE_WRITES": "false",
        "NETBOX_ENABLE_DESTRUCTIVE": "false",
        "NETBOX_API_PATH": "/nbws/goforms/nbapi",
        "NETBOX_EVENT_API_PATH": "<VALUE>",
        "NETBOX_ALLOW_INSECURE_TLS": "false",
        "NETBOX_UNLOCK_NAME_PREFIX": "MCP Unlock Window",
        "NETBOX_LIVE_TEST_PORTALKEY": "<VALUE>",
        "NETBOX_UNLOCK_HOLIDAY_GROUPS": "8,7,6",
        "NETBOX_DAILY_UNLOCK_NAME_PREFIX": "MCP Daily Unlock Window",
        "NETBOX_DAILY_UNLOCK_HOLIDAY_GROUP": "5"
      }
    }
  }
}

The server will be available in the next Claude Code session.

Add to .vscode/mcp.json

Windows / Linux path
Windows: .vscode\mcp.json
Linux: .vscode/mcp.json
{
  "servers": {
    "io-github-j-maff-s2-netbox-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "s2-netbox-mcp"
      ],
      "env": {
        "NETBOX_BASE_URL": "<VALUE>",
        "NETBOX_USERNAME": "<VALUE>",
        "NETBOX_PASSWORD": "<YOUR_VALUE>",
        "NETBOX_ENABLE_WRITES": "false",
        "NETBOX_ENABLE_DESTRUCTIVE": "false",
        "NETBOX_API_PATH": "/nbws/goforms/nbapi",
        "NETBOX_EVENT_API_PATH": "<VALUE>",
        "NETBOX_ALLOW_INSECURE_TLS": "false",
        "NETBOX_UNLOCK_NAME_PREFIX": "MCP Unlock Window",
        "NETBOX_LIVE_TEST_PORTALKEY": "<VALUE>",
        "NETBOX_UNLOCK_HOLIDAY_GROUPS": "8,7,6",
        "NETBOX_DAILY_UNLOCK_NAME_PREFIX": "MCP Daily Unlock Window",
        "NETBOX_DAILY_UNLOCK_HOLIDAY_GROUP": "5"
      }
    }
  }
}

Reload the VS Code window to activate.

Add to ~/.codeium/windsurf/mcp_config.json

Windows / Linux path
Windows: %USERPROFILE%\.codeium\windsurf\mcp_config.json
Linux: ~/.codeium/windsurf/mcp_config.json
{
  "mcpServers": {
    "io-github-j-maff-s2-netbox-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "s2-netbox-mcp"
      ],
      "env": {
        "NETBOX_BASE_URL": "<VALUE>",
        "NETBOX_USERNAME": "<VALUE>",
        "NETBOX_PASSWORD": "<YOUR_VALUE>",
        "NETBOX_ENABLE_WRITES": "false",
        "NETBOX_ENABLE_DESTRUCTIVE": "false",
        "NETBOX_API_PATH": "/nbws/goforms/nbapi",
        "NETBOX_EVENT_API_PATH": "<VALUE>",
        "NETBOX_ALLOW_INSECURE_TLS": "false",
        "NETBOX_UNLOCK_NAME_PREFIX": "MCP Unlock Window",
        "NETBOX_LIVE_TEST_PORTALKEY": "<VALUE>",
        "NETBOX_UNLOCK_HOLIDAY_GROUPS": "8,7,6",
        "NETBOX_DAILY_UNLOCK_NAME_PREFIX": "MCP Daily Unlock Window",
        "NETBOX_DAILY_UNLOCK_HOLIDAY_GROUP": "5"
      }
    }
  }
}

Restart Windsurf (or refresh its MCP servers panel) to activate the new server.

Windsurf Next uses ~/.codeium/windsurf-next/mcp_config.json. Devin Desktop (the Windsurf rebrand) uses ~/.config/devin/mcp_config.json and imports the Windsurf file.

Add to ~/Library/Application Support/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json

Windows / Linux path
Windows: %APPDATA%\Code\User\globalStorage\saoudrizwan.claude-dev\settings\cline_mcp_settings.json
Linux: ~/.config/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json
{
  "mcpServers": {
    "io-github-j-maff-s2-netbox-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "s2-netbox-mcp"
      ],
      "env": {
        "NETBOX_BASE_URL": "<VALUE>",
        "NETBOX_USERNAME": "<VALUE>",
        "NETBOX_PASSWORD": "<YOUR_VALUE>",
        "NETBOX_ENABLE_WRITES": "false",
        "NETBOX_ENABLE_DESTRUCTIVE": "false",
        "NETBOX_API_PATH": "/nbws/goforms/nbapi",
        "NETBOX_EVENT_API_PATH": "<VALUE>",
        "NETBOX_ALLOW_INSECURE_TLS": "false",
        "NETBOX_UNLOCK_NAME_PREFIX": "MCP Unlock Window",
        "NETBOX_LIVE_TEST_PORTALKEY": "<VALUE>",
        "NETBOX_UNLOCK_HOLIDAY_GROUPS": "8,7,6",
        "NETBOX_DAILY_UNLOCK_NAME_PREFIX": "MCP Daily Unlock Window",
        "NETBOX_DAILY_UNLOCK_HOLIDAY_GROUP": "5"
      }
    }
  }
}

Cline reloads cline_mcp_settings.json automatically; if the server does not appear, reload the VS Code window.

Open it from Cline's MCP Servers panel → Configure. Roo Code uses a different file and format.

Configuration

Environment variables this server reads. Secrets stay on your machine.

NameRequiredDescription
NETBOX_BASE_URL Yes Base URL of the NetBox controller's web interface, e.g. https://netbox.example.internal. No trailing slash or path — the client appends NETBOX_API_PATH itself.
NETBOX_USERNAME Yes NBAPI session-login username.
NETBOX_PASSWORD secret Yes NBAPI session-login password. Never logged, never written to any tracked file.
NETBOX_ENABLE_WRITES No Set to true/1/yes to register the write tools. Unset (or any other value) leaves the server strictly read-only. Default: false
NETBOX_ENABLE_DESTRUCTIVE No Set to true/1/yes, together with NETBOX_ENABLE_WRITES, to additionally register the 11 destructive tools. Default: false
NETBOX_API_PATH No The NBAPI path appended to NETBOX_BASE_URL. The default is the verified path on NetBox 6.x controllers. Only set this to override the default — e.g. to the legacy, pre-6.x path /goforms/nbapi, which returns HTTP 410 Gone on 6.x controllers. A value without a leading / has one added automatically. Default: /nbws/goforms/nbapi
NETBOX_EVENT_API_PATH No Request path used only for trigger_event. Unset/empty tracks whatever NETBOX_API_PATH resolves to; a non-empty override is used verbatim (leading / added if missing) — e.g. the doc's pre-6.x Event API path /appd/nbapi, if your controller serves it separately.
NETBOX_ALLOW_INSECURE_TLS No Set to true/1/yes to accept a self-signed/on-prem TLS certificate. Explicit opt-in only — any other value (including unset) keeps normal certificate verification. Default: false
NETBOX_UNLOCK_NAME_PREFIX No Name prefix of every object the managed unlock window creates: the portal group (<prefix>), the time spec group (<prefix> time specs), and the per-segment holidays/time specs (<prefix> first/middle/last). 1-40 characters so the longest name fits the 64-character NAME limit. Default: MCP Unlock Window
NETBOX_LIVE_TEST_PORTALKEY No The PORTALKEY of the one door you designate safe to physically unlock during npm run test:live:write/npm run test:live:write:daily. Read only by those scripts, never by the server itself.
NETBOX_UNLOCK_HOLIDAY_GROUPS No The holiday groups reserved for the managed unlock window, in first,middle,last segment order. Must be 1-3 distinct integers in 1..8, comma-separated; reserve groups nothing else on the controller uses. Default: 8,7,6
NETBOX_DAILY_UNLOCK_NAME_PREFIX No Name prefix of every object the managed daily unlock window creates: the portal group (<prefix>), the time spec group (<prefix> time specs), and the one holiday/time spec (<prefix> schedule). 1-40 characters so the longest name fits the 64-character NAME limit. Default: MCP Daily Unlock Window
NETBOX_DAILY_UNLOCK_HOLIDAY_GROUP No The single holiday group reserved for the managed daily recurring unlock window. Must be a single integer in 1..8, and must not be a member of NETBOX_UNLOCK_HOLIDAY_GROUPS (the two features' reserved groups can never collide). Default: 5

Similar servers