Skip to main content
Glama

NetBox MCP Server

by jseifeddine

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
NETBOX_URLYesThe URL of your NetBox instance
NETBOX_TOKENYesYour NetBox API token with read permissions

Schema

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

Tools

Functions exposed to the LLM to take actions

NameDescription
netbox_get_objects

Get objects from NetBox based on their type and filters Args: object_type: String representing the NetBox object type (e.g. "devices", "ip-addresses") filters: dict of filters to apply to the API call based on the NetBox API filtering options

Valid object_type values:

DCIM (Device and Infrastructure):

  • cables

  • console-ports

  • console-server-ports

  • devices

  • device-bays

  • device-roles

  • device-types

  • front-ports

  • interfaces

  • inventory-items

  • locations

  • manufacturers

  • modules

  • module-bays

  • module-types

  • platforms

  • power-feeds

  • power-outlets

  • power-panels

  • power-ports

  • racks

  • rack-reservations

  • rack-roles

  • regions

  • sites

  • site-groups

  • virtual-chassis

IPAM (IP Address Management):

  • asns

  • asn-ranges

  • aggregates

  • fhrp-groups

  • ip-addresses

  • ip-ranges

  • prefixes

  • rirs

  • roles

  • route-targets

  • services

  • vlans

  • vlan-groups

  • vrfs

Circuits:

  • circuits

  • circuit-types

  • circuit-terminations

  • providers

  • provider-networks

Virtualization:

  • clusters

  • cluster-groups

  • cluster-types

  • virtual-machines

  • vm-interfaces

Tenancy:

  • tenants

  • tenant-groups

  • contacts

  • contact-groups

  • contact-roles

VPN:

  • ike-policies

  • ike-proposals

  • ipsec-policies

  • ipsec-profiles

  • ipsec-proposals

  • l2vpns

  • tunnels

  • tunnel-groups

Wireless:

  • wireless-lans

  • wireless-lan-groups

  • wireless-links

See NetBox API documentation for filtering options for each object type.

netbox_get_object_by_id

Get detailed information about a specific NetBox object by its ID.

Args: object_type: String representing the NetBox object type (e.g. "devices", "ip-addresses") object_id: The numeric ID of the object

Returns: Complete object details

netbox_get_changelogs

Get object change records (changelogs) from NetBox based on filters.

Args: filters: dict of filters to apply to the API call based on the NetBox API filtering options

Returns: List of changelog objects matching the specified filters

Filtering options include:

  • user_id: Filter by user ID who made the change

  • user: Filter by username who made the change

  • changed_object_type_id: Filter by ContentType ID of the changed object

  • changed_object_id: Filter by ID of the changed object

  • object_repr: Filter by object representation (usually contains object name)

  • action: Filter by action type (created, updated, deleted)

  • time_before: Filter for changes made before a given time (ISO 8601 format)

  • time_after: Filter for changes made after a given time (ISO 8601 format)

  • q: Search term to filter by object representation

Example: To find all changes made to a specific device with ID 123: {"changed_object_type_id": "dcim.device", "changed_object_id": 123}

To find all deletions in the last 24 hours: {"action": "delete", "time_after": "2023-01-01T00:00:00Z"}

Each changelog entry contains:

  • id: The unique identifier of the changelog entry

  • user: The user who made the change

  • user_name: The username of the user who made the change

  • request_id: The unique identifier of the request that made the change

  • action: The type of action performed (created, updated, deleted)

  • changed_object_type: The type of object that was changed

  • changed_object_id: The ID of the object that was changed

  • object_repr: String representation of the changed object

  • object_data: The object's data after the change (null for deletions)

  • object_data_v2: Enhanced data representation

  • prechange_data: The object's data before the change (null for creations)

  • postchange_data: The object's data after the change (null for deletions)

  • time: The timestamp when the change was made

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/jseifeddine/netbox-mcp-chatbot'

If you have feedback or need assistance with the MCP directory API, please join our Discord server