NetBox MCP Server
3kirt/netbox-mcp
Acesso conversacional a dados de infraestrutura NetBox via Claude
Ver no GitHubServidor MCP que conecta Claude a instâncias NetBox ao vivo, permitindo consultas em linguagem natural sobre infraestrutura de rede. Com 169 ferramentas somente-leitura, traduz perguntas como 'quais dispositivos em NYC estão em manutenção?' em queries estruturadas contra a API NetBox em tempo real.
Instalação
npx convez-ai 3kirt/netbox-mcp1 comando no terminal: detecta o formato do repositório (marketplace ou plugin avulso) e instala via Claude Code. Requer Node 18+ e o Claude Code instalado.
Métricas
Casos de uso
- Consultar status e configuração de dispositivos de rede em linguagem natural
- Automatizar buscas de IPs, VRFs e atribuições de rede sem tocar a API
- Integrar dados NetBox em fluxos de análise e documentação com Claude
Veredito

Implementação sólida e bem-pensada de MCP para NetBox, com suporte a 169 ferramentas de consulta apenas-leitura e otimização de payload. Ideal para times DevOps/Infra que já usam NetBox; requer Rust para build manual, mas binários pré-compilados estão disponíveis.
README
A tradução para o português deste README ainda está na fila.
netbox-mcp
A Model Context Protocol (MCP) server that connects Claude and other MCP-compatible AI clients to a live NetBox instance.
Ask questions like "Which devices in the NYC site are currently in maintenance?" or "Show me all IPs assigned to web01 and their VRFs" — the server translates them into real-time NetBox API queries and returns structured results.
- Read-only — all 169 tools query NetBox but make no changes
- stdio transport — runs as a local subprocess managed by your MCP client
- Token-efficient — responses are slimmed before delivery, cutting typical NetBox payloads by 50–70%
Table of contents
Requirements
- A running NetBox instance with a valid API token
- To build from source: Rust stable toolchain (
rustup install stable) - To use a pre-built binary: nothing — grab it from the releases page
Installation
Pre-built binary (recommended)
Download the binary for your platform from the releases page and place it somewhere on your $PATH.
From source
git clone https://github.com/3kirt/netbox-mcp
cd netbox-mcp
make install
Installs the netbox-mcp binary to $CARGO_HOME/bin (typically ~/.cargo/bin).
Configuration
netbox-mcp reads credentials from ~/.netbox_mcp.json:
{
"url": "https://netbox.example.com",
"token": "your-api-token"
}
Environment variables take precedence over the config file:
| Variable | Description |
|---|---|
NETBOX_URL | NetBox base URL |
NETBOX_TOKEN | NetBox API token |
A custom config file path can be specified with --config:
netbox-mcp --config /path/to/config.json
Obtaining an API token
Tokens can be created in NetBox under Admin → API Tokens, or provisioned via the API:
curl -s -X POST https://netbox.example.com/api/users/tokens/provision/ \
-H "Content-Type: application/json" \
-d '{"username": "you", "password": "yourpassword"}' \
| jq '.key'
Because netbox-mcp is read-only, create a read-only token (deselect "Write enabled" in the token settings). If the server starts returning 403 errors, check whether the token has expired.
Client setup
Claude Desktop
Add the following to your claude_desktop_config.json:
{
"mcpServers": {
"netbox": {
"command": "netbox-mcp",
"env": {
"NETBOX_URL": "https://netbox.example.com",
"NETBOX_TOKEN": "your-api-token"
}
}
}
}
Config file location:
| OS | Path |
|---|---|
| macOS | ~/Library/Application Support/Claude/claude_desktop_config.json |
| Linux | ~/.config/Claude/claude_desktop_config.json |
| Windows | %APPDATA%\Claude\claude_desktop_config.json |
Claude Code
Register via the CLI:
claude mcp add --transport stdio \
--env NETBOX_URL=https://netbox.example.com \
--env NETBOX_TOKEN=your-api-token \
netbox -- netbox-mcp
To share the configuration with your team (writes to .mcp.json):
claude mcp add --transport stdio --scope project \
--env NETBOX_URL=https://netbox.example.com \
netbox -- netbox-mcp
Available tools
169 read-only tools spanning ten NetBox API areas:
| Area | Coverage |
|---|---|
| DCIM | Sites, racks, devices, interfaces, cables, power, modules, inventory |
| IPAM | IP addresses, prefixes, VRFs, VLANs, aggregates, ranges, ASNs, FHRP |
| Virtualization | VMs, clusters, VM interfaces, virtual disks |
| Circuits | Circuits, providers, circuit types, terminations |
| VPN | Tunnels, L2VPNs, IKE/IPSec policies |
| Wireless | Wireless LANs, LAN groups, wireless links |
| Tenancy | Tenants, tenant groups, contacts, contact roles |
| Extras | Tags, config contexts, journal entries, custom fields, webhooks |
| Core | Data sources, background jobs, object change log |
| Users | Users, groups, API tokens |
Each area provides list (with filters) and get (by ID) tools. A meta-tool netbox_lookup_host searches both physical devices and VMs by name in a single call.
Development
make build # cargo build
make test # cargo test --all (unit tests, offline)
make test-live # live integration tests against a seeded NetBox
make lint # cargo clippy -- -D warnings && cargo fmt --check
make clean # remove build artifacts
make docker-build # build Docker image
Testing
Two layers verify different risks — fast offline unit tests, and a feature-gated
live suite that checks fidelity to the real NetBox API. A self-contained,
auto-seeding NetBox stack for the live suite lives in
test/netbox-docker/ (Podman on macOS):
cd test/netbox-docker && ./up.sh # boot + seed a local NetBox
NETBOX_URL=http://localhost:8000 \
NETBOX_TOKEN=0123456789abcdef0123456789abcdef01234567 make test-live
See docs/testing.md for the full rationale and how to add
coverage.