Usage Examples - randygagnon/netbox-mcp-server GitHub Wiki
Usage Examples
This guide provides practical examples of using the NetBox MCP Server with various LLM clients.
Common Queries
Infrastructure Discovery
-
List all sites
What sites do we have in NetBox?
-
Find devices in a specific site
Show me all devices in the London datacenter
-
Get rack information
List all racks in DC1 that are less than 80% utilized
IP Management
-
IP Address Usage
Show me all IP addresses in the 10.0.0.0/8 network
-
VLAN Information
What VLANs are configured in the production environment?
-
Prefix Utilization
Show me utilization of all IPv4 prefixes
Device Management
-
Device Search
Find all Cisco switches in the network
-
Interface Status
Show me all interfaces on device core-switch-01
-
Hardware Inventory
List all devices with serial numbers and purchase dates
Circuit Management
-
Provider Information
Show me all circuits from provider AT&T
-
Circuit Capacity
List circuits with utilization over 80%
Virtualization
-
VM Inventory
Show all virtual machines running on cluster prod-cluster-01
-
Resource Usage
List VMs with more than 8 CPUs and 16GB RAM
Advanced Usage
Complex Filtering
-
Multi-criteria Search
Find all devices that are: - Manufactured by Cisco - Located in the NYC datacenter - Have 10G interfaces
-
Status-based Queries
Show me all devices that are: - Currently active - Have maintenance due in the next 30 days - Are running IOS version 15.x
Reporting Queries
-
Capacity Planning
Generate a report showing: - Rack space utilization per site - Power consumption trends - Network interface utilization
-
Asset Management
List all devices with: - Purchase date - Warranty status - Support contract details
Network Analysis
-
Connectivity Mapping
Show me the network path between: - Source: web-server-01 - Destination: db-server-02
-
Security Zones
List all devices in the DMZ with their: - IP addresses - Connected interfaces - Security group assignments
Write Operations
Creating Objects
-
Create a new device
Create a new device called "app-server-05" with device type "R640 Server", role "Application Server", and site "NYC"
-
Add an IP address
Add IP address 192.168.100.25/24 with description "New application server" and status "active"
-
Create a new VLAN
Create VLAN 200 named "Dev Environment" in VLAN group "Office" with status "active"
Updating Objects
-
Update device status
Change the status of device "core-switch-01" to "maintenance"
-
Modify IP address description
Update the description of IP 10.0.0.1/24 to "Primary Gateway"
-
Add tags to devices
Add tags "migration" and "2023-upgrade" to all devices in the London datacenter
Deleting Objects
-
Remove a decommissioned device
Delete device "old-server-03" from NetBox
-
Clean up unused IP addresses
Remove all IP addresses in prefix 192.168.50.0/24
Bulk Operations
-
Create multiple IP addresses
Create the following IP addresses in NetBox: - 10.10.10.1/24 with description "Router" - 10.10.10.2/24 with description "Core Switch" - 10.10.10.3/24 with description "Firewall"
-
Update status of multiple devices
Change the status of all devices in rack R101 to "active"
Best Practices
-
Be Specific
- Include relevant details in your queries
- Use exact names when known
- Specify filters clearly
-
Use Natural Language
- Queries can be written in plain English
- No need for special syntax
- The LLM will interpret your intent
-
Iterative Refinement
- Start with broad queries
- Refine based on results
- Ask follow-up questions
Troubleshooting Queries
-
Validation
Verify the configuration of device core-switch-01
-
Connectivity
Show me all connections to server web-01
-
Audit
List all changes made to the network in the past week
For more detailed API information, see the API Reference page.