Get the FREE Ultimate OpenClaw Setup Guide →

nautobot_mcp

Nautobot Model Context Protocol (MCP) Server - Contains STDIO and HTTP Deployments with Embedding Search and RAG.

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio kvncampos-nautobot_mcp python main.py --mode stdio \
  --env LOG_LEVEL="INFO" \
  --env API_PREFIX="nautobot_openapi" \
  --env SSL_VERIFY="False" \
  --env SERVER_NAME="nautobot_mcp" \
  --env GITHUB_TOKEN="your_github_token" \
  --env NAUTOBOT_ENV="local" \
  --env NAUTOBOT_TOKEN="your_nautobot_api_token" \
  --env SERVER_VERSION="0.2.0" \
  --env EMBEDDING_MODEL="all-MiniLM-L6-v2" \
  --env POSTHOG_API_KEY="disable" \
  --env DEFAULT_SEARCH_RESULTS="5"

How to use

This MCP server provides intelligent access to Nautobot APIs via semantic search and dynamic API requests. It exposes tools to perform CRUD operations against Nautobot endpoints, discover endpoints semantically, and search through a knowledge base of Nautobot documentation and code. You can run the server in stdio mode for local development or in HTTP/REST mode for web-based integrations. The included tools include nautobot_dynamic_api_request for arbitrary HTTP methods, nautobot_openapi_api_request_schema to discover available endpoints, and nautobot_kb_semantic_search to query the indexed Nautobot documentation and repositories. The server supports multi-environment Nautobot instances (dev, staging, prod) and uses a ChromaDB-backed vector store to enable fast semantic search with Git-based knowledge base updates.

How to install

Prerequisites:

  • Python 3.11+ (3.11 recommended)
  • Git
  • Access to a Nautobot instance (token-based authentication)

Option A — Local Python Installation:

  1. Clone the repository: git clone <repository-url> cd nautobot_mcp
  2. Create and activate a virtual environment (optional but recommended): python -m venv venv

    On Windows: venv\Scripts\activate

    On macOS/Linux: source venv/bin/activate

  3. Install dependencies: pip install -e .
  4. Configure environment variables (see .env.example): cp .env.example .env

    Edit .env as needed

  5. Run the server (stdio mode): python main.py --mode stdio

Option B — Docker (Recommended):

  1. Clone the repository and navigate to nautobot_mcp.
  2. Copy and customize environment variables: cp .env.example .env
  3. Run in stdio mode with Docker Compose: docker compose up -d

    For HTTP mode, set MCP_TRANSPORT=http and MCP_PORT as needed, then rerun with the environment updated

  4. View logs: docker compose logs -f

Additional notes

Tips and common issues:

  • Ensure NAUTOBOT_TOKEN and NAUTOBOT_ENV reflect your Nautobot instance and environment.
  • If using the knowledge base indexing features, ensure GITHUB_TOKEN is set if you plan to access private repositories used for indexing.
  • For HTTP mode, open port 8000 (or as configured) and set MCP_TRANSPORT=http in the environment.
  • The default configuration assumes local development; adapt SERVER_NAME, API_PREFIX, and repository settings as needed for production deployments.
  • If you encounter SSL issues in development, you can set SSL_VERIFY=False in the environment, but enable SSL_VERIFY=True in production.
  • The tools rely on a ChromaDB store; ensure the volumes or paths for chroma_db and models are writable and persisted between runs.

Related MCP Servers

Sponsor this space

Reach thousands of developers