Skip to main content

nautobot-mcp

A Model Context Protocol server that exposes Nautobot's built-in REST and GraphQL APIs as tools for LLMs and AI assistants such as Claude Desktop, Cursor, and any other MCP-compatible client.

It can be used in two ways:

  • As a Nautobot app — drop it into a Nautobot environment, configure PLUGINS_CONFIG, and run the MCP server alongside Nautobot.
  • As a standalone stdio MCP server — installed in any Python environment with the nautobot-mcp console script, talking to a remote Nautobot over its REST API.

Core tools cover DCIM, IPAM, circuits, tenancy, virtualization, extras/jobs, users, and GraphQL. Optional extras add Design Builder, Onboarding, SSoT, Golden Config, and Nornir. The generic rest_list / rest_get tools work against any other endpoint the token can access.

Installation

Published on PyPI as nautobot-mcp. The Nautobot plugin name is nautobot_mcp. The console script is nautobot-mcp. Release history is in CHANGELOG.md.

pip install nautobot-mcp

When running inside a Nautobot environment, install the optional nautobot extra (it pins a compatible Nautobot version):

pip install "nautobot-mcp[nautobot]"

Optional Nautobot app (plugin) integrations

The base install exposes only Nautobot core tools. Tools for the NetworkToCode apps are optional and can be added via extras:

pip install "nautobot-mcp[design-builder]"   # Design Builder tools
pip install "nautobot-mcp[onboarding]"        # Device Onboarding tools
pip install "nautobot-mcp[ssot]"              # SSoT tools
pip install "nautobot-mcp[golden-config]"     # Golden Config tools
pip install "nautobot-mcp[nornir]"            # Nornir backend tools
pip install "nautobot-mcp[all]"               # all of the above

By default (plugins = ["auto"]) the server calls GET /api/status/ and enables tools for apps listed in nautobot-apps. That covers a local Claude or Cursor process too, so NAUTOBOT_MCP_PLUGINS is optional. Tools are also enabled when the app package is installed in this process.

Force tools on without asking the API:

export NAUTOBOT_MCP_PLUGINS="design_builder,ssot"   # or "all"

Use the list_active_plugins tool to see what's configured, enabled, and available.

Configure as a Nautobot app

In your nautobot_config.py:

PLUGINS = ["nautobot_mcp"]

PLUGINS_CONFIG = {
    "nautobot_mcp": {
        "nautobot_url": "https://nautobot.example.com",
        "nautobot_token": "YOUR_API_TOKEN",
        "verify_ssl": True,
        # Optional
        "ca_bundle": "",
        "request_timeout": 30,
        "max_pagination_records": 5000,
        "allow_writes": False,
        "log_level": "INFO",
        "require_client_token": False,
        # Tenant scoping (MSP multi-tenant isolation); empty = no scoping
        "tenant_scope": [],          # e.g. ["acme", "globex"]
        "tenant_group_scope": [],    # e.g. ["managed-customers"]
    }
}

Restart Nautobot. The app is listed under Apps → Installed Apps. Apps → MCP Server → MCP Server Status (/plugins/mcp-server/) shows the resolved settings. Set log_file to also show the log tail there.

Then run the MCP server alongside Nautobot. The status page is not the MCP endpoint.

nautobot-mcp

It reads the same configuration from PLUGINS_CONFIG when launched from a Nautobot environment.

Configure as a standalone MCP server

Set environment variables and run the console script:

export NAUTOBOT_URL="https://nautobot.example.com"
export NAUTOBOT_TOKEN="YOUR_API_TOKEN"
nautobot-mcp

All configuration knobs:

Env var Default Purpose
NAUTOBOT_URL — (required) Nautobot base URL.
NAUTOBOT_TOKEN — (required unless client tokens) API token for this process.
NAUTOBOT_MCP_REQUIRE_CLIENT_TOKEN false HTTP clients must send their own Nautobot token.
NAUTOBOT_MCP_VERIFY_SSL true false disables TLS verification.
NAUTOBOT_MCP_CA_BUNDLE — Path to a CA bundle (private CA setups).
NAUTOBOT_MCP_TIMEOUT 30 HTTP timeout in seconds.
NAUTOBOT_MCP_MAX_PAGINATION_RECORDS 5000 Hard cap when paginate=True.
NAUTOBOT_MCP_ALLOW_WRITES false Enable POST/PATCH/PUT/DELETE tools.
NAUTOBOT_MCP_TENANT_SCOPE — Comma-separated tenant names/slugs to restrict access to.
NAUTOBOT_MCP_TENANT_GROUP_SCOPE — Comma-separated tenant group names to restrict access to.
NAUTOBOT_MCP_PLUGINS auto Plugin integrations to enable.
NAUTOBOT_MCP_LOG_LEVEL INFO Log level (logs go to stderr).
NAUTOBOT_MCP_LOG_FILE — Also append logs to this file. The Nautobot status page shows the tail.
NAUTOBOT_MCP_HOST 127.0.0.1 Bind address for streamable-http and sse.
NAUTOBOT_MCP_PORT 8000 Bind port for streamable-http and sse.

NAUTOBOT_URL is the Nautobot instance. NAUTOBOT_TOKEN is this process's token, unless NAUTOBOT_MCP_REQUIRE_CLIENT_TOKEN is set and each HTTP client sends its own. MCP-specific knobs use the NAUTOBOT_MCP_ prefix. Legacy unprefixed names (NAUTOBOT_ALLOW_WRITES, NAUTOBOT_TENANT_SCOPE, MCP_LOG_LEVEL, …) are still accepted; the prefixed form wins when both are set.

Hooking into Claude Desktop

uvx nautobot-mcp works because the console script name matches the package name. Add to claude_desktop_config.json:

{
  "mcpServers": {
    "nautobot": {
      "command": "uvx",
      "args": ["nautobot-mcp"],
      "env": {
        "NAUTOBOT_URL": "https://nautobot.example.com",
        "NAUTOBOT_TOKEN": "YOUR_API_TOKEN"
      }
    }
  }
}

If the package is already on PATH, "command": "nautobot-mcp" is enough.

Other transports are also supported via CLI flag. They listen on 127.0.0.1:8000 unless you set --host / --port (or NAUTOBOT_MCP_HOST / NAUTOBOT_MCP_PORT). Use a non-loopback address when a reverse proxy on another host connects to this process. The Nautobot app does not serve MCP itself; point the client at this process, or at the proxy in front of it.

nautobot-mcp --transport streamable-http
nautobot-mcp --transport streamable-http --host 0.0.0.0 --port 8000
nautobot-mcp --transport sse

Streamable HTTP is served at /mcp. SSE is served at /sse.

One Nautobot user per MCP client

Nautobot records changes as the user that owns the API token. Put each person's token in their own client so the change log shows who did what.

On a shared HTTP server, do not set NAUTOBOT_TOKEN. Require the client token instead:

export NAUTOBOT_URL="https://nautobot.example.com"
export NAUTOBOT_MCP_REQUIRE_CLIENT_TOKEN=true
nautobot-mcp --transport streamable-http --host 0.0.0.0 --port 8000

Each Cursor, Claude Desktop, or other MCP client sends its own token:

{
  "mcpServers": {
    "nautobot": {
      "url": "http://mcp-host:8000/mcp",
      "headers": {
        "X-Nautobot-Token": "YOUR_PERSONAL_API_TOKEN"
      }
    }
  }
}

Authorization: Token <your token> is also accepted. A request without a token is refused, so it is not attributed to a shared account. A local stdio process is already one person: set NAUTOBOT_TOKEN in that person's MCP config to their token.

Read-only by default

Mutating operations (rest_create, rest_update, rest_delete) are blocked unless you explicitly set NAUTOBOT_MCP_ALLOW_WRITES=true (or allow_writes: true in PLUGINS_CONFIG). GraphQL queries and Nautobot Job runs are allowed regardless, since they are sandboxed by Nautobot's own permission model and the API token's scope.

Tenant scoping (multi-tenant / MSP isolation)

For MSP-style deployments where one server (and one Nautobot token) serves agents acting on behalf of different customers, you can lock the server to one or more tenants. Set tenant_scope (tenant names/slugs) and/or tenant_group_scope (tenant group names), via env vars or PLUGINS_CONFIG:

export NAUTOBOT_MCP_TENANT_SCOPE="acme"
# or multiple / by group:
export NAUTOBOT_MCP_TENANT_SCOPE="acme,globex"
export NAUTOBOT_MCP_TENANT_GROUP_SCOPE="managed-customers"

When a scope is active, enforcement happens centrally in the client, so an agent cannot cross customer boundaries regardless of the filters it passes:

  • List/search on tenant-aware endpoints (devices, racks, locations, prefixes, IP addresses, VLANs, VRFs, circuits, VMs, clusters) is constrained to the in-scope tenants. Any caller-supplied tenant/tenant_id filter is dropped and replaced.
  • Single-object reads are verified against the scope; out-of-scope objects (including those with no tenant) raise PermissionError.
  • Creates must target an in-scope tenant. If exactly one tenant is in scope it is injected automatically; with multiple, tenant must be set explicitly.
  • Updates/deletes first verify the target object is in scope, and reject reassigning an object to an out-of-scope tenant.

Non-tenant-aware endpoints (manufacturers, platforms, statuses, content-types, …) are left untouched. Run the tenant_scope_info tool to see the active scope and resolved tenant UUIDs.

Note: tenant scoping constrains the REST tools. The generic graphql_query tool and Nautobot Job runs are not tenant-filtered — rely on a tenant-restricted API token and/or per-job permissions for those paths.

Tool catalog

Discovery & metadata

  • nautobot_status — Nautobot version, plugins, db backend
  • list_api_roots — top-level REST categories
  • list_endpoints_in(category) — sub-endpoints inside dcim, ipam, etc.
  • list_content_types
  • tenant_scope_info — active tenant scope (if any) and resolved tenant UUIDs
  • list_active_plugins — configured/enabled/available plugin integrations

Generic REST passthrough

  • rest_list(endpoint, filters, limit, offset, paginate, max_records)
  • rest_get(endpoint, object_id)
  • rest_create(endpoint, data) (write)
  • rest_update(endpoint, object_id, data, partial) (write)
  • rest_delete(endpoint, object_id) (write)

DCIM

  • list_devices, get_device, get_device_interfaces, get_device_config_context, get_device_inventory
  • list_locations, get_location, list_location_types
  • list_racks, get_rack, get_rack_elevation
  • list_device_types, list_device_roles, list_manufacturers, list_platforms
  • list_cables

IPAM

  • list_prefixes, get_prefix, get_available_ips, get_available_prefixes
  • list_ip_addresses, get_ip_address
  • list_vlans, get_vlan, list_vlan_groups
  • list_vrfs, list_rirs, list_namespaces

Circuits / Tenancy / Virtualization

  • list_circuits, get_circuit, list_providers, list_circuit_types, list_circuit_terminations
  • list_tenants, get_tenant, list_tenant_groups
  • list_virtual_machines, get_virtual_machine, get_vm_interfaces, list_clusters, list_cluster_types

Extras (jobs, statuses, tags, custom fields, …)

  • list_jobs, get_job, run_job, get_job_result, list_recent_job_results, get_job_logs
  • list_statuses, list_tags, list_roles
  • list_custom_fields, list_relationships, list_computed_fields, list_config_contexts
  • list_webhooks, list_secrets_groups

Users

  • list_users, list_groups, list_object_permissions

GraphQL

  • graphql_query(query, variables)
  • graphql_introspect

Cross-domain search shortcuts

  • search_devices, search_ip_addresses, search_prefixes, search_locations, search_circuits

Optional plugin tools

Registered only when the matching plugin is enabled (see Optional Nautobot app integrations).

  • Design Builder — list_designs, list_design_deployments, list_design_jobs, run_design
  • Device Onboarding — list_onboarding_jobs, onboard_device
  • SSoT — list_ssot_jobs, list_ssot_syncs, list_ssot_sync_logs, run_ssot_sync
  • Golden Config — list_config_compliance, compliance_summary, list_compliance_rules, list_compliance_features, list_golden_config, list_golden_config_settings, get_intended_config, list_golden_config_jobs, run_golden_config_job
  • Nornir — nornir_plugin_info (backend used by Golden Config / Onboarding; device tasks run via those apps' jobs)

Development

pip install -e ".[dev]"
ruff check nautobot_mcp tests
pytest -v
python -m build

Roadmap

  • More wrappers for popular Nautobot apps (Golden Config, ChatOps, …) using the optional-plugin pattern.
  • Streaming responses for very large result sets.
  • HTTP /health endpoint for the streamable-http transport.

License

MIT

Metadata

Release files for nautobot-mcp 0.2.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for nautobot-mcp 0.2.6
File Size Uploaded Provenance Actions
nautobot_mcp-0.2.6.tar.gz 52.0 kB With provenance Details for nautobot_mcp-0.2.6.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for nautobot-mcp 0.2.6
File Interpreter ABI Platform Actions
nautobot_mcp-0.2.6-py3-none-any.whl Python 3 none any Details for nautobot_mcp-0.2.6-py3-none-any.whl

Total release size: 105.8 kB

Release files / nautobot_mcp-0.2.6.tar.gz

Download URL nautobot_mcp-0.2.6.tar.gz
Size 52.0 kB
Tags Source
SHA-256 checksum
How to use checksums
daabcf9f7e4359b6ea41fa2d499758b8ab3dbf2e3c52deb1f9789aa05e6ad20e
BLAKE2b-256 checksum
How to use checksums
4662e74107480b5f4a677f356d411ecad81aae3c5397cf31579cbb316daa1949
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 24, 2026.

Transparency log

Release files / nautobot_mcp-0.2.6-py3-none-any.whl

Download URL nautobot_mcp-0.2.6-py3-none-any.whl
Size 53.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7bf9bdd861eee3efb846350ce8a523f9547e25aaaafcc21d8a67ba1e5a9f45c5
BLAKE2b-256 checksum
How to use checksums
77fafa13705a1dde1c39b3d1786b96a513436b489eba1c236f1c96f00e40b89a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 24, 2026.

Transparency log

Security for nautobot-mcp 0.2.6

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for nautobot_mcp-0.2.6.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 24, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page