Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Networking — Claude Code Skills

AI-driven network automation for networking topologies using Claude Code skills backed by gNMI. Two skills are included:

Skill What it does
evpn-provisioning Provisions, deletes, and inspects EVPN MAC-VRF services on SR Linux leaf nodes
nokia-cli-translator Fetches live gNMI state and renders output in the opposite platform's CLI style (SR Linux ↔ SROS)

Both skills are exposed as MCP servers so Claude Code can call them directly — no bash commands needed.


Prerequisites

  • Claude Code CLI installed and authenticated
  • uv Python package manager
  • Containerlab + Docker (to run the network topology)
  • A Nokia SROS license file at ../license-srsim25.txt (one level above the repo root) for the SROS DCGWs

Quick Start

1. Deploy the topology

cd containerlab
containerlab deploy

This brings up a full Clos fabric: 2 SR Linux spines, 4 SR Linux leaves, 2 SROS DCGWs, and 2 Linux clients. All nodes start pre-configured with eBGP underlay and EVPN iBGP overlay.

containerlab destroy    # tear it down when done

2. Install Python dependencies

uv sync

3. Configure credentials (optional)

The defaults work out of the box. To override, copy .env_example to .env:

cp .env_example .env
Variable Default Description
SRL_PASSWORD NokiaSrl1! SR Linux gNMI password
SROS_PASSWORD NokiaSros1! SROS gNMI password

4. Open the project in Claude Code

claude

Claude Code reads .mcp.json at the repository root and automatically starts both MCP servers. The skills are ready to use immediately — just describe what you want in natural language.


Initializing the Skills

Skills are registered as MCP servers in .mcp.json. Claude Code connects to them at startup, making the tools available for every conversation in this project.

{
  "mcpServers": {
    "evpn-provisioning": {
      "command": "uv",
      "args": ["run", "python", ".claude/skills/evpn-provisioning/scripts/evpn_mcp_server.py"],
      "cwd": "/path/to/claude-network"
    },
    "nokia-cli-translator": {
      "command": "uv",
      "args": ["run", "python", ".claude/skills/nokia-cli-translator/scripts/nokia_cli_mcp_server.py"],
      "cwd": "/path/to/claude-network"
    }
  }
}

Note: Update cwd to match your local path if it differs from the one already in .mcp.json.

To verify the servers are connected, run /mcp inside Claude Code — both evpn-provisioning and nokia-cli-translator should appear as connected.


nokia-cli-translator

Translates live gNMI state between CLI formats:

  • SR Linux node → renders output in SROS CLI style
  • SROS node → renders output in SR Linux CLI style

This lets operators query any node using the CLI syntax they already know.

Example 1 — BGP neighbors on an SR Linux leaf in SROS format

Prompt:

show router bgp neighbor on leaf1

Claude Code calls nokia_execute_command with command="show router bgp summary" on clab-evpn-leaf1, fetches the live BGP state via gNMI, and renders it in SROS CLI style:

===============================================================================
BGP Summary
===============================================================================
Legend : D - Dynamic Neighbor
===============================================================================
Neighbor
Description
                   AS PktRcvd InQ  Up/Down   State|Rcv/Act/Sent (Addr Fam)
                      PktSent OutQ
-------------------------------------------------------------------------------
192.168.0.1
                65001     1842    0 12h34m56s 2/2/2 (IPv4)
                          1840    0
192.168.0.2
                65001     1841    0 12h34m53s 2/2/2 (IPv4)
                          1839    0
...
-------------------------------------------------------------------------------

Example 2 — BGP neighbors on an SROS DCGW in SR Linux format

Prompt:

show network-instance default protocols bgp neighbor * on dcgw1

Claude Code calls nokia_execute_command with command="show network-instance default protocols bgp neighbor *" on clab-evpn-dcgw1, fetches the SROS YANG state via gNMI, and renders it in SR Linux CLI style:

---------------------------------------------------------------------------
BGP neighbor summary for network-instance "default"
---------------------------------------------------------------------------
+-----------+---------------+-------+-------+--------+-------------+
| Net-Inst  | Peer          | Group | Flags | Peer-AS| State       |
+===========+===============+=======+=======+========+=============+
| default   | 192.168.0.101 | eBGP  | -     | 65101  | established |
| default   | 192.168.0.102 | eBGP  | -     | 65102  | established |
...
+-----------+---------------+-------+-------+--------+-------------+

evpn-provisioning

Manages EVPN MAC-VRF services on SR Linux leaf nodes. The underlay and overlay are already operational — the skill handles the service layer on top.

Example — Provision a MAC-VRF across two leaves

Prompt:

create an EVPN service called my-BEST-evpn between e-1/11 on leaf1 and e-1/14 on leaf4 using VLAN 123

Claude Code will:

  1. List interfaces on leaf1 and leaf4 to confirm the interfaces exist and VLAN 123 is free.
  2. Validate parameters before touching any device.
  3. Provision the MAC-VRF on leaf1 (ethernet-1/11.123) and leaf4 (ethernet-1/14.123) — each gets a bridged subinterface, VXLAN tunnel interface, and MAC-VRF network-instance with BGP-EVPN/BGP-VPN config. If any node fails, partial changes are automatically rolled back.
  4. Confirm status via gNMI GET on both nodes.
  5. Print a summary:
Service provisioned successfully
─────────────────────────────────────────
MAC-VRF name  : my-BEST-evpn
Interface     : ethernet-1/11
Subinterface  : ethernet-1/11.123
VLAN ID       : 123
VNI / EVI     : 123
Nodes         : clab-evpn-leaf1
─────────────────────────────────────────
MAC-VRF name  : my-BEST-evpn
Interface     : ethernet-1/14
Subinterface  : ethernet-1/14.123
VLAN ID       : 123
VNI / EVI     : 123
Nodes         : clab-evpn-leaf4
─────────────────────────────────────────

Other things you can ask

check status of EVPN my-BEST-evpn
What services are running on the leaves?
Check if VLAN 100 is configured on leaf2
Remove the MAC-VRF named my-BEST-evpn
Set up a MAC-VRF for VNI 200 on all leaves

Topology

         spine1          spine2
        /  |  \        /  |  \
    leaf1 leaf2 leaf3 leaf4  (SR Linux)
                              |
                          dcgw1  dcgw2  (SROS)

client1 ── leaf1
client2 ── leaf2

Node access:

ssh admin@clab-evpn-leaf1        # SR Linux leaves / spines
ssh admin@clab-evpn-dcgw1        # SROS DCGWs
docker exec -it clab-evpn-client1 bash  # Linux clients (no SSH)

Skill Reference

Skill SKILL.md README
evpn-provisioning .claude/skills/evpn-provisioning/SKILL.md README
nokia-cli-translator .claude/skills/nokia-cli-translator/SKILL.md README

About

Claude Code skills for Networking

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages