NetBox MCP
v0.4.0MCP server for NetBox DCIM/IPAM with read-only and dry-run modes
Values you need
| Variable | What it is | |
|---|---|---|
NETBOX_URL | required | NetBox base URL (e.g., https://netbox.example.com) |
NETBOX_TOKEN | required secret | NetBox API token: v2 (nbt_<key>.<token>, NetBox 4.5+) or legacy v1 |
NETBOX_VERIFY_SSL | optional | Verify SSL certificates (true/false) Default: true |
NETBOX_TIMEOUT | optional | Total time allowed for one NetBox request, retries included (seconds) Default: 30 |
NETBOX_USER_AGENT | optional | Custom User-Agent header for outbound NetBox HTTP requests |
NETBOX_BRANCHING_ENABLED | optional | Enable netbox-branching support: branch tools and the 'branch' argument (requires the netbox-branching plugin) (true/false) Default: false |
NETBOX_BRANCH | optional | Default netbox-branching branch (name or schema ID) for every call; requires NETBOX_BRANCHING_ENABLED=true |
NETBOX_PLUGIN_DISCOVERY | optional | Discover plugin object types from /api/core/object-types/ (true/false) Default: false |
READ_ONLY_MODE | optional | Hide all write tools (create, update, delete) (true/false) Default: false |
DRY_RUN_MODE | optional | Write tools only simulate changes and never modify NetBox (true/false) Default: false |
DISABLED_TAGS | optional | Comma-separated tool tags to disable (e.g. delete,graphql,branching) |
LOG_LEVEL | optional | Logging level (DEBUG, INFO, WARNING, ERROR, CRITICAL) Default: INFO |
RESPONSE_MAX_SIZE | optional | Maximum tool response size in bytes (unset = unlimited) |
RATE_LIMIT_ENABLED | optional | Enable rate limiting Default: false |
RATE_LIMIT_MAX_REQUESTS | optional | Maximum requests per rate limit window Default: 60 |
RATE_LIMIT_WINDOW_MINUTES | optional | Rate limit window in minutes Default: 1 |
TOOL_SEARCH_ENABLED | optional | Enable FastMCP tool search transform Default: false |
TOOL_SEARCH_STRATEGY | optional | Tool search strategy (bm25 or regex) Default: bm25 |
TOOL_SEARCH_MAX_RESULTS | optional | Maximum tool search results returned by search_tools Default: 5 |
MCP_HTTP_PORT | optional | 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.0Add 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
- Ask the user for: NETBOX_URL, NETBOX_TOKEN. Never invent or guess these values; secrets go into the client config, not into chat logs.
- 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).
- Restart or reload the client so it starts the server.
- 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, ….
- 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