Skip to content

Claude and MCP

Claude and smart-hands work orders (MCP)

▶ Video: What's new in 1.2.0 — the MCP part starts at 8:45.

netbox-rack-design-mcp lets Claude read a design's execution plan and write the smart-hands ticket for a step. It is read-only: Claude can list designs, read the plan and its power simulation, and fetch the work order. It cannot reorder steps or apply.

Why our own server

NetBox Labs' netbox-mcp-server is read-only GET over a fixed registry of core object types. Its plugin discovery adds list and get of plugin models only, so it cannot reach the work-order action or the simulate-steps POST of this plugin. Generic OpenAPI bridges expose thousands of NetBox operations and carry no ticket guidance. The official server stays useful next to ours for browsing core DCIM data (devices, racks, cables); install both if you want that.

Where to get it

The server is a small Python package, netbox-rack-design-mcp:

Prerequisites

  • Claude Code or Claude Desktop.
  • uv (it provides uvx) or pipx. uvx fetches and runs the package from PyPI on first use, so there is nothing to install by hand.
  • A NetBox with this plug-in (1.2.0 or newer) and a user who can see the designs.

Step 1: create a read-only API token

In NetBox open the user menu (top right), API Tokens, Add a Token:

  1. Untick Write enabled. This is what makes the token read-only.
  2. Add a description, for example "Claude, read-only", and click Create.
  3. Copy the token. NetBox shows it once; keep it out of chat messages and tickets.

The user the token belongs to needs the view permission on the Rack Design objects (designs, placements, steps). No tool here needs more, and none of them writes.

Step 2: register the server

Claude Code

claude mcp add --env NETBOX_URL=https://netbox.example.com --env NETBOX_TOKEN=$NETBOX_TOKEN --transport stdio rack-design -- uvx netbox-rack-design-mcp

Put your token in the NETBOX_TOKEN environment variable first (or paste it in place of $NETBOX_TOKEN). With pipx instead of uvx: pipx install netbox-rack-design-mcp, then register the command netbox-rack-design-mcp.

Claude Desktop

In claude_desktop_config.json (Settings, Developer, Edit config), then restart the app:

{"mcpServers":{"rack-design":{"command":"uvx","args":["netbox-rack-design-mcp"],"env":{"NETBOX_URL":"https://netbox.example.com","NETBOX_TOKEN":"<your token>"}}}}

Settings

The server reads two environment variables: NETBOX_URL and NETBOX_TOKEN. Set NETBOX_VERIFY_SSL=false only for a lab instance with a self-signed certificate. Logs go to stderr, and the token is never logged.

Step 3: check that it works

  • Claude Code: run claude mcp list; rack-design should show as connected. Inside a session, /mcp shows the server and its tools.
  • Ask Claude "List the rack-design tools you have". It should name five tools: list_designs, get_design, get_execution_plan, get_work_order, simulate_order.
  • Then try "Which steps in the execution plan of design are risky?"</li> </ul> <h3 id="troubleshooting">Troubleshooting<a class="headerlink" href="#troubleshooting" title="Permanent link">¶</a></h3> <table> <thead> <tr> <th>Symptom</th> <th>Cause and fix</th> </tr> </thead> <tbody> <tr> <td>Connection refused, or the server shows as failed</td> <td><code>NETBOX_URL</code> is wrong or unreachable from the machine running Claude. Open it in a browser from that machine; include <code>https://</code> and no trailing path.</td> </tr> <tr> <td>403 Forbidden</td> <td>The token's user lacks the <code>view</code> permission on the Rack Design objects (or the design's site is outside the user's constraints). Grant it and retry.</td> </tr> <tr> <td>401 / "Invalid token"</td> <td>The token was copied wrongly, expired, or is disabled. Create a new one. A v2 token starts with <code>nbt_</code>; keep the whole <code>nbt_key.secret</code> string.</td> </tr> <tr> <td>Certificate error</td> <td>A self-signed NetBox: set <code>NETBOX_VERIFY_SSL=false</code> (lab only).</td> </tr> <tr> <td><code>uvx: command not found</code></td> <td>Install uv (<a href="https://docs.astral.sh/uv/">https://docs.astral.sh/uv/</a>), or use pipx.</td> </tr> <tr> <td>A tool says the design has no saved plan</td> <td>Open the design's <strong>Execution plan</strong> tab and click <strong>Create plan</strong> once.</td> </tr> </tbody> </table> <h3 id="tools">Tools<a class="headerlink" href="#tools" title="Permanent link">¶</a></h3> <table> <thead> <tr> <th>Tool</th> <th>What it returns</th> </tr> </thead> <tbody> <tr> <td><code>list_designs(site=None, status=None)</code></td> <td>Designs, filtered by site slug and status.</td> </tr> <tr> <td><code>get_design(design_id)</code></td> <td>One design.</td> </tr> <tr> <td><code>get_execution_plan(design_id, detail=false)</code></td> <td>A compact summary: per step the actions (kind, device, from/to rack and U), per touched rack draw/capacity/util/state, only the warn/critical/overload banks, and the problems. <code>detail=true</code> returns the full simulation payload (very large). It makes one POST to <code>simulate-steps</code> with the saved order; the POST changes nothing.</td> </tr> <tr> <td><code>get_work_order(design_id, step=None)</code></td> <td>The work order: per action the device, serial, asset tag, from and to (rack, U, face), power cabling, status afterwards and a NetBox link; per step the power headroom and problems.</td> </tr> <tr> <td><code>simulate_order(design_id, steps, detail=false)</code></td> <td>"What if" for a proposed order of placement ids; compact summary like <code>get_execution_plan</code>, <code>detail=true</code> for the raw result. A POST that changes nothing.</td> </tr> </tbody> </table> <p>Claude Code also gets the prompt <code>smart_hands_ticket(design_id, step, instructions="")</code>, shown as <code>/mcp__rack-design__smart_hands_ticket</code>. Claude Desktop handles MCP prompts poorly, so the default format below is also written into the <code>get_work_order</code> tool description, which every client reads.</p> <h3 id="the-ticket-format-is-yours">The ticket format is yours<a class="headerlink" href="#the-ticket-format-is-yours" title="Permanent link">¶</a></h3> <p>The plugin and the MCP server only supply data. Where the ticket goes and how it looks is up to your instructions; they always win over the default. Put them in a Claude project, a skill, or simply in the chat.</p> <p><strong>Example only</strong> (describes a made-up team's format, copy and adapt):</p> <div class="highlight"><pre><span></span><code>Write the ticket in Jira wiki markup for the DC-OPS project. Title: "[<site>] <design title> - step <n>". One sub-task line per action. Always give serial numbers in a table: device | serial | rack U. Add the on-call number +31 20 000 0000 at the bottom. Skip the rollback section for steps that only remove devices. </code></pre></div> <h4 id="default-format">Default format<a class="headerlink" href="#default-format" title="Permanent link">¶</a></h4> <p>When you give no instructions, Claude writes:</p> <ol> <li><strong>Header</strong>: design, step, site, rack(s), maintenance window.</li> <li><strong>Safety notes</strong>: power headroom per rack from the simulation ("R12 peaks at 6.7/8 kW"), devices that stay live, the PDU and bank touched, any problems the plan reports.</li> <li><strong>Numbered actions</strong> in the safe order, each with device, from/to rack and U, serial and asset tag, power cabling.</li> <li><strong>A photo or check per action</strong>, for example "photo of R12 front after U20 is installed".</li> <li><strong>A rollback line</strong>: how to undo the step if something goes wrong.</li> <li><strong>What to report back</strong>: serials, photos, any deviation from the plan.</li> </ol> </article> </div> <script>var target=document.getElementById(location.hash.slice(1));target&&target.name&&(target.checked=target.name.startsWith("__tabbed_"))</script> </div> </main> <footer class="md-footer"> <div class="md-footer-meta md-typeset"> <div class="md-footer-meta__inner md-grid"> <div class="md-copyright"> Made with <a href="https://squidfunk.github.io/mkdocs-material/" target="_blank" rel="noopener"> Material for MkDocs </a> </div> <div class="md-social"> <a href="https://github.com/ravenrs/netbox-rack-design" target="_blank" rel="noopener" title="Github" class="md-social__link"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--! Font Awesome Free 7.1.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2025 Fonticons, Inc.--><path d="M173.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3.3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6m-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5.3-6.2 2.3m44.2-1.7c-2.9.7-4.9 2.6-4.6 4.9.3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9M252.8 8C114.1 8 8 113.3 8 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C436.2 457.8 504 362.9 504 252 504 113.3 391.5 8 252.8 8M105.2 352.9c-1.3 1-1 3.3.7 5.2 1.6 1.6 3.9 2.3 5.2 1 1.3-1 1-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1m-10.8-8.1c-.7 1.3.3 2.9 2.3 3.9 1.6 1 3.6.7 4.3-.7.7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3.7m32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2 2.3 2.3 5.2 2.6 6.5 1 1.3-1.3.7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1m-11.4-14.7c-1.6 1-1.6 3.6 0 5.9s4.3 3.3 5.6 2.3c1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2"/></svg> </a> <a href="mailto:ravenrs@gmail.com" target="_blank" rel="noopener" title="" class="md-social__link"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="m20 8-8 5-8-5V6l8 5 8-5m0-2H4c-1.11 0-2 .89-2 2v12a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2"/></svg> </a> </div> </div> </div> </footer> </div> <div class="md-dialog" data-md-component="dialog"> <div class="md-dialog__inner md-typeset"></div> </div> <script id="__config" type="application/json">{"annotate": null, "base": "..", "features": ["navigation.indexes", "navigation.instant", "navigation.tabs.sticky"], "search": "../assets/javascripts/workers/search.2c215733.min.js", "tags": null, "translations": {"clipboard.copied": "Copied to clipboard", "clipboard.copy": "Copy to clipboard", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.placeholder": "Type to start searching", "search.result.term.missing": "Missing", "select.version": "Select version"}, "version": null}</script> <script src="../assets/javascripts/bundle.d7400e89.min.js"></script> </body> </html>