NetBox MCP

v0.4.0
io.github.mhajder/netbox-mcp Checked 12 hours ago Published 3 days ago

MCP server for NetBox DCIM/IPAM with read-only and dry-run modes

Values you need

VariableWhat it is
NETBOX_URLrequired NetBox base URL (e.g., https://netbox.example.com)
NETBOX_TOKENrequired secret NetBox API token: v2 (nbt_<key>.<token>, NetBox 4.5+) or legacy v1
NETBOX_VERIFY_SSLoptional Verify SSL certificates (true/false) Default: true
NETBOX_TIMEOUToptional Total time allowed for one NetBox request, retries included (seconds) Default: 30
NETBOX_USER_AGENToptional Custom User-Agent header for outbound NetBox HTTP requests
NETBOX_BRANCHING_ENABLEDoptional Enable netbox-branching support: branch tools and the 'branch' argument (requires the netbox-branching plugin) (true/false) Default: false
NETBOX_BRANCHoptional Default netbox-branching branch (name or schema ID) for every call; requires NETBOX_BRANCHING_ENABLED=true
NETBOX_PLUGIN_DISCOVERYoptional Discover plugin object types from /api/core/object-types/ (true/false) Default: false
READ_ONLY_MODEoptional Hide all write tools (create, update, delete) (true/false) Default: false
DRY_RUN_MODEoptional Write tools only simulate changes and never modify NetBox (true/false) Default: false
DISABLED_TAGSoptional Comma-separated tool tags to disable (e.g. delete,graphql,branching)
LOG_LEVELoptional Logging level (DEBUG, INFO, WARNING, ERROR, CRITICAL) Default: INFO
RESPONSE_MAX_SIZEoptional Maximum tool response size in bytes (unset = unlimited)
RATE_LIMIT_ENABLEDoptional Enable rate limiting Default: false
RATE_LIMIT_MAX_REQUESTSoptional Maximum requests per rate limit window Default: 60
RATE_LIMIT_WINDOW_MINUTESoptional Rate limit window in minutes Default: 1
TOOL_SEARCH_ENABLEDoptional Enable FastMCP tool search transform Default: false
TOOL_SEARCH_STRATEGYoptional Tool search strategy (bm25 or regex) Default: bm25
TOOL_SEARCH_MAX_RESULTSoptional Maximum tool search results returned by search_tools Default: 5
MCP_HTTP_PORToptional Port for HTTP server (default: 8000) Default: 8000

PyPI (uvx) discovery passed

Requires uv (https://docs.astral.sh/uv/)

Run in a terminal
claude mcp add netbox-mcp -e 'NETBOX_TOKEN=<NETBOX_TOKEN>' -e 'NETBOX_URL=<NETBOX_URL>' -- uvx netbox-mcp==0.4.0
Add to claude_desktop_config.json
{
  "mcpServers": {
    "netbox-mcp": {
      "args": [
        "netbox-mcp==0.4.0"
      ],
      "command": "uvx",
      "env": {
        "NETBOX_TOKEN": "<NETBOX_TOKEN>",
        "NETBOX_URL": "<NETBOX_URL>"
      }
    }
  }
}
Add to ~/.cursor/mcp.json
{
  "mcpServers": {
    "netbox-mcp": {
      "args": [
        "netbox-mcp==0.4.0"
      ],
      "command": "uvx",
      "env": {
        "NETBOX_TOKEN": "<NETBOX_TOKEN>",
        "NETBOX_URL": "<NETBOX_URL>"
      }
    }
  }
}
Add to .vscode/mcp.json
{
  "inputs": [
    {
      "description": "NETBOX_TOKEN",
      "id": "netbox-token",
      "password": true,
      "type": "promptString"
    },
    {
      "description": "NETBOX_URL",
      "id": "netbox-url",
      "password": true,
      "type": "promptString"
    }
  ],
  "servers": {
    "netbox-mcp": {
      "args": [
        "netbox-mcp==0.4.0"
      ],
      "command": "uvx",
      "env": {
        "NETBOX_TOKEN": "${input:netbox-token}",
        "NETBOX_URL": "${input:netbox-url}"
      },
      "type": "stdio"
    }
  }
}
Add to ~/.codex/config.toml
[mcp_servers.netbox-mcp]
command = "uvx"
args = ["netbox-mcp==0.4.0"]
env = { "NETBOX_TOKEN" = "<NETBOX_TOKEN>", "NETBOX_URL" = "<NETBOX_URL>" }

For AI agents

  1. Ask the user for: NETBOX_URL, NETBOX_TOKEN. Never invent or guess these values; secrets go into the client config, not into chat logs.
  2. Pick the user's MCP client and apply the matching config from the first install method (it is the one verified by the smoke test when available).
  3. Restart or reload the client so it starts the server.
  4. Verify: the server should expose these tools: netbox_list_object_types, netbox_get_objects, netbox_get_object, netbox_search_objects, netbox_describe_object_type, netbox_get_changelogs, netbox_get_status, netbox_graphql_query, ….
  5. If it fails, check that the required runtime is installed (uv (https://docs.astral.sh/uv/)) and that the values above are set.

Machine-readable: install.md · manifest.json