An MCP server that generates Cisco Packet Tracer 9.0.0 .pkt files from natural-language topology descriptions. Ask Claude to "create a network with a router, switch, and two PCs" and get a working .pkt file you can open directly in Packet Tracer.
- Python 3.10+
- Cisco Packet Tracer 9.0.0
- macOS ARM64 (the
pka2xmlbinary is pre-compiled for ARM64; other platforms must compile it from source — seepka2xml/)
git clone https://github.com/eordonez/packet-tracer-mcp
cd packet-tracer-mcp
pip install mcp[cli]Register with Claude Code (replace the path with the absolute path on your machine):
claude mcp add packet-tracer -- python3 /absolute/path/to/packet-tracer-mcp/server.py| Tool | Description |
|---|---|
generate_topology |
Generate a .pkt file from a list of devices and links |
decode_topology |
Decode a .pkt file and return a human-readable topology summary |
read_pkt_xml |
Decode a .pkt file and return the raw XML |
Ask Claude:
Create a network topology with a router (192.168.1.1/24), a switch, and two PCs (192.168.1.10 and 192.168.1.11). Save it to ~/Desktop/lab1.pkt.
Claude will call generate_topology with the appropriate devices and links and save the file.
| Device Type | Port Name |
|---|---|
| PC / Server / Printer | FastEthernet0 |
| Laptop | FastEthernet0 |
| Router | FastEthernet0/0, FastEthernet1/0, FastEthernet2/0, … |
| Switch | FastEthernet0/1, FastEthernet1/1, FastEthernet2/1, … |
| Access Point (wired uplink) | Port 0 |
Laptops connect to an access point wirelessly via SSID — do not add a cable link between a laptop and an AP. The association is implicit.
- pka2xml by Mirco De Zorzi — BSD-2-Clause
- ptexplorer by Alexandre Cheron — MIT