Nautobot AI Integration
STDIOMCP server integrating AI-ready tools with Nautobot for network automation and management.
MCP server integrating AI-ready tools with Nautobot for network automation and management.
This project is no longer maintained or updated. I am archiving this repository due to limited time and bandwidth to continue development.
This Nautobot app integrates the MCP (Model Context Protocol) server with Nautobot, providing AI-ready tools and interfaces for network automation and management.
Nautobot MCP enables AI assistants or applications to interact with your network data through a standardized protocol. The app runs an MCP server alongside Nautobot that exposes tools which can be used by AI systems.
https://modelcontextprotocol.io/introduction
https://github.com/user-attachments/assets/283d68c2-d35f-4506-b909-45c1850e7281
pip install nautobot-mcp
# In your nautobot_config.py PLUGINS = [ "nautobot_mcp", # ... other plugins ]
Configure the app through Nautobot's configuration system:
# 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 }, }
nautobot-server post_upgrade
You can create your own custom tools by defining Python functions in the directory specified in MCP_CUSTOM_TOOLS_DIR
.
Example custom tool:
# 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}"}
The MCP server will automatically discover and register all function-based tools in the specified directory.
You can start the MCP server manually:
nautobot-server start_mcp_server
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
Then enable and start the service:
sudo systemctl daemon-reload sudo systemctl enable --now nautobot-mcp.service
You can view all registered tools in the Nautobot web interface at:
https://your-nautobot-server/plugins/nautobot-mcp/tools/
This page shows all available tools, their descriptions, module paths, and parameter specifications.
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.