Get the FREE Ultimate OpenClaw Setup Guide →

netbox

Model Context Protocol (MCP) server for read-only interaction with NetBox data in LLMs

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio netboxlabs-netbox-mcp-server uv run netbox-mcp-server \
  --env TRANSPORT="stdio" \
  --env NETBOX_URL="<https://netbox.example.com/>" \
  --env NETBOX_TOKEN="<your-api-token>"

How to use

NetBox MCP Server is a read-only MCP service that exposes NetBox core data to large language models and other MCP clients. It implements a small set of tools for querying NetBox data: get_objects to retrieve collections of core objects with optional filters, get_object_by_id to fetch detailed information about a specific object by its ID, and get_changelogs to retrieve audit trail records based on filters. The server is designed to be run locally or in a container and accessed via MCP transports (stdio for Claude Code/Desktop, or http for web clients). To use it effectively, you must provide a NetBox API URL and a valid API token, and configure the transport as needed for your client (stdio or HTTP). The readme includes concrete examples for Claude integration and demonstrates how to pass environment variables and configuration through to the MCP server. Once running, you can query NetBox objects or inspect change histories through the MCP layer rather than directly calling the NetBox API.

How to install

Prerequisites:

  • Python 3.8+ (or a compatible Python runtime)
  • pip (or pipx)
  • Internet access to install dependencies from PyPI

Install the MCP server locally (example using Python with editable install):

  1. Clone the repository or navigate to the project directory.
  2. Install dependencies in editable mode:
pip install -e .
  1. Ensure you have a NetBox instance reachable at NETBOX_URL and a valid API token:
  1. Run the MCP server using UV (recommended) directly:
NETBOX_URL=https://netbox.example.com/ NETBOX_TOKEN=<your-api-token> uv run netbox-mcp-server

Optional: If you prefer an HTTP transport, set TRANSPORT=http and provide HOST/PORT as needed:

NETBOX_URL=https://netbox.example.com/ NETBOX_TOKEN=<your-api-token> TRANSPORT=http uv run netbox-mcp-server --host 0.0.0.0 --port 8000

Additional notes

Tips and common considerations:

  • Ensure you create a NetBox API token with sufficient read permissions for the data you want to expose.
  • When using HTTP transport, remember to specify HOST and PORT if you need a non-default binding.
  • The MCP server supports field filtering via a fields parameter to reduce token usage; specify which NetBox fields you want to return.
  • If upgrading from older versions, review breaking changes noted in CHANGELOG.md, especially around command names and startup behavior.
  • For Claude integration, use the provided examples to register the MCP server with stdio or HTTP transports and verify connectivity with claude mcp list.
  • In production, consider securing the NetBox token and restricting access to the HTTP endpoint or using an internal transport only.

Related MCP Servers

Sponsor this space

Reach thousands of developers