- Home
- MCP servers
- MCP Nautobot
MCP Nautobot
- python
1
GitHub Stars
python
Language
6 months ago
First Indexed
2 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"aiopnet-mcp-nautobot": {
"command": "python",
"args": [
"-m",
"mcp_nautobot.server"
],
"env": {
"MCP_HOST": "127.0.0.1",
"MCP_PORT": "8000",
"LOG_LEVEL": "INFO",
"NAUTOBOT_URL": "YOUR_NAUTOBOT_URL",
"NAUTOBOT_TOKEN": "YOUR_TOKEN"
}
}
}
}You can run a MCP server that exposes Nautobot network inventory data to MCP-compatible AI assistants. This server lets you query sites, devices, topology, and other network information from Nautobot through a secure, role-aware MCP interface that works with Claude and other MCP clients.
How to use
Start the MCP server locally and connect your MCP client to the provided endpoint. Once running, you can ask your MCP client to retrieve Nautobot inventory information such as sites, devices, and network topology. Use the client to request data by domain (for example, sites in a region, devices in a datacenter, or specific device details) and leverage role-based access controls to limit what different users can see.
How to install
Prerequisites you need before starting are Python 3.10 or newer and access to a Nautobot instance with an API token. You will also use a Python virtual environment for isolation.
# Clone the MCP Nautobot server repository
git clone https://github.com/aiopnet/mcp-nautobot.git
cd mcp-nautobot
# Create and activate a virtual environment
uv venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate
# Install dependencies in editable mode
uv pip install -e . # Requires pip 21.3+ for editable installs with pyproject.toml
Configuration
Prepare your environment file to configure the MCP server. Create a copy of the example and edit with your actual values.
cp .env.example .env
# Edit .env with your favorite editor
Environment variables
The server relies on the following environment variables. Provide your Nautobot URL and token, and set the port/host for the MCP interface. Do not commit these values to version control.
Variables and typical use:
NAUTOBOT_URL: URL of your Nautobot instance NAUTOBOT_TOKEN: API token with read permissions MCP_PORT: Port for the MCP server to listen on (default 8000) MCP_HOST: Host for the MCP server to bind to (default 127.0.0.1) LOG_LEVEL: Logging level (DEBUG, INFO, WARNING, ERROR; default INFO)
Starting the server
# Start the MCP server using the Python module
python -m mcp_nautobot.server
# Or start via the provided CLI
mcp-nautobot-server
Security notes
Keep your API tokens secure and do not expose the .env file publicly. Use proper access controls to restrict who can interact with Nautobot data through the MCP server.
Usage tips
After starting, connect your MCP client to http://127.0.0.1:8000 by default, or to your configured host/port. Use your client to query Nautobot for site information, device details, topology, and more as described by your MCP client’s capabilities.
Troubleshooting
If you encounter issues starting the server, verify your Python version, ensure Nautobot is reachable, and confirm that the .env file contains valid values for NAUTOBOT_URL and NAUTOBOT_TOKEN. Check logs at the level you set with LOG_LEVEL for clues.
Available tools
Site information
Retrieve detailed site location data from Nautobot, including region and site metadata.
Device details
Access device specifications, interfaces, and configurations stored in Nautobot.
Network topology
Explore network connections and relationships as represented in Nautobot inventories.
Role-based access
Control data visibility by user role to enforce security and data governance.
Flexible presentation
Customize how data is presented to MCP clients, enabling tailored responses.