I have been using Claude Code for network automation work for over a year. Not experimenting with it. Not evaluating it. Using it as a primary tool in production engineering work. This post covers what that actually looks like — the prompts that work, the results I get, and the MCP server architecture that makes it genuinely powerful for networking.
What Claude Code Actually Is
For engineers who have not used it yet: Claude Code is not a chatbot. It is an AI agent that runs in your terminal with full access to your filesystem, your shell, and any tools you connect to it. You describe what you want in plain English, and it reads your code, writes new code, runs commands, edits files, and executes multi-step tasks. You approve each action before it runs.
This is fundamentally different from pasting a question into ChatGPT and copying the response into your editor. Claude Code understands the context of your entire project — your directory structure, your existing code patterns, your configuration files. Its suggestions are not generic; they are tailored to your specific codebase.
Real Prompt, Real Result: Building a Config Audit Tool
Here is an actual task I gave Claude Code last month. I needed a tool that connects to every router in our inventory, pulls the running configuration, compares it against a set of compliance rules, and generates a report showing which devices are out of compliance and why.
My prompt was approximately: "Build a Python script that reads the device inventory from our Nornir inventory file, connects to each device using Netmiko, pulls the running config, checks it against the compliance rules defined in compliance_rules.yaml, and outputs a CSV report with columns for hostname, rule name, status, and details."
Claude Code read my existing Nornir inventory structure, understood the YAML format I use for inventory, and generated a complete script. It used Nornir for inventory management (matching my existing pattern), Netmiko for device connections (matching my existing SSH config), and a YAML-based rules engine for compliance checks. It wrote the compliance rule schema, the checking logic, the CSV output, and error handling for unreachable devices.
The entire process took about 15 minutes of wall time, including my review of each step. Writing that tool from scratch would have taken me most of a day. The code quality was solid — proper logging, exception handling, type hints, and it followed the patterns already established in our codebase.
MCP Servers: Where It Gets Powerful
MCP (Model Context Protocol) is what turns Claude Code from a code generator into a network operations tool. MCP servers are plugins that give Claude Code the ability to interact with external systems — and we built one for Cisco NSO.
Our NSO MCP server exposes tools that let Claude Code:
- **Query device configurations** through NSO's RESTCONF API. Claude Code can ask "what is the BGP configuration on router X?" and get the actual live data.
- **Check sync states** across the device fleet. "Are any devices out of sync?" returns a real-time answer from NSO.
- **Compare configurations** between the intended state and the actual state. "Show me the config drift on switch Y" produces a diff.
- **Deploy configuration changes** through NSO's transaction manager. Claude Code can generate a config change, push it through NSO with dry-run first, and show me the exact diff before I approve the actual deployment.
This means I can say something like "check if all our edge routers have the correct NTP configuration and fix any that are wrong" — and Claude Code will query NSO for all edge routers, check their NTP config against our standard, identify the non-compliant ones, generate the corrective configuration, show me the dry-run diff, and deploy it with my approval. What used to be an afternoon of manual work becomes a five-minute supervised conversation.
The Phase 3 Jump
I think about AI tools in three phases. Phase 1 is autocomplete (Copilot). Phase 2 is conversation (ChatGPT, Claude chat). Phase 3 is agentic (Claude Code with MCP). The jump from Phase 2 to Phase 3 is not incremental — it is a step change in what is possible.
In Phase 2, you describe a problem, get code, paste it somewhere, run it, encounter an error, go back to the chat, describe the error, get a fix, paste it, repeat. It is faster than working alone, but it is still a manual loop.
In Phase 3, you describe the problem once. The agent reads your code, understands your environment, writes the solution, tests it, encounters the error itself, fixes it, and delivers a working result. You supervise and approve rather than manually shuttling text between windows.
For network engineering specifically, this matters because our work involves many small steps that depend on each other — query a device, parse the output, make a decision based on the data, generate a config change, validate it, deploy it. An agentic AI handles this entire chain while you watch. A chatbot handles one step at a time while you do the rest.
What I Have Learned After a Year
Here are the practical lessons that tutorials do not teach you:
**Be specific about your existing patterns.** If your team uses Nornir for inventory and Netmiko for connections, say so in the prompt. Claude Code will match your patterns, but only if it knows what they are. If you just say "connect to routers," it might choose Paramiko or asyncSSH instead.
**Always review the dry-run.** Claude Code with NSO MCP will happily generate and deploy configuration changes. The dry-run step is where you catch mistakes. Never skip it. Never rubber-stamp it. Read the diff every time.
**Use it for the tedious work, not the thinking.** AI excels at generating boilerplate, parsing output, writing tests, and handling error cases. The high-value work — deciding what to automate, designing the architecture, choosing the right approach — is still yours. Use AI to execute faster, not to think for you.
**Build MCP servers for your specific environment.** The generic tools are useful, but the real power comes from MCP servers tailored to your systems. If you use SolarWinds, build an MCP server for SolarWinds. If you use ServiceNow, build one for ServiceNow. Each server you add expands what Claude Code can do for you.
The engineers who get the most from AI tools are the ones who invest time in setting up the environment correctly. A well-configured Claude Code session with the right MCP servers is an order of magnitude more productive than a vanilla installation.
Originally published at https://primeautomationsolutions.com
Top comments (0)