NetBox MCP
v0.4.0MCP server for NetBox DCIM/IPAM with read-only and dry-run modes
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
netbox_list_object_types Netbox List Object Types
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.
| Parameter | Type | Description |
|---|---|---|
app | Only types of this app, e.g. 'dcim', 'ipam', 'netbox_dns'. | |
rediscover | boolean | Re-read plugin types from NetBox (plugin discovery must be enabled on the server). |
netbox_get_objects Netbox Get Objects
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'.
| Parameter | Type | Description |
|---|---|---|
object_type * | string | NetBox object type as 'app.model' (e.g. 'dcim.device', 'ipam.ipaddress', 'virtualization.virtualmachine') or as an API path ('dcim/devices'). netbox_list_object_types lists every type. |
brief | boolean | Return the minimal representation (id, url, display, name). |
fields | Only return these fields, e.g. ['id', 'name', 'status']. ALWAYS pass this for listings - full objects cost 10x more tokens. | |
filters | NetBox filters, e.g. {'site_id': 1, 'status': 'active', 'name__ic': 'core'}. Pass a list for OR: {'id': [1, 2]}. null matches empty: {'tenant_id': None}. Lookup suffixes: n, ic, nic, isw, nisw, iew, n… | |
limit | integer | Page size (1-1000). |
offset | integer | Number of results to skip. |
omit | Drop these fields from the response, e.g. ['config_context', 'custom_fields']. NetBox 4.5.2+. Ignored when 'fields' is set. | |
ordering | Sort field(s); prefix with '-' for descending, e.g. 'name' or ['site', '-name']. |
netbox_get_object Netbox Get Object
Get one NetBox object by type and ID.
| Parameter | Type | Description |
|---|---|---|
object_id * | integer | Numeric object ID. |
object_type * | string | NetBox object type as 'app.model' (e.g. 'dcim.device', 'ipam.ipaddress', 'virtualization.virtualmachine') or as an API path ('dcim/devices'). netbox_list_object_types lists every type. |
brief | boolean | Return the minimal representation (id, url, display, name). |
fields | Only return these fields, e.g. ['id', 'name', 'status']. ALWAYS pass this for listings - full objects cost 10x more tokens. | |
omit | Drop these fields from the response, e.g. ['config_context', 'custom_fields']. NetBox 4.5.2+. Ignored when 'fields' is set. |
netbox_search_objects Netbox Search Objects
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).
| Parameter | Type | Description |
|---|---|---|
query * | string | Free text: a name, IP, serial, asset tag, description... |
fields | Only return these fields, e.g. ['id', 'name', 'status']. ALWAYS pass this for listings - full objects cost 10x more tokens. | |
limit | integer | Maximum results per type. |
object_types | Types to search. Default: dcim.device, dcim.site, ipam.ipaddress, ipam.prefix, dcim.interface, dcim.rack, ipam.vlan, circuits.circuit, virtualization.virtualmachine |
netbox_describe_object_type Netbox Describe Object Type
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.
| Parameter | Type | Description |
|---|---|---|
object_type * | string | NetBox object type as 'app.model' (e.g. 'dcim.device', 'ipam.ipaddress', 'virtualization.virtualmachine') or as an API path ('dcim/devices'). netbox_list_object_types lists every type. |
netbox_get_changelogs Netbox Get Changelogs
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.
| Parameter | Type | Description |
|---|---|---|
filters | Change log filters, e.g. {'changed_object_type': 'dcim.device', 'changed_object_id': 5}, {'user': 'admin'}, {'action': 'delete'}, {'time_after': '2026-01-01T00:00:00Z'}, {'request_id': '<uuid>'}. | |
include_data | boolean | Include prechange_data/postchange_data - the full object before and after the change (several KB per entry). Use it with a narrow filter, e.g. one changed_object_id. |
limit | integer | Page size (1-1000). |
offset | integer | Number of results to skip. |
netbox_get_status Netbox Get Status
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_query Netbox Graphql Query
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}).
| Parameter | Type | Description |
|---|---|---|
query * | string | GraphQL query. Fetch related data in one round trip, e.g. '{ device_list(filters: {site: {name: {exact: "DC1"}}}) { id name interfaces { name ip_addresses { address } } } }'. NetBox 4.5+ requires look… |
variables | GraphQL variables. |
netbox_get_available Netbox Get Available
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').
| Parameter | Type | Description |
|---|---|---|
kind * | string | What to look for: 'ips' (prefix or IP range), 'prefixes' (prefix), 'vlans' (VLAN group), 'asns' (ASN range). |
parent_id * | integer | Numeric object ID. |
parent_type * | string | Type of the parent object that holds the pool. |
limit | integer | Maximum results. |
netbox_trace_cable Netbox Trace Cable
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.
| Parameter | Type | Description |
|---|---|---|
object_id * | integer | Numeric object ID. |
object_type * | string | Type of the starting port. |
netbox_render_config Netbox Render Config
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.
| Parameter | Type | Description |
|---|---|---|
object_id * | integer | Numeric object ID. |
object_type * | string | Device or virtual machine. |
config_template_id | Render this config template instead of the one assigned to the object. | |
extra_context | Extra variables merged into the template context. |
netbox_find_rack_space Netbox Find Rack Space
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.
| Parameter | Type | Description |
|---|---|---|
u_height * | number | Height of the device to place, in rack units. |
face | string | Rack face to mount on. |
full_depth | boolean | The device is full depth, so the other face must be free too. |
location_id | Search this location. | |
max_racks | integer | Racks to check. |
rack_ids | Search these racks. | |
site_id | Search this site. |
netbox_get_prefix_utilization Netbox Get Prefix Utilization
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.
| Parameter | Type | Description |
|---|---|---|
prefix_ids * | array | Prefix IDs. Find them with netbox_get_objects on 'ipam.prefix' (e.g. filters={'site_id': 1}). |
netbox_create_object Netbox Create Object
Create one NetBox object. Returns the created object. Look up related objects first (netbox_get_objects) and pass their IDs.
| Parameter | Type | Description |
|---|---|---|
data * | object | Field values. Foreign keys take numeric IDs, e.g. {'name': 'sw01', 'device_type': 4, 'role': 2, 'site': 1, 'status': 'active'}. Tags: [{'name': 'core'}] or [3]. Use netbox_describe_object_type for the… |
object_type * | string | NetBox object type as 'app.model' (e.g. 'dcim.device', 'ipam.ipaddress', 'virtualization.virtualmachine') or as an API path ('dcim/devices'). netbox_list_object_types lists every type. |
netbox_update_object Netbox Update Object
Update fields of one NetBox object (partial update). Returns the updated object.
| Parameter | Type | Description |
|---|---|---|
data * | object | Only the fields to change (PATCH), e.g. {'status': 'offline', 'description': 'RMA'}. |
object_id * | integer | Numeric object ID. |
object_type * | string | NetBox object type as 'app.model' (e.g. 'dcim.device', 'ipam.ipaddress', 'virtualization.virtualmachine') or as an API path ('dcim/devices'). netbox_list_object_types lists every type. |
netbox_bulk_create_objects Netbox Bulk Create Objects
Create many objects of one type in a single transaction (all or nothing). Returns the IDs of the created objects.
| Parameter | Type | Description |
|---|---|---|
data * | array | Objects to write. |
object_type * | string | NetBox object type as 'app.model' (e.g. 'dcim.device', 'ipam.ipaddress', 'virtualization.virtualmachine') or as an API path ('dcim/devices'). netbox_list_object_types lists every type. |
netbox_bulk_update_objects Netbox Bulk Update Objects
Update many objects of one type in a single transaction (all or nothing).
| Parameter | Type | Description |
|---|---|---|
data * | array | Partial updates, each with the object 'id', e.g. [{'id': 1, 'status': 'active'}, {'id': 2, 'status': 'active'}]. |
object_type * | string | NetBox object type as 'app.model' (e.g. 'dcim.device', 'ipam.ipaddress', 'virtualization.virtualmachine') or as an API path ('dcim/devices'). netbox_list_object_types lists every type. |
netbox_allocate_available Netbox Allocate Available
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.
| Parameter | Type | Description |
|---|---|---|
kind * | string | What to look for: 'ips' (prefix or IP range), 'prefixes' (prefix), 'vlans' (VLAN group), 'asns' (ASN range). |
parent_id * | integer | Numeric object ID. |
parent_type * | string | Type of the parent object that holds the pool. |
data | Attributes of the new object(s). Prefixes need {'prefix_length': 24}; VLANs need {'name': 'users'}. A list allocates several at once, e.g. [{'description': 'a'}, {'description': 'b'}] for two IPs. |
netbox_delete_object Netbox Delete Object
Permanently delete one NetBox object. Dependent objects may be deleted with it (e.g. a device's interfaces). Confirm with the user first.
| Parameter | Type | Description |
|---|---|---|
object_id * | integer | Numeric object ID. |
object_type * | string | NetBox object type as 'app.model' (e.g. 'dcim.device', 'ipam.ipaddress', 'virtualization.virtualmachine') or as an API path ('dcim/devices'). netbox_list_object_types lists every type. |
netbox_bulk_delete_objects Netbox Bulk Delete Objects
Permanently delete many objects of one type in a single transaction. Confirm with the user first.
| Parameter | Type | Description |
|---|---|---|
object_ids * | array | IDs of the objects to delete. |
object_type * | string | NetBox object type as 'app.model' (e.g. 'dcim.device', 'ipam.ipaddress', 'virtualization.virtualmachine') or as an API path ('dcim/devices'). netbox_list_object_types lists every type. |
netbox_run_script Netbox Run Script
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.
| Parameter | Type | Description |
|---|---|---|
script * | Script ID, or 'module.ClassName' (e.g. 'cleanup.StaleIPs'). List scripts with netbox_get_objects on 'extras.script'. | |
commit | boolean | Keep the script's database changes. False (default) runs it and rolls its changes back - use that first. |
data | Values for the script's input variables, e.g. {'site': 3, 'dry_run_note': 'test'}. Object variables take IDs. | |
wait_seconds | integer | How long to wait for the result. 0 returns as soon as the job is queued. |
netbox_connect_cable Netbox Connect Cable
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.
| Parameter | Type | Description |
|---|---|---|
a_terminations * | array | Ports on this end, usually one, e.g. [{'object_type': 'dcim.interface', 'device': 'sw01', 'name': 'eth1'}] or [{'object_type': 'dcim.frontport', 'object_id': 42}]. |
b_terminations * | array | Ports on this end, usually one, e.g. [{'object_type': 'dcim.interface', 'device': 'sw01', 'name': 'eth1'}] or [{'object_type': 'dcim.frontport', 'object_id': 42}]. |
cable | Cable attributes, e.g. {'type': 'cat6', 'status': 'connected', 'label': 'C-101', 'color': 'ff0000', 'length': 3, 'length_unit': 'm'}. |