Nautobot MCP Server
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Nautobot MCP Server run a drift check comparing live interfaces to Nautobot"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
nautobot-mcp-cli
MCP server and CLI for Nautobot network automation — lets AI agents (and humans) interact with Nautobot via a 3-tool API Bridge: discover endpoints, call any REST API, or run composite workflows. Covers inventory, config onboarding, drift detection, and full Juniper CMS model audits — no config files required.
Features
MCP Tools (v1.7 API Bridge — 3 tools)
Tool | Purpose |
| Discover all available endpoints and workflows, filtered by domain ( |
| Universal REST dispatcher — GET, POST, PATCH, DELETE against any |
| Run a composite server-side workflow by ID; returns |
Available Workflows
Workflow ID | Covers | Optional Params |
| BGP groups + neighbor counts |
|
| Static routes with next-hops |
|
| Firewall filters + term counts |
|
| Interface units with families, VRRP, ARP |
|
| Parse + push config to Nautobot (dry-run safe) | — |
| File-free drift: live interfaces vs Nautobot | — |
| DiffSync model drift report | — |
| Golden Config compliance check | — |
| Live BGP neighbors vs CMS records | — |
| Live static routes vs CMS records | — |
CLI Commands
Capability | CLI Command |
Devices — list, get, create, update, delete |
|
Interfaces — list, get, create, update |
|
IPAM — prefixes, IPs, VLANs |
|
Golden Config — intended/backup/compliance |
|
Config Parsing — parse JunOS JSON |
|
Onboarding — device config to Nautobot |
|
Verification — compliance + drift |
|
CMS — routing, interfaces, firewalls, policies, drift |
|
Related MCP server: network-mcp
Requirements
Python ≥ 3.11
uv (recommended) or pip
Nautobot ≥ 2.x with a valid API token
(Optional) Nautobot Golden Config plugin — required for Golden Config / compliance features
Installation
Using uv (recommended)
# Clone the repo
git clone https://github.com/latuannetnam/nautobot-mcp-cli.git
cd nautobot-mcp-cli
# Create virtual environment and install
uv sync
# Install with dev dependencies
uv sync --extra devUsing pip
pip install -e .
# or with dev deps
pip install -e ".[dev]"After installation the nautobot-mcp CLI entry point is available in your environment.
Install Claude Code Skills (optional)
The repo ships reusable Claude Code skills under .claude/skills/. Run once to install them into your Claude Code profile:
pwsh scripts/install-skills.ps1This copies all skills from .claude/skills/ to $HOME/.claude/skills/. Re-run after git pull to pick up skill updates.
Configuration
Configuration is loaded from multiple sources. Higher-numbered sources override lower ones:
Default values
YAML config file
Environment variables
CLI flags (
--url,--token,--profile,--no-verify)
Option 1 — YAML config file
The app automatically discovers config files in this order (first found wins):
Priority | Path |
1 |
|
2 |
|
Create a YAML file at either location:
profiles:
default:
url: "https://nautobot.example.com"
token: "your-api-token-here"
verify_ssl: true
# api_version: "2.0" # optional — auto-detected if omitted
staging:
url: "https://nautobot-staging.example.com"
token: "staging-token-here"
verify_ssl: false
active_profile: default # which profile to use by default
default_limit: 50 # max results per query (0 = unlimited)Profile fields:
Field | Type | Default | Description |
| string | required | Nautobot server base URL |
| string | required | API authentication token |
| bool |
| Verify SSL certificates |
| string |
| API version (auto-detected from server when omitted) |
You can also load a specific YAML file programmatically:
from nautobot_mcp.config import NautobotSettings
settings = NautobotSettings.load_from_yaml("/path/to/config.yaml")Option 2 — Environment variables
Set environment variables to configure without a file, or to override file values:
export NAUTOBOT_URL="https://nautobot.example.com"
export NAUTOBOT_TOKEN="your-token-here"
export NAUTOBOT_VERIFY_SSL="true" # true/1/yes to enable
export NAUTOBOT_PROFILE="staging" # select a named profileVariable | Description |
| Nautobot base URL |
| API token |
| SSL verification ( |
| Active profile name |
Note: When both
NAUTOBOT_URLandNAUTOBOT_TOKENare set, they create or overwrite the active profile in memory — the YAML file is not modified.
Option 3 — CLI flags
Override any setting per-invocation:
# Use a different profile
nautobot-mcp --profile staging devices list
# Provide URL and token directly (no config file needed)
nautobot-mcp --url https://nautobot.example.com --token abc123 devices list
# Skip SSL verification
nautobot-mcp --no-verify devices listOption 4 — Programmatic (Python API)
from nautobot_mcp.client import NautobotClient
from nautobot_mcp.config import NautobotProfile, NautobotSettings
# Direct profile — no file or env vars needed
profile = NautobotProfile(
url="https://nautobot.example.com",
token="your-token",
verify_ssl=True,
)
client = NautobotClient(profile=profile)
# Or auto-discover from file + env vars
settings = NautobotSettings.discover()
client = NautobotClient(settings=settings)MCP Server
The MCP server exposes all Nautobot operations as tools that AI agents (Claude, Cursor, etc.) can call directly.
Starting the server
# Recommended — uses the project venv automatically
uv run python main.py
# Alternative — via fastmcp CLI
uv run fastmcp run nautobot_mcp/server.pyIntegrating with Claude Desktop
Add to claude_desktop_config.json:
{
"mcpServers": {
"nautobot": {
"command": "uv",
"args": ["run", "python", "main.py"],
"cwd": "/path/to/nautobot-mcp-cli"
}
}
}Integrating with Antigravity / other MCP clients
{
"servers": {
"nautobot": {
"command": "uv",
"args": ["--directory", "/path/to/nautobot-mcp-cli", "run", "python", "main.py"],
"transport": "stdio"
}
}
}Available MCP tools (v1.7)
The server exposes 3 tools. Use nautobot_api_catalog to discover all endpoints and workflow IDs before calling the other two.
Parameter | Type | Description |
| string (optional) | Filter by domain: |
Returns a token-efficient catalog of all available endpoints grouped by domain. Includes workflow stub signatures.
# Discover all workflows
nautobot_api_catalog(domain="workflows")
# Discover CMS endpoints
nautobot_api_catalog(domain="cms")Parameter | Type | Description |
| string |
|
| string |
|
| dict (optional) | Query filters for GET |
| dict (optional) | Request body for POST/PATCH |
| string (optional) | Object UUID for single-object operations |
| int (optional) | Max results for GET list (default 50, hard cap 200) |
| bool (optional) | Skip count queries for faster paginated results (default false) |
Routes to pynautobot core (/api/*) or CMS plugin (cms:*) automatically.
# List devices
nautobot_call_nautobot(endpoint="/api/dcim/devices/", method="GET")
# Get specific device
nautobot_call_nautobot(endpoint="/api/dcim/devices/", method="GET", params={"name": "core-rtr-01"})
# Get CMS BGP groups for a device
nautobot_call_nautobot(endpoint="cms:juniper_bgp_groups", method="GET", params={"device": "core-rtr-01"})Response: {count, results, endpoint, method, latency_ms} — with optional truncated + total_available when capped. latency_ms is the full-call wall-clock time in milliseconds.
Parameter | Type | Description |
| string | One of the 10 registered workflow IDs |
| dict | Workflow-specific parameters |
Always returns: {workflow, device, status, data, error, timestamp}
# BGP summary
nautobot_run_workflow(workflow_id="bgp_summary", params={"device": "core-rtr-01"})
# Onboard config (dry-run)
nautobot_run_workflow(workflow_id="onboard_config", params={
"config_data": {...},
"device_name": "core-rtr-01",
"dry_run": True
})
# CMS BGP drift
nautobot_run_workflow(workflow_id="compare_bgp", params={
"device_name": "core-rtr-01",
"live_neighbors": [{"peer_ip": "10.0.0.1", "peer_as": 65001, ...}]
})Endpoint reference: Use
nautobot_api_catalog(domain="dcim")(oripam,cms,workflows) to discover the exact endpoint strings and workflow IDs accepted by the two dispatcher tools. All CRUD operations that were previously individual MCP tools are now routed throughnautobot_call_nautobotornautobot_run_workflow.
CLI Usage
uv run nautobot-mcp [OPTIONS] COMMAND [ARGS]...Tip:
uv runautomatically uses the project venv. Alternatively, activate it first (source .venv/bin/activateor.venv\Scripts\activate) and then usenautobot-mcpdirectly.
Global options
Option | Description |
| Use a specific config profile |
| Override Nautobot URL |
| Override API token |
| Skip SSL certificate verification |
| Output as JSON instead of table |
| Skip count queries for faster paginated results |
Commands
# Devices
uv run nautobot-mcp devices list
uv run nautobot-mcp devices list --location "HAN DC1" --role Router
uv run nautobot-mcp devices get --name core-rtr-01
uv run nautobot-mcp devices create --name new-rtr --device-type "MX480" --location "HAN DC1" --role Router
# Interfaces
uv run nautobot-mcp interfaces list --device core-rtr-01
uv run nautobot-mcp interfaces get --device-name core-rtr-01 --name ge-0/0/0
# IPAM
uv run nautobot-mcp ipam prefixes list
uv run nautobot-mcp ipam ips list
uv run nautobot-mcp ipam ips list --device core-rtr-01 # device-scoped
uv run nautobot-mcp ipam vlans list --location "HAN DC1"
uv run nautobot-mcp ipam vlans list --device core-rtr-01 # device-scoped
# Organization
uv run nautobot-mcp org tenants list
uv run nautobot-mcp org locations list
# Circuits
uv run nautobot-mcp circuits list --provider "VNPT"
# Golden Config
uv run nautobot-mcp golden-config show-intended core-rtr-01
uv run nautobot-mcp golden-config show-backup core-rtr-01
uv run nautobot-mcp golden-config compliance-results core-rtr-01
# Device summary & inventory
uv run nautobot-mcp devices summary core-rtr-01 # stats-only: interface/IP/VLAN counts
uv run nautobot-mcp devices inventory core-rtr-01 # paginated full detail
uv run nautobot-mcp devices inventory core-rtr-01 --detail all --limit 50 # all sections, 50 items
uv run nautobot-mcp devices inventory core-rtr-01 --detail ips --limit 100 --no-count # IPs only, no count fetches
# Parse JunOS config
uv run nautobot-mcp parse junos config.json
# Onboard device config (dry-run by default)
uv run nautobot-mcp onboard config config.json core-rtr-01
uv run nautobot-mcp onboard config config.json core-rtr-01 --commit # apply changes
uv run nautobot-mcp onboard config config.json core-rtr-01 --commit --update # also update existing
# Verify compliance
uv run nautobot-mcp verify compliance core-rtr-01
# Verify data model drift (requires config file)
uv run nautobot-mcp verify data-model config.json core-rtr-01
# File-free drift check — no config file needed
uv run nautobot-mcp verify quick-drift core-rtr-01 --interface ae0.0 --ip 10.1.1.1/30
uv run nautobot-mcp verify quick-drift core-rtr-01 -d '{"ae0.0": {"ips": ["10.1.1.1/30"]}}'
uv run nautobot-mcp verify quick-drift core-rtr-01 -f drift-input.json --json
# CMS Routing
uv run nautobot-mcp cms routing list-static-routes --device core-rtr-01
uv run nautobot-mcp cms routing bgp-summary --device core-rtr-01
uv run nautobot-mcp cms routing bgp-summary --device core-rtr-01 --limit 3 # cap at 3 groups + 3 neighbors/group
uv run nautobot-mcp cms routing routing-table --device core-rtr-01
uv run nautobot-mcp cms routing routing-table --device core-rtr-01 --limit 10 # cap at 10 routes
# CMS Interfaces
uv run nautobot-mcp cms interfaces list-units --device core-rtr-01
uv run nautobot-mcp cms interfaces detail --device core-rtr-01
uv run nautobot-mcp cms interfaces detail --device core-rtr-01 --detail=false # summary: no nested families/VRRP
uv run nautobot-mcp cms interfaces detail --device core-rtr-01 --limit 5 # cap at 5 units + 5 families/unit
uv run nautobot-mcp cms interfaces list-arp-entries --device core-rtr-01
# CMS Firewalls
uv run nautobot-mcp cms firewalls list-filters --device core-rtr-01
uv run nautobot-mcp cms firewalls firewall-summary --device core-rtr-01
uv run nautobot-mcp cms firewalls firewall-summary --device core-rtr-01 --limit 2 # cap filters + policers at 2 each
# CMS Drift — compare live device data against Nautobot CMS records
uv run nautobot-mcp cms drift bgp --device core-rtr-01 --from-file live-bgp.json
uv run nautobot-mcp cms drift routes --device core-rtr-01 --from-file live-routes.jsonConfig Onboarding Workflow
The onboarding engine parses a JunOS device config and creates/updates the corresponding Nautobot objects.
Supported parsers
Parser ID | Platform |
| Juniper JunOS (JSON output) |
Via CLI
Export the device config as JSON from the router:
# On JunOS device show configuration | display json | save /tmp/config.json # or fetch via jmcp MCP serverRun a dry-run to preview changes:
nautobot-mcp onboard config config.json core-rtr-01 \ --location "HAN DC1" \ --device-type "MX480" \ --role Router \ --namespace GlobalReview the planned actions (create / update / skip per object).
Apply with
--commit:nautobot-mcp onboard config config.json core-rtr-01 --commit
Objects created: Device → Interfaces → IP Addresses → VLANs
Via MCP Agent
AI agents use the onboard_config workflow (no filesystem required):
nautobot_run_workflow(workflow_id="onboard_config", params={
"config_data": <ParsedConfig dict>,
"device_name": "core-rtr-01",
"dry_run": True # set False to commit
})
→ {"workflow": "onboard_config", "status": "ok", "data": {...}}See the onboard-router-config skill (.agent/skills/onboard-router-config/SKILL.md) for the full step-by-step agent workflow.
CMS Drift Detection
Compare live Juniper device state (collected via jmcp) against Nautobot CMS model records. No config files required — data flows directly between tools.
BGP Drift
# Collect live BGP output from jmcp and save to file
# Then compare against Nautobot CMS records
nautobot-mcp cms drift bgp --device core-rtr-01 --from-file live-bgp.json
# Machine-readable output
nautobot-mcp --json cms drift bgp --device core-rtr-01 --from-file live-bgp.jsonInput (live-bgp.json) is a list of BGP neighbor records:
[{"peer_ip": "10.0.0.1", "peer_as": 65001, "local_address": "10.0.0.2", "group_name": "EXTERNAL"}]Route Drift
nautobot-mcp cms drift routes --device core-rtr-01 --from-file live-routes.jsonAgent Workflow (no filesystem, v1.3 API Bridge)
AI agents chain jmcp + the 3 API Bridge tools directly:
# Step 0: Discover workflows
nautobot_api_catalog(domain="workflows")
→ Returns all 10 workflow IDs with signatures
# Step 1: Collect live BGP from jmcp
execute_junos_command(router_name="core-rtr-01", command="show bgp summary | display json")
→ Returns live BGP neighbor list
# Step 2: Compare against CMS (single workflow call)
nautobot_run_workflow(workflow_id="compare_bgp", params={
"device_name": "core-rtr-01",
"live_neighbors": <output from step 1>
})
→ {"workflow": "compare_bgp", "status": "ok", "data": {
"total_drifts": 0, "missing": [], "extra": [], "changed": []
}}See cms-device-audit (.agent/skills/cms-device-audit/SKILL.md) for the full 6-step audit workflow.
Drift Detection
File-based (DiffSync, requires parsed config)
Compare a parsed JunOS config against Nautobot:
# Human-readable drift table
nautobot-mcp verify data-model config.json core-rtr-01
# JSON output for scripting
nautobot-mcp verify data-model config.json core-rtr-01 --jsonOutput shows missing, extra, and changed items across Interfaces, IP Addresses, and VLANs.
File-free — no config file needed
Pass interface data directly — as CLI flags, a JSON string, a file, or piped stdin:
# Quick single-interface check
nautobot-mcp verify quick-drift core-rtr-01 -i ae0.0 --ip 10.1.1.1/30 --vlan 100
# Bulk check via JSON string
nautobot-mcp verify quick-drift core-rtr-01 -d '{"ae0.0": {"ips": ["10.1.1.1/30"], "vlans": [100]}, "ge-0/0/0.0": {"ips": ["192.168.1.1/24"]}}'
# From a file
nautobot-mcp verify quick-drift core-rtr-01 -f drift-input.json
# JSON output for agent consumption
nautobot-mcp verify quick-drift core-rtr-01 -f drift-input.json --jsonOutput shows per-interface ✅ OK / ❌ DRIFT with details on missing/extra IPs and VLANs.
Agent workflow (no filesystem, v1.3 API Bridge)
AI agents use the workflow runner directly:
# File-free drift via workflow
nautobot_run_workflow(workflow_id="compare_device", params={
"device_name": "core-rtr-01",
"live_data": <structured interface dict from jmcp>
})
→ {"workflow": "compare_device", "status": "ok", "data": {
"summary": {"total_drifts": 0, ...},
"interface_drifts": [...]
}}Development
# Install dev dependencies
uv sync --extra dev
# Run tests (excludes live UAT tests by default)
uv run pytest
# Run tests with output
uv run pytest -v
# Run a single test file
uv run pytest tests/test_bridge.py
# Run live UAT tests (requires NAUTOBOT_UAT_URL + NAUTOBOT_TOKEN)
pytest tests/test_uat.py -m live -v
# Quick smoke test against live server
python scripts/uat_smoke_test.pyDeployment
As a systemd service (Linux)
# /etc/systemd/system/nautobot-mcp.service
[Unit]
Description=Nautobot MCP Server
After=network.target
[Service]
Type=simple
User=nautobot-mcp
WorkingDirectory=/opt/nautobot-mcp-cli
ExecStart=/opt/nautobot-mcp-cli/.venv/bin/python main.py
Restart=on-failure
Environment=NAUTOBOT_URL=https://nautobot.example.com
Environment=NAUTOBOT_TOKEN=your-token-here
[Install]
WantedBy=multi-user.targetsudo systemctl daemon-reload
sudo systemctl enable nautobot-mcp
sudo systemctl start nautobot-mcpUsing Docker
FROM python:3.11-slim
WORKDIR /app
COPY . .
RUN pip install uv && uv sync
CMD ["uv", "run", "python", "main.py"]docker build -t nautobot-mcp-cli .
docker run -e NAUTOBOT_URL=https://nautobot.example.com \
-e NAUTOBOT_TOKEN=your-token-here \
nautobot-mcp-cliLicense
MIT — see LICENSE.
Available Tools
3 toolsnautobot_api_catalogA
Discover available Nautobot API endpoints and composite workflows.
Returns a structured catalog of all endpoints the agent can access, including core Nautobot REST endpoints, CMS plugin endpoints, and pre-built composite workflows. Use this first to understand what's available before calling nautobot_call_nautobot or nautobot_run_workflow.
Args: domain: Filter by domain (e.g., 'dcim', 'ipam', 'circuits', 'cms', 'workflows'). None returns the full catalog. include_workflows: Include composite workflow entries (default: True). include_cms: Include CMS plugin endpoints (default: True).
Returns: Dict with 'endpoints' (list of {path, methods, description, domain}), 'workflows' (dict mapping workflow IDs to param/description metadata), and 'summary' (counts by domain).
Inputs: domain, include_cms, include_workflows. Returns: object
nautobot_call_nautobotA
Execute a REST CRUD operation against any Nautobot API endpoint.
Provides direct access to any Nautobot REST endpoint — core API and plugin endpoints (CMS, Golden Config, etc.). Supports full CRUD. Use nautobot_api_catalog first to discover endpoint paths.
Args:
method: HTTP method — GET, POST, PATCH, PUT, DELETE.
endpoint: API path (e.g., '/api/dcim/devices/', '/api/plugins/cms/bgp-groups/').
Can be partial path; bridge performs fuzzy matching if needed.
params: Query parameters for filtering (GET requests). Optional.
Example: {"device": "core-rtr-01"}
Note: prefer top-level limit and offset args over putting them in params.
body: Request body for write operations (POST, PATCH, PUT). Optional.
Must match Nautobot's expected schema for the endpoint.
limit: Server-side max results for GET list operations (default 50, hard cap 200).
offset: Skip N results for pagination (default 0). Requires limit > 0.
skip_count: If True, skip count() calls where applicable (default False).
Returns: Dict with 'count' (returned record count), 'results' (list of records), 'endpoint', and 'method'.
Inputs: method (required), endpoint (required), body, limit, +3 more. Returns: object
nautobot_run_workflowA
Execute a pre-built composite workflow aggregating multiple API calls.
Composite workflows encapsulate multi-step operations that would otherwise require several sequential nautobot_call_nautobot calls. Use nautobot_api_catalog (include_workflows=True) to discover available workflows and their required parameters.
Args: workflow_id: Workflow name (e.g., 'bgp_summary', 'firewall_summary', 'compare_device', 'onboard_config'). See nautobot_api_catalog for the full list. params: Workflow-specific parameters. Required params vary by workflow. Example for bgp_summary: {"device": "core-rtr-01", "detail": false} Example for compare_device: {"device_name": "rtr-01", "live_data": {...}}
Returns: Envelope dict with: - workflow: workflow_id echo - device: device identifier used - status: 'ok' or 'error' - data: workflow-specific output (serialized Pydantic model or dict) - error: error message if status=error, else null - timestamp: ISO 8601 UTC timestamp
Inputs: params (required), workflow_id (required). Returns: object
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 3 tools
The three tools have clearly distinct roles: discovery via nautobot_api_catalog, direct REST access via nautobot_call_nautobot, and composite execution via nautobot_run_workflow. The descriptions explicitly tell the agent when to use each, reducing misselection risk.
All three tools use the nautobot_ prefix, giving a predictable namespace. However, the suffixes mix noun-style (api_catalog), verbose verb-object (call_nautobot), and verb-object (run_workflow), so it is not a perfectly uniform convention.
Three tools are well-scoped for a generic Nautobot API bridge: one for discovery, one for arbitrary CRUD, and one for composite workflows. Each earns its place without bloat.
The surface covers discovery, full CRUD via generic endpoint calls, pagination, and composite workflows. A minor gap is the lack of endpoint schema/introspection details to help construct correct request bodies, but the core lifecycle is covered.
Maintenance
Related MCP Connectors
Discover, compare, route, and execute machine-accessible capabilities for AI agents.
Give AI agents 30,000+ safe, token-optimized actions across Workday, SAP, Oracle + hundreds more.
Lets AI agents analyze API metrics, request logs, and traces, and manage apps and alerts.
Connect, monitor, and control AI agents — tasks, approvals, schedules, and governance.
Related MCP Servers
- FlicenseNot gradedqualityFmaintenanceAn integration that enables AI assistants to interact with network data through a standardized protocol, providing AI-ready tools and interfaces for network automation and management.16-
- AlicenseNot gradedqualityDmaintenanceProvides AI assistants with direct access to multi-vendor network devices for tasks like configuration management, health checks, and topology discovery through 35 specialized tools. It enables natural language control over platforms including Cisco, Juniper, and Nokia using SSH, NETCONF, and SNMP protocols.12MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to interact with the Netdisco network management platform through its complete REST API, supporting device inspection, port queries, VLAN searches, and job management.MIT
- FlicenseNot gradedqualityCmaintenanceEnables AI agents to safely troubleshoot networks through read-only tools for device inventory, interface status, VLAN paths, BGP neighbors, route lookups, and interface error detection. Integrates with Microsoft Copilot Studio and Teams for natural-language-driven network diagnostics.-