Connecting Nautobot MCP Server to Claude Code¶
This guide walks you through connecting an already-running Nautobot MCP Server to Claude Code.
Prerequisites¶
- Claude Code installed (see Claude Code documentation and MCP setup guide)
- Nautobot MCP Server running and accessible (see Install Guide for setup)
- Your Nautobot API token (each user provides their own)
Configure Claude Code¶
Claude Code natively supports remote MCP servers over HTTP. You add the server using the claude mcp add command. Both streamable-http and sse transports are supported.
claude mcp add --transport http nautobot https://mcp.yourcompany.com/mcp \
--header "Authorization: Bearer YOUR_NAUTOBOT_API_TOKEN"
Configuration:
--transport- Match the MCP server'sMCP_TRANSPORTsetting (use--transport httpfor streamable-http or--transport ssefor SSE)https://mcp.yourcompany.com/mcp- Your server's URL (use/mcpfor streamable-http or/ssefor SSE transport). For a local MCP server, usehttp://localhost:8000/mcpinstead.--header- Passes your Nautobot API token as a Bearer token
Verify Connection¶
After adding the server, verify it is configured correctly:
# List all configured MCP servers
$ claude mcp list
Checking MCP server health...
nautobot: http://localhost:8000/mcp (HTTP) - ✓ Connected
Within a Claude Code session, you can also check the server status by typing:
Managing the Server¶
Troubleshooting¶
Server Not Connecting¶
- Verify server is running - Check that the Nautobot MCP Server is running and accessible
- Check the endpoint - Ensure the URL ends with
/mcpforstreamable-httptransport or/ssefor SSE transport - Verify your token - An invalid Nautobot API token will prevent successful connection
- Check server status - Run
/mcpwithin a Claude Code session to see the connection status - Check transport match - Ensure the
--transportflag matches your server'sMCP_TRANSPORTsetting
TLS Certificate Issues¶
If connecting to a server with a self-signed or private CA certificate, you may need to set NODE_TLS_REJECT_UNAUTHORIZED=0 in your environment, or add the CA certificate to your system trust store.
Example Usage in Claude Code¶
Once configured, you can ask Claude Code to query your Nautobot instance:
"Get all active devices in Texas with their names, locations, and device types"
"Show me all interfaces on devices in the NYC location"
"Find the first 10 VLANs with ID between 100 and 200"
"List the primary IP addresses for devices in the production environment, limit to 20 results"
Claude Code will use the Nautobot MCP Server to query your Nautobot instance.