Documentation Index
Fetch the complete documentation index at: https://mintlify.com/Mats2208/MCP-Packet-Tracer/llms.txt
Use this file to discover all available pages before exploring further.
pt_live_deploy is the real-time deployment path. It converts a TopologyPlan into executable JavaScript commands — device placements, module installs, cable connections, IOS configurations, and PC IP assignments — and streams each command to a running Cisco Packet Tracer instance through the HTTP bridge at http://127.0.0.1:54321. PTBuilder’s webview polls the bridge every 500 ms and executes each command in Packet Tracer’s Script Engine via $se('runCode', ...). The result is a fully built and configured topology appearing directly in Packet Tracer with no manual copy-pasting.
Parameters
The
TopologyPlan JSON produced by pt_plan_topology or pt_full_build. Must contain at least one device.Delay in seconds between consecutive commands sent to the bridge. Values below
1.0 are automatically clamped to 1.0. A delay shorter than one second may cause configureIosDevice or configurePcIp to run before a device finishes initializing, which triggers error popups in Packet Tracer and can kill the bootstrap polling loop.Return value
A summary string reporting how many commands were sent and how many devices and links were deployed. Example:
"Topologia desplegada en Packet Tracer!\n Comandos enviados: 21\n Dispositivos: 8\n Enlaces: 7".Prerequisites
Before callingpt_live_deploy, the HTTP bridge must be active and PTBuilder must be polling it. The MCP server starts the bridge automatically as an in-process daemon thread when it registers tools — you do not need to run start_bridge.ps1 or any external process. You only need to paste the bootstrap snippet once per Packet Tracer session.
Bootstrap snippet (paste into Extensions → Builder Code Editor, then click Run):
setInterval into the PTBuilder webview (a Chromium QWebEngine context that has full XMLHttpRequest support). Every 500 ms the webview fetches /next from the bridge; when a command is queued, it calls $se('runCode', cmd) to execute it in Packet Tracer’s Script Engine.
What happens during deployment
The executor breaks the full topology script into individual lines and sends them one at a time toPOST /queue on the bridge. PTBuilder picks each command up on its next 500 ms poll and runs it in the Script Engine. The sequence is:
- Runtime patches are injected first (idempotent, once per PT session) — these override
addModule,configureIosDevice,configurePcIp, andlwAddDevice/lwAddLinkwith defensive versions that prevent crashes on host devices lwAddDevicecalls place each device on the logical canvasaddModulecalls install expansion modules (e.g.HWIC-2Tfor serial ports)lwAddLinkcalls draw cables between interfacesconfigureIosDevicecalls push the full IOS CLI config to each router and switchconfigurePcIpcalls set static IPs or enable DHCP on PC-PT, Laptop-PT, and Server-PT devices
command_delay seconds to give Packet Tracer time to finish processing before the next command arrives.
Bridge architecture
Troubleshooting
| Symptom | Likely cause | Fix |
|---|---|---|
| ”Bridge activo pero PT NO está conectado” | Bootstrap not pasted or PT was restarted | Paste bootstrap in Extensions → Builder Code Editor → Run |
| Devices appear but configs not applied | command_delay too low | Increase to 2.0 or higher |
| Nothing appears in PT | Bridge not responding | Check pt_bridge_status — bridge auto-starts but verify it’s running |
| Error popups in PT | configureIosDevice ran before device booted | Increase command_delay |