- Home
- MCP servers
- NetBox
NetBox
- python
100
GitHub Stars
python
Language
6 months ago
First Indexed
2 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
You can interact with NetBox data directly through LLMs by using a read-only MCP server. It exposes core NetBox objects and change history through a simple, secure interface, enabling powerful data-driven conversations with your preferred MCP client.
How to use
You connect an MCP client to the NetBox MCP Server to retrieve core NetBox objects and view change histories. Start the server in either stdio (local) mode for development or http (HTTP) mode for web-based clients, then configure your MCP client to talk to it.
How to install
Prerequisites you need on your machine:
- Python with pip (to install dependencies) or the UV tool for running the server in stdio mode
Follow these concrete steps to set up the MCP server locally and verify it runs.
# Install dependencies using UV (recommended)
uv sync
# Or install with Python package manager
pip install -e .
# Verify the server can run locally (example values shown; replace with your NetBox URL and token)
NETBOX_URL=https://netbox.example.com/ NETBOX_TOKEN=<your-api-token> uv run netbox-mcp-server
# Optional: test the Claude Code/Code integration by adding the MCP server configuration as shown in usage examples
Configuration and daily use
Configure the server with your NetBox connection details and desired transport. The server supports two primary modes: stdio for local usage and http for web-based clients.
-
In stdio mode, run the server using the UV command and point Claude Code/Claude Desktop to the local instance. Ensure your environment variables include your NetBox URL and API token.
-
In HTTP mode, start the server with HTTP transport enabled, then point your web-based MCP client to the server URL (the default path includes /mcp). Ensure the server is running before attempting to connect from the client.
Notes on security and maintenance
Create a read-only NetBox API token with permissions sufficient for the MCP tools to access data. Keep this token secret and rotate it periodically. Use transport options and SSL verification according to your security requirements.
If you need to upgrade from an older version, follow the change notes for breaking changes, update your start commands, and rebuild any runtime images if you are using containers.
Examples of common workflows
-
Retrieve a list of objects of a specific type (e.g., devices) and filter by a site.
-
Request the change history for a particular NetBox site to audit recent activity.
-
Combine NetBox data with your LLM prompts to compose network documentation or inventory reports.
Available tools
get_objects
Retrieves NetBox core objects based on their type and filters
get_object_by_id
Gets detailed information about a specific NetBox object by its ID
get_changelogs
Retrieves change history records (audit trail) based on filters