NetBox MCP Server
# NetBox MCP Server
This is a simple read-only [Model Context Protocol](https://modelcontextprotocol.io/) server for NetBox. It enables you to interact with your data in NetBox directly via LLMs that support MCP.
## Tools
| 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.
## Usage
1. 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.
2. Install dependencies:
```bash
# Using UV (recommended)
uv sync
# Or using pip
pip install -e .
```
3. Verify the server can run: `NETBOX_URL=https://netbox.example.com/ NETBOX_TOKEN=<your-api-token> uv run server.py`
3. Add the MCP server configuration to your LLM client. For example, in Claude Desktop (Mac):
```json
{
"mcpServers": {
"netbox": {
"command": "uv",
"args": [
"--directory",
"/path/to/netbox-mcp-server",
"run",
"server.py"
],
"env": {
"NETBOX_URL": "https://netbox.example.com/",
"NETBOX_TOKEN": "<your-api-token>"
}
}
}
```
> On Windows, use full, escaped path to your instance, such as `C:\\Users\\myuser\\.local\\bin\\uv` and `C:\\Users\\myuser\\netbox-mcp-server`.
> For detailed troubleshooting, consult the [MCP quickstart](https://modelcontextprotocol.io/quickstart/user).
4. Use the tools in your LLM client. For example:
```text
> Get all devices in the 'Equinix DC14' site
...
> Tell me about my IPAM utilization
...
> What Cisco devices are in my network?
...
> Who made changes to the NYC site in the last week?
...
> Show me all configuration changes to the core router in the last month
```
## Development
Contributions are welcome! Please open an issue or submit a PR.
## License
This project is licensed under the Apache 2.0 license. See the LICENSE file for details.
TDQS
Scored across 3 tools
The three tools have clearly distinct purposes: netbox_get_changelogs retrieves audit logs of changes, netbox_get_object_by_id fetches a single object by ID, and netbox_get_objects lists objects by type with filtering. There is no overlap in functionality, making it easy for an agent to select the right tool for each task.
All tool names follow a consistent snake_case pattern with the prefix 'netbox_' and a descriptive verb_noun structure: get_changelogs, get_object_by_id, get_objects. This uniformity makes the tool set predictable and easy to understand at a glance.
With only three tools, the server feels thin for the broad domain of NetBox, which includes many object types across DCIM, IPAM, circuits, virtualization, tenancy, VPN, and wireless. While the tools cover basic read operations, the count is borderline low given the extensive scope implied by the object_type list.
The tool set is severely incomplete for a NetBox server, as it only provides read operations (get) with no support for create, update, or delete. This leaves significant gaps in CRUD/lifecycle coverage, which will likely cause agent failures when trying to perform common administrative tasks like adding devices or modifying IP addresses.