by netboxlabs
Model Context Protocol (MCP) server for read-only interaction with NetBox data in LLMs
# Add to your Claude Code skills
git clone https://github.com/netboxlabs/netbox-mcp-server⚠️ Breaking Change in v1.0.0: The project structure has changed. If upgrading from v0.1.0, update your configuration:
- Change
uv run server.pytouv run netbox-mcp-server- Update Claude Desktop/Code configs to use
netbox-mcp-serverinstead ofserver.py- Docker users: rebuild images with updated CMD
- See CHANGELOG.md for full details
This is a simple read-only Model Context Protocol server for NetBox. It enables you to interact with your data in NetBox directly via LLMs that support MCP.
| Tool | Description | |------|-------------| | 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 |
Note: the set of supported object types is explicitly defined and limited to the core NetBox objects for now, and won't work with object types from plugins.
Create a read-only API token in NetBox with sufficient permissions for the tool to access the data you want to make available via MCP.
Install dependencies:
# Using UV (recommended)
uv sync
# Or using pip
pip install -e .
Verify the server can run: NETBOX_URL=https://netbox.example.com/ NETBOX_TOKEN=<your-api-token> uv run netbox-mcp-server
Add the MCP server to your LLM client. See below for some examples with Claude.
Add the server using the claude mcp add command:
claude mcp add --transport stdio netbox \
--env NETBOX_URL=https://netbox.example.com/ \
--env NETBOX_TOKEN=<your-api-token> \
-- uv --directory /path/to/netbox-mcp-server run netbox-mcp-server
Important notes:
/path/to/netbox-mcp-server with the absolute path to your local clone-- separator distinguishes Claude Code flags from the server command--scope project to share the configuration via .mcp.json in version control--scope user to make it available across all your projects (default is local)After adding, verify with /mcp in Claude Code or claude mcp list in your terminal.
For HTTP transport, first start the server manually:
# Start the server with HTTP transport (using .env or environment variables)
NETBOX_URL=https://netbox.example.com/ \
NETBOX_TOKEN=<your-api-token> \
TRANSPORT=http \
uv run netbox-mcp-server
Then add the running server to Claude Code:
# Add the HTTP MCP server (note: URL must include http:// or https:// prefix)
claude mcp add --transport http netbox http://127.0.0.1:8000/mcp
Important notes:
http:// or https://)/mcp when using HTTP transport