PT-MCP
Lets Claude drive a live Cisco Packet Tracer instance through its Script Engine IPC API: create and arrange devices (routers, switches, PCs), cable them, add HWIC/NM modules, push IOS CLI configuration, run show commands and inspect running configs, configure host IP settings and run commands on PCs/servers, control power, add notes, and save or open .pkt project files — including building a whole lab topology in a single call.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
PT-MCP — Claude ↔ Cisco Packet Tracer
An MCP server that lets Claude build Packet Tracer projects live: add devices,
cable them, push IOS configs, set PC IPs, and save .pkt files.
Claude ──stdio/MCP──> pt-mcp (Python) ──HTTP long-poll 127.0.0.1:54321──> bridge web view
│ $se()
Packet Tracer IPC <── Script Engine (main.js)Packet Tracer has no external API. It does have Script Modules: JavaScript
running inside PT with full access to its IPC API (ipc.network(),
ipc.appWindow(), …). packet_tracer/main.js opens a small web view that polls
this server for jobs, runs each job in the Script Engine, and posts the result back.
Verified live on Packet Tracer 9.0.1 (Linux): devices, cabling, IOS config,
PC addressing, ping/ARP and saving .pkt all work end to end.
1. Install the server
git clone https://github.com/mohammed-w-mosabeh/packet-tracer-mcp.git
cd packet-tracer-mcp
uv sync.mcp.json in this folder registers it with Claude Code as packet-tracer
(approve it the first time you start claude here). To use it from any folder:
claude mcp add packet-tracer -s user -- uv run --directory /path/to/packet-tracer-mcp pt-mcpRelated MCP server: ptmcp
2. The bridge in Packet Tracer
It lives in ~/pt/extensions/ptmcp.pts, is registered as a persistent script
module and starts with Packet Tracer. To reinstall from scratch:
Extensions → Scripting → New PT Script Module.
General: name
PT-MCP Bridge, IDcom.ptmcp.bridge, Startup On Startup, tick all Security Privileges.Script Engine → Import
packet_tracer/main.js.Custom Interfaces → Import
packet_tracer/bridge.htm(required: only pages served from the module get the$se()bridge to the script engine).Info → Export to
~/pt/extensions/ptmcp.pts, answer Yes to add it, then Start. (Dismiss the "saved in an earlier version" warning.)
Editors are read-only while the module runs: Stop → edit/Import → Info → Save → Start.
A small "PT-MCP Bridge" window shows connected to MCP server while Claude is running; otherwise "waiting…", and it reconnects by itself.
Quirks found while wiring it up
$se()breaks on multi-line string args, so the server ships every job as a one-lineeval(decodeURIComponent('…')).Results are POSTed as
text/plainto avoid a CORS preflight that QtWebEngine drops.CiscoDevice.enterCommand(cmd, "")reports everything as invalid; the server types into the device'sTerminalLineinstead and capturesoutputWritten.IOS
pingoutput arrives asynchronously (simulation time runs after the call); check withshow arp/ a second command.
3. Use it
Ask Claude things like:
Build a lab with a 2911 router, a 2960 switch and 3 PCs on 192.168.10.0/24, router as gateway, then save it to ~/pt/saves/lab1.pkt
Tools
Tool | What it does |
| Is the bridge connected? |
| New empty workspace (optional save) |
| Device categories / exact model names |
| Devices |
| Inspect devices and port names |
| Cables |
| Insert HWIC/NM modules (e.g. |
| IOS configuration on routers/switches |
| PC/server IP settings, command prompt |
| Misc |
| Files |
| Whole lab in one call |
| Raw JavaScript against the PT IPC API |
Desktop helper (tools/x)
tools/x (tools/xdesk.py) is a small X11 screenshot/click/type tool used to set
up the bridge without a human. It only touches XWayland windows (Packet Tracer
runs under XWayland), needs no sudo, and pulls python-xlib + Pillow into an
isolated uv environment. tools/ptdev.py runs the bridge without an MCP client
for debugging (don't run it while Claude Code's server is up — same port).
Notes
Port
54321is fixed inpacket_tracer/bridge.htm; change both it andPT_MCP_PORTtogether if you need another one.The HTTP bridge only listens on
127.0.0.1.IPC API reference ships with PT:
<PT>/help/default/IpcAPI/index.html.
License
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Create, schedule, and run JavaScript jobs, manage files, and inspect runs from your AI agent.
Protocol-native energy infrastructure orchestration for AI data centers. Provides 46 MCP tools across 8 grid protocols (IEC-61850, DNP3, Modbus, OCPP, OpenADR, IEEE 2030.5, IEC 60870-5-104, ICCP) with 5 core API primitives: connect, dispatch, settle, comply, and intel. Enables AI agents to programmatically interact with substations, grid interfaces, and energy assets for real-time workload-grid coordination.
Build, run, inspect, and continue AgentScript workflows on connected Super Chrome and Mac clients.
Connect your AI agent to 300+ methods and 100+ live tools
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceEnables agents to design Cisco Packet Tracer labs from a device/link spec — cables, IPs, VLANs, routing and DHCP — and generate ready-configured .pkt files, .pka activities and SVG previews without opening Packet Tracer. It also exposes primitives to add, edit and inspect devices, services, ACLs and NAT in existing lab files.1GPL 3.0
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to drive Cisco Packet Tracer 8.x in the background, building topologies, auto-selecting cables so links come up green, running device CLI commands, reading back configuration, and exporting .pkt files without dialogs or stealing window focus.MIT
- AlicenseNot gradedqualityCmaintenanceEnables AI agents to plan, create, and control Cisco Packet Tracer network topologies in real time, including deploying devices and cabling, configuring IPs and IOS CLI, and querying or clearing topologies through an HTTP bridge.MIT
- AlicenseNot gradedqualityCmaintenanceEnables MCP-compatible AI agents to control Cisco Packet Tracer over the native PTMP IPC protocol, including building topologies, cabling, configuring IOS/IPv4/DHCP, advancing simulation time, auditing networks, and testing connectivity.4MIT