home / mcp / nautobot mcp server
Nautobot plugin that enables AI assistants to interact with network data through the Model Context Protocol (MCP).
Configuration
View docs{
"mcpServers": {
"gt732-nautobot-app-mcp": {
"command": "nautobot-server",
"args": [
"start_mcp_server"
]
}
}
}The Nautobot MCP server lets you expose a machine-context protocol endpoint alongside Nautobot so AI assistants and apps can interact with your network data through standardized tools. You install a small plugin, configure how the MCP server runs, and then start the server to enable AI-driven automation and analysis against your network data.
To use the MCP server with a client, start the Nautobot MCP service and connect your MCP client to the server’s MCP endpoint. The server exposes a catalog of tools that your AI applications can invoke to read data, run actions, or compute results based on your network model.
- Start the MCP server alongside Nautobot using the recommended systemd approach or the manual start command. The MCP server runs within the Nautobot environment and will register its tools for discovery in the Nautobot UI.
- Access the tool catalog after the server starts to understand what actions are available. In your Nautobot web interface, navigate to /plugins/nautobot-mcp/tools/ to view all registered tools, their descriptions, and how to pass parameters.
- If you create custom tools, place Python functions in the configured custom tools directory. The MCP server will automatically discover and register those function-based tools so they appear in the tool catalog.
Prerequisites: You need Python and Nautobot installed and running in your environment. Ensure you have access to install Python packages and modify the Nautobot configuration files.
Step 1: Install the MCP plugin package.
pip install nautobot-mcpStep 2: Add the MCP plugin to your Nautobot configuration.
# In your nautobot_config.py
PLUGINS = [
"nautobot_mcp",
# ... other plugins
]Step 3: Configure MCP settings in Nautobot.
# 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
},
}Step 4: Apply database migrations or upgrade hooks if needed.
Step 5: Run the post-upgrade step to finalize MCP integration.
nautobot-server post_upgradeChoose one of the following methods to run the MCP server.
Manual start
nautobot-server start_mcp_serverSystemd service (recommended for production)
[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.targetOnce the MCP server is running, you can view all registered tools in the Nautobot web interface at the URL below. This page lists each tool, its description, module path, and parameter specifications.
https://your-nautobot-server/plugins/nautobot-mcp/tools/
Configure the MCP server through the Nautobot configuration system. The key settings include the port, host, a directory for custom tools, and whether to load core tools. You can set these in your PLUGINS_CONFIG block as shown in the installation steps.
- The MCP server runs inside the Nautobot process and uses the same authentication and authorization mechanisms as Nautobot. Ensure your Nautobot instance is secured and accessible only to trusted clients.
- If you add custom tools, place them in the specified MCP_CUSTOM_TOOLS_DIR. The MCP server will discover and register them automatically.
- If the MCP endpoint is not reachable, verify that Nautobot is running and that the MCP port is open on the host. Check the systemd service status or the console output from nautobot-server start_mcp_server for errors.
A sample function-based tool defined in the custom tools directory. It accepts two string parameters and returns a dictionary with a result message.