Nautobot Network Infrastructure MCP server

Integrates with Nautobot network infrastructure management platform, enabling querying and interaction with network data through tools for retrieving information about devices, interfaces, circuits, IP addresses, and locations.
Back to servers
Setup instructions
Provider
Geury Torres
Release date
Mar 29, 2025
Language
Python
Package
Stats
1.3K downloads
14 stars

Nautobot MCP enables AI assistants and applications to interact with your network data through a standardized protocol. It runs an MCP server alongside Nautobot that exposes tools which can be used by AI systems to access and manage your network automation environment.

Installation

Package Installation

Install the package using pip:

pip install nautobot-mcp

Nautobot Configuration

Add the app to your Nautobot configuration:

# In your nautobot_config.py
PLUGINS = [
    "nautobot_mcp",
    # ... other plugins
]

Plugin Configuration

Configure the MCP server in your Nautobot configuration file:

# In your nautobot_config.py
PLUGINS_CONFIG = {
    "nautobot_mcp": {
        "MCP_PORT": 8005,  # MCP server port
        "MCP_HOST": "0.0.0.0",  # Default is 0.0.0.0
        "MCP_CUSTOM_TOOLS_DIR": "/path/to/your/custom/tools",  # Directory for custom tools
        "MCP_LOAD_CORE_TOOLS": False,  # Load built-in tools
    },
}

Finalize Installation

Run the post-upgrade command to complete the installation:

nautobot-server post_upgrade

Usage

Starting the MCP Server

You can start the MCP server manually with:

nautobot-server start_mcp_server

Production Deployment with Systemd

For production environments, it's recommended to use systemd:

  1. Create a systemd service file at /etc/systemd/system/nautobot-mcp.service:
[Unit]
Description=Nautobot MCP Server
After=network-online.target
Wants=network-online.target

[Service]
User=nautobot
Group=nautobot
WorkingDirectory=/opt/nautobot
ExecStart=/opt/nautobot/venv/bin/nautobot-server start_mcp_server
Restart=on-failure
RestartSec=30
PrivateTmp=true

[Install]
WantedBy=multi-user.target
  1. Enable and start the service:
sudo systemctl daemon-reload
sudo systemctl enable --now nautobot-mcp.service

Creating Custom Tools

You can extend functionality by creating custom tools in the directory specified by MCP_CUSTOM_TOOLS_DIR:

# In /path/to/your/custom/tools/my_tools.py

def some_tool(param1: str, param2: str) -> dict:
    """Some tool description"""
    # Your implementation here
    return {"result": f"Tool result for {param1} and {param2}"}

Viewing Available Tools

Access the web interface to see all available tools:

https://your-nautobot-server/plugins/nautobot-mcp/tools/

This page displays all registered tools with their descriptions, module paths, and parameter specifications.

How to install this MCP server

For Claude Code

To add this MCP server to Claude Code, run this command in your terminal:

claude mcp add-json "nautobot-mcp" '{"command":"pip","args":["install","nautobot-mcp"]}'

See the official Claude Code MCP documentation for more details.

For Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "nautobot-mcp": {
            "command": "pip",
            "args": [
                "install",
                "nautobot-mcp"
            ]
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.

For Claude Desktop

To add this MCP server to Claude Desktop:

1. Find your configuration file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json

2. Add this to your configuration file:

{
    "mcpServers": {
        "nautobot-mcp": {
            "command": "pip",
            "args": [
                "install",
                "nautobot-mcp"
            ]
        }
    }
}

3. Restart Claude Desktop for the changes to take effect

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later