NetBox MCP Server
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| LOG_LEVEL | No | Logging level for the server. | INFO |
| NETBOX_URL | Yes | The base URL of the NetBox instance, e.g. https://netbox.example.com | |
| SENTRY_DSN | No | Sentry DSN for error tracking and performance monitoring. Leave unset to disable Sentry. | |
| DRY_RUN_MODE | No | Set to true to make every write tool only simulate the change and never modify NetBox. | false |
| NETBOX_TOKEN | Yes | NetBox API token. v2 tokens (nbt_<key>.<token>, NetBox 4.5+) are sent as Bearer; legacy v1 tokens as Token. | |
| SSL_CERT_DIR | No | Path to a custom CA certificate directory. Takes precedence over OS trust store when set. | |
| DISABLED_TAGS | No | Comma-separated list of tool tags to disable, e.g. delete,graphql,branching. | |
| MCP_HTTP_HOST | No | Host to bind the HTTP server when using SSE or HTTP transport. | 127.0.0.1 |
| MCP_HTTP_PORT | No | Port to bind the HTTP server when using SSE or HTTP transport. | 8000 |
| MCP_TRANSPORT | No | MCP transport type: stdio, sse, or http. | stdio |
| NETBOX_BRANCH | No | Default branch name or schema ID used by every call; empty means main. Requires NETBOX_BRANCHING_ENABLED=true. | |
| SSL_CERT_FILE | No | Path to a custom CA certificate file. Takes precedence over OS trust store when set. | |
| NETBOX_TIMEOUT | No | Total time allowed for one NetBox request, retries included (seconds). | 30 |
| READ_ONLY_MODE | No | Set to true to hide all write tools (create, update, delete). | false |
| SENTRY_RELEASE | No | Sentry release version. Auto-detected from package if not set. | |
| NETBOX_VERIFY_SSL | No | Enable or disable SSL certificate verification for NetBox requests. | true |
| RESPONSE_MAX_SIZE | No | Maximum tool response size in bytes; larger responses are truncated. Empty means unlimited. | |
| RATE_LIMIT_ENABLED | No | Set to true to enable rate limiting. | false |
| SENTRY_ENABLE_LOGS | No | Enable log capture as Sentry breadcrumbs and events. | true |
| SENTRY_ENVIRONMENT | No | Sentry environment name, e.g. production or staging. | |
| TOOL_SEARCH_ENABLED | No | Set to true to replace full tool listings with search_tools + call_tool. | false |
| TOOL_SEARCH_STRATEGY | No | Search strategy: bm25 (natural language) or regex (pattern match). | bm25 |
| MCP_HTTP_BEARER_TOKEN | No | Optional bearer token for HTTP transport authentication. Leave empty for no auth. | |
| NETBOX_PLUGIN_DISCOVERY | No | Set to true to expose plugin models (e.g. netbox_dns.zone) via object type discovery. | false |
| RATE_LIMIT_MAX_REQUESTS | No | Maximum requests allowed per rate limit window. | 60 |
| SENTRY_SEND_DEFAULT_PII | No | Include personally identifiable information in Sentry events. | true |
| TOOL_SEARCH_MAX_RESULTS | No | Maximum number of tools returned by search_tools. | 5 |
| NETBOX_BRANCHING_ENABLED | No | Set to true to enable netbox-branching plugin support and branch tools/arguments. | false |
| SENTRY_PROFILE_LIFECYCLE | No | Sentry profiling lifecycle mode: all, continuation, or trace. | trace |
| RATE_LIMIT_WINDOW_MINUTES | No | Rate limit window size in minutes. | 1 |
| SENTRY_TRACES_SAMPLE_RATE | No | Sentry performance monitoring sample rate (0.0-1.0). | 1.0 |
| SENTRY_PROFILE_SESSION_SAMPLE_RATE | No | Sentry continuous profiling sample rate (0.0-1.0). | 1.0 |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This MCP server exposes tools for the NetBox DCIM/IPAM API. Generic tools (netbox_get_objects, netbox_get_object, netbox_create_object, ...) work for every object type, named 'app.model' (e.g. 'dcim.device', 'ipam.prefix'). Always pass 'fields' when listing objects to keep responses small, and resolve related objects to numeric IDs before filtering or writing. Use netbox_describe_object_type before a write to learn the required fields.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
| logging | {} |
| prompts | {
"listChanged": true
} |
| resources | {
"subscribe": false,
"listChanged": true
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| netbox_list_object_typesA | List the NetBox object types these tools accept, with their API endpoints. Types are named 'app.model' (e.g. 'dcim.device'). Plugin types appear when the server runs with plugin discovery enabled. |
| netbox_get_objectsA | List NetBox objects of one type, with filtering and pagination. Returns 'results' plus 'total' (all matches) and 'has_more'/'next_offset'. Results are paginated - check 'has_more' before concluding. To count objects cheaply use fields=['id'] and limit=1 and read 'total'. |
| netbox_get_objectC | Get one NetBox object by type and ID. |
| netbox_search_objectsA | Search several NetBox object types at once with NetBox's 'q' filter. Returns results keyed by object type. A '_meta' key appears when some types failed ('errors' - treat as unknown, NOT as "no match") or had more matches than 'limit' ('truncated' - the full count per type). |
| netbox_describe_object_typeA | Describe the writable fields of an object type: type, required, choices. Call this before creating or updating an object to build a valid payload. Foreign keys take the related object's numeric ID. |
| netbox_get_changelogsA | List change log entries (who changed what and when), newest first. Each entry has action (create/update/delete), user_name, time, changed_object_type/id and object_repr. Entries of one request share a request_id. Set include_data to see what exactly changed. |
| netbox_get_statusA | Get NetBox version, installed plugins and apps, worker status and the authenticated user. Also reports this server's read-only/dry-run modes. |
| netbox_graphql_queryA | Run a read-only GraphQL query against NetBox's /graphql/ endpoint. Use it to fetch nested data that would otherwise need many REST calls. Mutations and subscriptions are rejected. Always paginate large lists, e.g. device_list(pagination: {limit: 50}). |
| netbox_get_availableA | List free IPs, child prefixes, VLAN IDs or ASNs in a pool. Examples: free IPs in prefix 12 -> ('ipam.prefix', 12, 'ips'); free /24s in a prefix -> ('ipam.prefix', 12, 'prefixes'); free VLAN IDs in group 3 -> ('ipam.vlangroup', 3, 'vlans'). |
| netbox_trace_cableA | Trace cable paths from a port through patch panels and circuits. For an interface, console, power port/outlet or power feed: the path from it to the far end, one hop (near end, cable, far end) per segment. For a pass-through port (front/rear port, circuit termination): every cable path running through it, each as its list of nodes. |
| netbox_render_configA | Render the configuration of a device or VM from its assigned config template (NetBox config templates + config context). Changes nothing, but NetBox only allows it for API tokens with write enabled. |
| netbox_find_rack_spaceA | Find racks with room for a device of a given height. Counts devices on the chosen face (and full-depth devices on the other) and rack reservations as taken. Lists the bottom-up start positions where the device fits. Give at least one of site_id, location_id or rack_ids. |
| netbox_get_prefix_utilizationA | Get the utilization of prefixes, as shown in the NetBox UI. A container counts the address space of its child prefixes; any other prefix counts its IP addresses plus IP ranges marked utilized. NetBox's REST API does not return this, so it is computed from the children. |
| netbox_create_objectA | Create one NetBox object. Returns the created object. Look up related objects first (netbox_get_objects) and pass their IDs. |
| netbox_update_objectA | Update fields of one NetBox object (partial update). Returns the updated object. |
| netbox_bulk_create_objectsA | Create many objects of one type in a single transaction (all or nothing). Returns the IDs of the created objects. |
| netbox_bulk_update_objectsB | Update many objects of one type in a single transaction (all or nothing). |
| netbox_allocate_availableA | Allocate the next free IP, prefix, VLAN or ASN from a pool and create it. NetBox picks the value atomically, so concurrent callers never get the same one. |
| netbox_delete_objectA | Permanently delete one NetBox object. Dependent objects may be deleted with it (e.g. a device's interfaces). Confirm with the user first. |
| netbox_bulk_delete_objectsA | Permanently delete many objects of one type in a single transaction. Confirm with the user first. |
| netbox_run_scriptA | Run a NetBox custom script and return its log and output. Runs with commit=false (changes rolled back) unless commit is set. The script runs as a background job; if it is still running after wait_seconds, poll it with netbox_get_object('core.job', job id). Confirm with the user before commit=true. |
| netbox_connect_cableA | Connect ports with a new cable. Ports can be given by device and name - no ID lookups needed. Fails before writing if a port is not found, is ambiguous or is already cabled. Use netbox_trace_cable afterwards to check the path. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 22 tools
Most tools have clearly distinct purposes: single vs bulk CRUD, IPAM availability vs allocation vs utilization, and cable connect vs trace are well separated. The main ambiguity is among read paths—get_objects, search_objects, and graphql_query all retrieve data, though descriptions distinguish filtering, multi-type search, and nested queries.
All tools use the netbox_ prefix and snake_case, with mostly verb_noun forms such as create_object, get_changelogs, and trace_cable. A few names deviate slightly—graphql_query lacks a verb, and get_available/allocate_available append adjectives rather than nouns—but the convention remains predictable.
22 tools is heavy for the 3-15 well-scoped range, though NetBox is a broad domain and specialized helpers for IPAM, cables, racks, config, and scripts earn their place. The large generic CRUD/bulk surface could be consolidated, keeping this borderline rather than ideal.
The generic object tools provide create, read/list, search, update, delete, bulk create/update/delete, and type description across NetBox object types. Specialized tools cover IPAM availability/allocation/utilization, cable trace/connect, rack space, config rendering, scripts, changelogs, GraphQL, and status; no obvious lifecycle gap remains.