Quick Start Guide¶
Get up and running with the Nautobot MCP Server in minutes. This guide assumes you've completed the installation.
Starting the Server¶
Method 1: Direct Execution¶
Simply run the server script:
The server will:
- ✅ Initialize ChromaDB collections
- ✅ Fetch OpenAPI schema from Nautobot
- ✅ Update knowledge base repositories
- ✅ Start serving MCP requests
Expected output:
2024-10-14 20:30:01 [INFO] Initializing Nautobot MCP Server...
2024-10-14 20:30:02 [INFO] ChromaDB initialized at: /path/to/backend/nautobot_mcp
2024-10-14 20:30:03 [INFO] Refreshing API endpoints from OpenAPI schema...
2024-10-14 20:30:04 [INFO] Indexed 250 API endpoints
2024-10-14 20:30:05 [INFO] Updating knowledge base repositories...
2024-10-14 20:30:10 [INFO] Knowledge base ready with 5 repositories
2024-10-14 20:30:10 [INFO] Server ready on stdio
Method 2: With uv¶
Using uv to manage the environment:
VS Code Integration¶
Integrate the Nautobot MCP Server with GitHub Copilot in VS Code for an AI-powered Nautobot experience.
Prerequisites¶
- VS Code with GitHub Copilot extension installed
- Active GitHub Copilot subscription
- Nautobot MCP Server installed locally
Step 1: Open MCP Configuration¶
- Open VS Code
- Press
Cmd+Shift+P(macOS) orCtrl+Shift+P(Windows/Linux) - Type and select:
MCP: Open User Configuration
This opens the MCP settings file (usually ~/.config/Code/User/globalStorage/github.copilot-chat/mcp.json on macOS/Linux).
Step 2: Add Server Configuration¶
Add the Nautobot MCP Server to your configuration:
Use Absolute Paths
Replace /absolute/path/to/nautobot_mcp with the full path to your installation.
Example: /Users/johndoe/projects/nautobot_mcp or /home/johndoe/nautobot_mcp
Step 3: Restart VS Code¶
- Close all VS Code windows
- Reopen VS Code
- Open the Copilot Chat panel
Step 4: Verify Connection¶
In the Copilot Chat panel, you should see:
- ✅ A small indicator showing MCP tools are available
- ✅ The Nautobot MCP Server in the list of active servers
Test with a simple query:
Your First Queries¶
Now that the server is running and connected to VS Code Copilot, try these examples:
Example 1: Discover API Endpoints¶
Ask Copilot to find relevant endpoints:
Copilot will use the nautobot_openapi_api_request_schema tool to search for relevant endpoints.
Expected Response:
I found several endpoints for device management:
1. GET /api/dcim/devices/ - List all devices
2. POST /api/dcim/devices/ - Create a new device
3. GET /api/dcim/devices/{id}/ - Retrieve a specific device
4. PATCH /api/dcim/devices/{id}/ - Update a device
5. DELETE /api/dcim/devices/{id}/ - Delete a device
Example 2: Get API Data¶
Request data from your Nautobot instance:
Copilot will use the nautobot_dynamic_api_request tool to fetch the data.
Expected Response:
Here are the locations in your Nautobot instance:
1. Main DC (Status: Active)
2. Branch Office 1 (Status: Active)
3. Branch Office 2 (Status: Planned)
...
Example 3: Search Knowledge Base¶
Ask questions about Nautobot features:
Copilot will use the nautobot_kb_semantic_search tool to find relevant documentation.
Expected Response:
Based on the Nautobot documentation, here's how to create custom fields:
1. Navigate to Extensibility > Custom Fields
2. Click "Add Custom Field"
3. Configure the following:
- Content Type: Select the object type
- Name: Field name (no spaces)
- Label: Display name
- Type: Choose data type (text, integer, boolean, etc.)
...
Example 4: Complex Queries¶
Combine multiple tools for complex queries:
Show me how to create a new device in Nautobot,
then actually create one with name "test-switch-01"
in the "Main DC" location
Copilot will:
- Search the knowledge base for device creation guidance
- Find the appropriate API endpoint
- Execute the API call with the provided parameters
- Return the result
Common Workflows¶
Workflow 1: Exploring the API¶
-
Discover endpoints:
-
Get endpoint details:
-
Execute the request:
Workflow 2: Learning Nautobot¶
-
Ask conceptual questions:
-
Find code examples:
-
Get best practices:
Workflow 3: Automation Development¶
-
Research capabilities:
-
Get code templates:
-
Test API calls:
Tips for Better Results¶
Be Specific¶
❌ Too vague:
✅ Better:
Use Context¶
Provide relevant details in your queries:
I need to create a device of type "switch" with role "access-switch"
in the "Main DC" location. What's the API call?
Chain Operations¶
Break complex tasks into steps:
Reference Documentation¶
Ask for specific documentation:
Keyboard Shortcuts¶
VS Code Copilot Chat¶
Cmd+I/Ctrl+I- Open inline chatCmd+Shift+I/Ctrl+Shift+I- Open chat panelCmd+Shift+P→ "Copilot: Toggle Chat" - Toggle chat visibility
Troubleshooting¶
Server Not Connected¶
If Copilot can't find the MCP server:
- Check VS Code's Output panel (
View → Output) - Select "GitHub Copilot Chat" from the dropdown
- Look for connection errors
Common issues:
- Incorrect path: Verify the path in
mcp.jsonis absolute - Server not running: The server starts automatically with VS Code
- Permission issues: Ensure the server script is executable
No Tools Available¶
If queries don't use MCP tools:
- Verify the server is in the active servers list
- Try mentioning the tool explicitly:
Slow Responses¶
On first use, responses may be slower due to:
- Initial model loading (~90MB download)
- Repository cloning and indexing
- Vector embedding generation
Subsequent queries will be faster.
Authentication Errors¶
If you see "401 Unauthorized":
- Verify
NAUTOBOT_TOKENin.env - Check token permissions in Nautobot
- Ensure
NAUTOBOT_ENVmatches your configuration
Next Steps¶
- Configuration Guide - Customize your setup
- Tools Reference - Learn about available MCP tools
- Examples - More detailed use cases
- Architecture - Understand how it works
Getting Help¶
If you encounter issues:
- Check the Troubleshooting Guide
- Review server logs for errors
- Open an issue on GitHub