simonpainter/netbox-mcp

🛠️ Other Tools and Integrations
0 Views
0 Installs

🐍 ☁️ - MCP server for interacting with NetBox API.

Quick Install

One-Click IDE Configuration
claude_desktop_config.json
{
  "mcpServers": {
    "simonpainter-netbox-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "simonpainter-netbox-mcp"
      ]
    }
  }
}
Or

Using an AI coding agent (Claude Code, Cursor, etc.)? Copy a ready-made prompt that tells it to fetch the setup instructions and install this server for you.

Documentation Overview

NetBox MCP Server

A small Model Context Protocol (MCP) server built with FastMCP that provides an interface to a NetBox instance.

This repository exposes NetBox resources (sites, site-groups, devices, etc.) as MCP tools and runs a streaming HTTP transport so clients can connect and receive streamed responses from the MCP server.

Architecture (FastMCP + streaming HTTP)

  • FastMCP: The MCP tool registry and runtime. Tools are defined in app.py and decorated with @mcp.tool.
  • NetBoxClient: a tiny async helper in app.py that wraps httpx.AsyncClient to call the NetBox API.
  • Streaming HTTP transport: the MCP server is started with mcp.run(transport="http", ...) which runs an HTTP server that supports a streaming/chunked response transport. This is useful for clients that want to consume events or long-running responses incrementally rather than waiting for the entire result.

Conceptually the flow is:

  1. Client connects to the FastMCP streaming HTTP endpoint.
  2. Client requests a tool (for example, search_sites or get_site_group_details).
  3. FastMCP calls the associated Python function in app.py, which may in turn call NetBox via NetBoxClient.
  4. The result is streamed back over the HTTP transport as it becomes available.

Note: The low-level HTTP path/shape is provided by the FastMCP runtime. Clients that wish to connect should use a compatible MCP client or an HTTP client that supports reading chunked / streaming responses.

Environment variables

Set these before running the server:

  • NETBOX_URL - Base URL to your NetBox instance (default: https://netbox.example.com).
  • NETBOX_TOKEN - NetBox API token with read permissions.
  • MCP_PORT - Port for the FastMCP HTTP transport. Defaults to 8000 if not set. If the value is not a valid integer, the server will exit with an error.

Example (macOS / zsh):

export NETBOX_URL="https://netbox.example.com"
export NETBOX_TOKEN="0123456789abcdef0123456789abcdef01234567"
export MCP_PORT=8000

Run the server

Start the MCP server with Python:

python3 app.py

The server will bind to 0.0.0.0 on the configured port and serve the FastMCP HTTP transport.

Tools included

app.py registers MCP tools for NetBox resources. Examples included in this repository:

  • search_sites — search of dcim/sites/ (supports partial/case-insensitive name queries)
  • get_site_details — site lookup
  • search_site_groups — search of dcim/site-groups/ (supports name__ic)
  • get_site_group_details — single site-group lookup by id

You can add more tools following the repository conventions: each NetBox resource has a search_<resource> and get_<resource>_details tool.

Verifying / testing

  • Quick syntax check:
python3 -m py_compile app.py
  • Start the server and use an HTTP client that supports streaming (for example, curl --no-buffer or a custom MCP client) to connect to the FastMCP HTTP transport and invoke tools.

Because the exact HTTP request shape (paths, headers and payload) is defined by the FastMCP runtime and clients, prefer using an existing MCP client library where available. If you're building a custom client, make sure it supports reading chunked responses so streamed results can be consumed incrementally.

Contributing

If you add tools, follow the repo conventions documented in .github/copilot-instructions.md: each resource should have a search_ and a get_ tool with descriptive docstrings and consistent parameter mapping.

License

This project is provided as-is.

Related MCP Servers

modelcontextprotocol/server-everythingVerified

📇 🏠 - MCP server that exercises all the features of the MCP protocol

🛠️ Other Tools and Integrations1 views
0xMassi/webclaw

🦀 🏠 🍎 🐧 - Web content extraction for AI agents. 10 tools: scrape, crawl, map, batch, extract, summarize, diff, brand, search, research. TLS fingerprinting bypasses anti-bot without a browser. 67% fewer tokens than raw HTML. npx create-webclaw auto-configures Claude, Cursor, Windsurf, Codex, OpenCode.

🛠️ Other Tools and Integrations0 views
2niuhe/plantuml_web

🐍 🏠 ☁️ 🍎 🪟 🐧 - A web-based PlantUML frontend with MCP server integration, enable plantuml image generation and plantuml syntax validation.

🛠️ Other Tools and Integrations0 views
2niuhe/qrcode_mcp

🐍 🏠 🍎 🪟 🐧 - A QR code generation MCP server that converts any text (including Chinese characters) to QR codes with customizable colors and base64 encoding output.

🛠️ Other Tools and Integrations0 views

Engagement

Views
0
Installs
0
Upvotes
0

Views and upvotes are unique per visitor network (hashed IP). Installs count copy actions.

Status

Health: Not checked yet

We have not completed a health check for this listing yet.

No check timestamp yet.

Unclaimed listing (imported or pending owner verification). Claim it →
★ Spotlight Slot

Feature Your MCP Server

Get maximum visibility for your server across our directory, search results, and detail pages.

Spotlight Your Server

Own this project?

This directory is pre-filled from public sources. Claim via GitHub README, site badge, or DNS TXT to get the verified badge and attach your website.

Claim this listing

Promote this listing

Optional paid placement. Free listings stay free forever.

Share & Embed

Add our SVG badge (dark/light directory styles) or embeddable widget to your site.