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_deploy is the clipboard-based deployment path — an alternative to pt_live_deploy that works without an active HTTP bridge. It generates the full PTBuilder JavaScript script from a TopologyPlan, copies it to the Windows clipboard using clip.exe, exports all project files (script, CLI configs, plan JSON) to the projects/ directory, and returns human-readable step-by-step paste instructions. This makes it the safest option when you want to review the script before running it, or when the live bridge is not configured.
Parameters
The
TopologyPlan JSON produced by pt_plan_topology or pt_full_build. Must contain at least one device.A short identifier used to name the project directory under
output_dir. Spaces are replaced with underscores. Example: "campus_ospf" creates projects/campus_ospf/.Base directory where project files are exported. Relative to the MCP server’s working directory.
Return value
A multi-section report that includes: clipboard status, project directory path, device and link counts, a list of exported file paths, and numbered step-by-step instructions for completing the deployment in Packet Tracer.
What pt_deploy does
When called, the executor runs these steps in sequence:
- Calls
generate_ptbuilder_scriptto produce thelwAddDevice/addModule/lwAddLinkscript - Attempts to copy the script to the Windows clipboard via
clip.exe(sys.platform == "win32"check) - Writes
topology.js,full_build.js,{Device}_config.txtfor each router/switch, andplan.jsontoprojects/{project_name}/ - Returns the clipboard status, file paths, and step-by-step instructions
Clipboard copy only works on Windows. On Linux and macOS,
pt_deploy skips the clipboard step and falls back to file export only. The instructions will direct you to open topology.js manually instead.When to use pt_deploy
| Scenario | Recommendation |
|---|---|
| HTTP bridge not configured or Packet Tracer is not open | ✅ Use pt_deploy |
| You want to inspect the script before running it | ✅ Use pt_deploy |
| You need the CLI configs saved as files for reference | ✅ Use pt_deploy (exports *_config.txt) |
| Packet Tracer is open and the bootstrap is running | ✅ Prefer pt_live_deploy |
How to paste the script into Packet Tracer
Afterpt_deploy returns, follow these steps to build the topology. The deployment script goes into Extensions → Scripting — not Builder Code Editor (Builder Code Editor is reserved for the one-time bridge bootstrap snippet used by pt_live_deploy).
- Open Cisco Packet Tracer 8.2+
- Go to Extensions → Scripting
- Click inside the code editor pane to focus it
- Press Ctrl+V to paste the script from clipboard
- Click Run (or the play button) to execute
*_config.txt file.
Difference from pt_live_deploy
pt_deploy | pt_live_deploy | |
|---|---|---|
| Requires bridge | No | Yes (port 54321) |
| Requires PT open | No | Yes |
| Applies configs automatically | No — manual CLI paste | Yes — configureIosDevice called automatically |
| Works on non-Windows | Partial (file export only) | Yes (bridge is cross-platform) |
| Script review before run | Yes | No — streams immediately |