netbox
Model Context Protocol (MCP) server for read-only interaction with NetBox data in LLMs
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):
- Clone the repository or navigate to the project directory.
- Install dependencies in editable mode:
pip install -e .
- Ensure you have a NetBox instance reachable at NETBOX_URL and a valid API token:
- NETBOX_URL=https://netbox.example.com/
- NETBOX_TOKEN=your_api_token
- 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
web-eval-agent
An MCP server that autonomously evaluates web applications.
mcp-neo4j
Neo4j Labs Model Context Protocol servers
Gitingest
mcp server for gitingest
zotero
Model Context Protocol (MCP) server for the Zotero API, in Python
fhir
FHIR MCP Server – helping you expose any FHIR Server or API as a MCP Server.
unitree-go2
The Unitree Go2 MCP Server is a server built on the MCP that enables users to control the Unitree Go2 robot using natural language commands interpreted by a LLM.