Packet Tracer MCP
Allows for the creation, configuration, validation, and explanation of network topologies in Cisco Packet Tracer, including generating CLI configurations and automated build scripts via the PTBuilder extension.
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.
Describe a network in plain words. Your AI plans it, validates it, and builds it live in Cisco Packet Tracer — then pings it to prove it works.
Install it by asking your agent: "Install the Packet Tracer MCP from github.com/Mats2208/MCP-Packet-Tracer and set everything up for me."
Video
Related MCP server: nornir-mcp-server
Showcase
How it works
"3 routers, OSPF and DHCP"
│
▼
Your AI agent ──── Claude Code, OpenCode, Codex, Cursor… (any MCP client)
│ calls pt_* tools
▼
Packet Tracer MCP ─ plans → validates → auto-fixes → generates JS + IOS config
│ authenticated HTTP bridge, 127.0.0.1:54321
▼
MCP Control Center ─ this project's PT extension, polls the bridge every 500 ms
│ runs the JavaScript in PT's Script Engine
▼
Cisco Packet Tracer ─ devices, cables and configs appear on the canvasWith the extension window closed, a file mailbox takes over, so PT keeps executing. Everything stays on your machine: the bridge only listens on loopback and every call carries a per-machine token (see Security).
What it can do
What | Tools | |
Build | One prompt → plan → validation → auto-fix → live deploy, with read-back of every device and link |
|
Addressing | /24 LANs, /30 point-to-point links, DHCP pools on routers or on a dedicated Server-PT, IPv6 dual stack |
|
Routing | Static (with floating backups), OSPF, EIGRP, RIP; HSRP, BGP and QoS on a live router | generated IOS, applied live; |
Switching | VLANs, trunks, router-on-a-stick, STP, port security, EtherChannel, AP SSID and MAC filter |
|
Voice | Cisco CME on a 2811 with IP phones that register (measured with a PoE 3560 and two 7960) |
|
Security | ACLs, NAT, device hardening (SSH, local users, |
|
Inside each device | Type in a router's CLI tab, run |
|
Verify | Real ping with parsed results, health check, plan-vs-live diff, per-port inspection; every CLI change reports which IOS lines were rejected; structured reads of routes, OSPF, ARP, CDP, STP, ACL, NAT, MAC tables and DHCP leases |
|
Explain | Send a simple PDU, step the simulation and read PT's own per-layer decision log for each packet |
|
Document | Canvas screenshots, notes and drawings on the canvas, |
|
All 98 tools are listed in the tool reference.
Installation
Needs Cisco Packet Tracer 8.2+ (tested on 9.0 and 9.0.1) on Windows or macOS — see Platforms.
The easy way: ask your AI agent
Open Claude Code, OpenCode, Codex or any coding agent and say:
Install the Packet Tracer MCP from https://github.com/Mats2208/MCP-Packet-Tracer and set everything up for me.That's it. The agent finds its instructions here, checks your OS and agent, installs the server and the skill, and puts the extension where Packet Tracer finds it. The next time you open Packet Tracer it asks "detected a new script module… enable?" — click Yes. That click is the only thing you do by hand.
AI agent reading this? Don't follow the manual steps below. Follow
llms-install.md — it is written for you: OS detection, every client's registration
command, the skill, the extension, and how to verify with the user.
Manual install
1. Install uv — it brings its own Python, so
you don't need to install Python or touch PATH.
macOS · Linux: curl -LsSf https://astral.sh/uv/install.sh | sh
Windows (PowerShell): powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
2. Connect your MCP client (Claude Code shown; other clients in the Installation docs)
claude mcp add --scope user --transport stdio packet-tracer -- uvx packet-tracer-mcp --stdioWindows PowerShell — quote the -- separator, or PowerShell swallows it and Claude aborts with error: unknown option '-m':
claude mcp add --scope user --transport stdio packet-tracer "--" uvx packet-tracer-mcp --stdioVerify with claude mcp list (look for packet-tracer … ✓ Connected).
3. Install the Agent Skill — required in practice: without it the AI guesses model, port and API names instead of discovering them
uvx packet-tracer-mcp install-skill # Claude Code, OpenCode → ~/.claude/skills
uvx packet-tracer-mcp install-skill --dest ~/.agents/skills # CodexThen restart your agent (or run /reload-skills in Claude Code). Details →
Skill docs.
4. Install the live-deploy extension — Download MCP-Control-Center.pts from
Releases and drop it in Packet
Tracer's own extensions folder, in a subfolder (…/extensions/MCPControlCenter/). On macOS that is
Cisco Packet Tracer <version>.app/Contents/extensions/; on Windows
C:\Program Files\Cisco Packet Tracer <version>\extensions\ (needs admin). Next time PT starts it
asks "detected a new script module… enable?" — click Yes. Or add it by hand with
Extensions → Scripting → Configure PT Script Modules → Add…. Full walkthrough in Live deploy below.
v0.6.0+ requires V5. The bridge authenticates with a per-machine token that the V5 extension reads automatically; builds before V5 can't authenticate.
pip install packet-tracer-mcp # then use `python -m packet_tracer_mcp --stdio` as the command
pip install "packet-tracer-mcp[ui]" # Windows: adds UI mode (opening and capturing device windows)Requires Python 3.11+. On macOS (Homebrew) and recent Linux distros a plain pip install is refused
(externally-managed-environment, PEP 668): use uv as above, or a virtualenv. With uv, UI mode is
uvx --from "packet-tracer-mcp[ui]" packet-tracer-mcp --stdio.
From source, to modify it: git clone https://github.com/Mats2208/MCP-Packet-Tracer && cd MCP-Packet-Tracer && pip install -e .
Quick start
Restart your agent after installing, open Extensions → MCP BUILDER in Packet Tracer, and ask:
"Create a network with 1 switch and 2 PCs, deploy it to Packet Tracer and ping between the PCs."
"Build 3 routers in a triangle with OSPF, a LAN with 2 PCs behind each one, and DHCP."
"Check the network: show me R1's routing table and audit the security of every router."
The agent calls pt_full_build (plan → validate → generate → deploy), then verifies with a real
ping. More in the Quick Start guide.
Platforms
Windows | macOS | Linux | |
Install by agent ( | ✅ | ✅ | ⚠️ server + skill yes; extension added by hand |
Server ( | ✅ | ✅ | ✅ |
Live deploy (HTTP bridge) | ✅ | ✅ | ✅ |
File-bridge (extension window closed) | ✅ | ✅ | ✅ |
Device panel ( | ✅ | ✅ | ✅ |
UI mode (open/capture device windows) | ✅ | — | — |
macOS was verified end to end on Packet Tracer 9.0.1: all 79 tools were run against a live
canvas, and the bugs that run found are fixed in this release. Windows 11 was verified the same
day on PT 9.0.1: the agent install (extension copied to Program Files, one UAC prompt, PT's
"enable?" dialog), both bridge channels on the first call, OSPF + DHCP builds checked with real
pings, and UI mode capturing device windows.
Linux was verified on 2026-11-03 with Ubuntu 26.04.1 LTS (kernel 7.0, GNOME 50 on Wayland),
Packet Tracer 9.0.1 from Cisco's .deb, packet-tracer-mcp 0.11.0 through uvx (uv 0.13.3)
and Claude Code 2.1.317 as the client. Both bridge channels connected (PT's webview is
QtWebEngine 6.8.7). Checked live: pt_full_build single LAN (4/4 devices, 3/3 links, DHCP lease)
and 3 routers with OSPF + DHCP (12/12, 12/12, 6 neighbours FULL, no convergence gaps), real pings
across LANs, pt_cli, pt_host_command, pt_host_ip_config, Server-PT HTTP / DNS / EMAIL,
pt_web_browser, pt_health_check, pt_screenshot, pt_save_project, and with the extension
window closed the file-bridge alone ran pings, CLI, add device + link and a DHCP lease.
Linux specifics:
PT ships as an AppImage in
/opt/pt, so there is noextensionsfolder to drop the module into: addMCP-Control-Center.ptswith Extensions → Scripting → Configure PT Script Modules → Add….Before the first start, accept the EULA by running
packettracerin a terminal (launched from the menu it waits for an answer it never gets and no window appears). On Ubuntu 26.04 PT also needssudo apt install libopengl0 libts0t64.PT reports
~/Cisco Packet Tracer 9.0.1/savesas its save folder, which does not exist on Linux (its real user folder is~/pt).pt_save_projectwithoutdirectorynow falls back to~/pt/savesinstead of hitting PT's "No Write Permission" dialog.
Live deploy
Live deploy runs through this project's own Packet Tracer extension, the MCP Control Center
(MCP-Control-Center.pts in Releases). Add it
once via Extensions → Scripting → Configure PT Script Modules → Add…, then open
Extensions → MCP BUILDER in each session. It connects to the bridge by itself and reads the
token from disk — there is nothing to paste or configure.
📖 Full steps → Live Deploy Setup.
Device panel and UI mode
Once a topology is live, the agent works inside each device the way a student would: it types in a router's CLI tab, runs commands in a PC's Command Prompt, sets IP Configuration, browses with the Web Browser and configures a server's Services — all through Packet Tracer's own API, so what it types shows up in the real CLI tab and you can take over at any time.
It is headless by default. On Windows, say "show it in Packet Tracer" (or call
pt_ui_mode("ui")) and every panel tool also opens the device's window on the matching tab;
capture=True saves a PNG. Windows are driven with UI Automation and a click posted to the
canvas — your real mouse and keyboard are never used.
Clients
Any MCP client drives this server — Claude Code, Cursor, Claude Desktop, VS Code with Copilot, Codex. Nothing in it is client-specific.
There is also one built on it: PacketSmith,
a terminal app that runs these tools with the network drawn beside the conversation — a
fabric tree and a canvas plan derived from the pt_* results themselves, so a device the
model says it created but did not never shows up.
This server alone | This server + PacketSmith | |
Where you talk | the MCP client you already use | a terminal app built for this one job |
What you see | a chat log, plus PT in another window | split screen: reply left, live topology right |
Topology | read out of the tool output | fabric tree and canvas plan, drawn for you |
Tools loaded | every MCP server you have configured | this one only — measurably faster to start |
Engine | whatever your client speaks | Claude, or ~150 providers |
You need this server either way — PacketSmith runs it underneath, and its setup installs it for you. If you already live in Claude Code, you are done here; the client is for when you want the topology in front of you instead of buried in a scrollback.
npm i -g packetsmith # beta · MITCredits & Acknowledgements
Live deploy runs through our own Packet Tracer extension — the MCP Control
Center (the .pts in Releases).
Its Script-Engine helper layer was inspired by
PTBuilder by
Kim Knight (@kimmknight), who pioneered driving
Packet Tracer's Script Engine from JavaScript — thanks for the groundwork. 🙏
PTBuilder and Packet Tracer MCP are separate, independent projects. You install our extension, not PTBuilder. Full Credits & Attribution.
Security
Driving Packet Tracer from outside means running a local HTTP bridge whose whole job is to hand JavaScript to PT's Script Engine — code that executes with PT's own privileges, including disk access. That makes the bridge a genuine attack surface, not an implementation detail, and it is hardened accordingly.
The attack this design exists to stop. Binding to 127.0.0.1 is not a
security control. A POST with Content-Type: text/plain is a CORS simple
request: any web page open in your browser can send it to a loopback port
without a preflight and without needing to read the response. An unauthenticated
bridge therefore lets any website you visit — while Packet Tracer happens to be
open — queue arbitrary code inside it. Injection never needed to read anything
back, so same-origin policy alone never closed this.
What actually closes it is a secret the attacking page cannot guess:
Control | Implementation |
Token on every endpoint | Every route except |
| Deliberately unauthenticated so the server can tell who owns the port before trusting it — but it returns only a SHA-256 fingerprint of the token, never the token. |
Foreign-bridge detection | Before sending any payload, the server checks that |
DNS-rebinding defense | The |
Loopback bind |
|
Token at rest |
|
Body size cap | Oversized bodies are rejected with |
Silent failures | Error responses carry no CORS headers, so a hostile page cannot even distinguish why it failed. |
Tamper visibility | Unauthorized attempts are counted and surfaced by |
Regression coverage lives in tests/test_bridge_security.py
and tests/test_injection_regressions.py;
the full suite runs offline with python -m pytest — no Packet Tracer required.
v0.6.0+ requires the V5 extension. Versions before v0.6.0 shipped an unauthenticated bridge and are vulnerable to exactly the attack above. Upgrade — there is no safe configuration of the old bridge.
Deliberate, documented behaviour: pt_send_raw executes arbitrary JavaScript
inside Packet Tracer by design — it is the escape hatch for exploring the IPC
API. It is reachable only by an MCP client you have already authorised, over the
authenticated bridge. That is a capability, not a vulnerability.
Found a vulnerability? Report it privately via GitHub Security Advisories, not a public issue. SECURITY.md documents the full threat model.
What's new
Unreleased (v0.10.0) — install it by asking your agent: llms-install.md
walks any coding agent through the whole setup on Windows, macOS or Linux. The skill ships inside
the package (uvx packet-tracer-mcp install-skill), uvx packet-tracer-mcp runs the server with no
Python install, and 17 device-panel tools let the agent work inside each device window.
v0.9.0 — on PyPI, and a hunt for silent false OKs: a topology split into islands that validation approved, a bridge returning the previous operation's result, a connectivity "OK" with 75% packet loss. None of them crashed; all of them lied. Older releases in the Changelog.
Contributing
See CONTRIBUTING.md. The
test suite (1,297 tests) runs offline with uv run --extra test python -m pytest — no Packet Tracer needed.
License
Released under the MIT License — © 2026 Mateo (@Mats2208).
Built with MCP · Deploys to Cisco Packet Tracer · Script-engine logic inspired by PTBuilder
If this project is useful to you, star it ⭐ and share it with the community.
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
MCP server providing access to the Scorecard API to evaluate and optimize LLM systems.
MCP server for building and testing AI agents with multi-model experimentation and insights.
MCP server for AI agents to plan, verify, and deploy Cloudflare-native apps.
MCP server for AI dialogue using various LLM models via AceDataCloud
Related MCP Servers
- AlicenseAqualityCmaintenanceAn MCP server that enables LLMs to retrieve structured network information, including routing, interfaces, MPLS, and topology, from devices using gNMI and OpenConfig models. It facilitates real-time network analysis, log filtering, and status monitoring through a standardized interface.1014BSD 3-Clause
- FlicenseAqualityFmaintenanceAn MCP server that integrates Nornir with NAPALM and Netmiko, enabling LLMs to orchestrate multi-vendor network infrastructure through natural language.52-
- AlicenseBqualityDmaintenanceAn MCP server that gives Claude and other LLM agents programmatic access to EVE-NG network labs, enabling creation, configuration, and management of virtual network topologies through natural language.1420 PyPI2Apache 2.0
- AlicenseNot gradedqualityDmaintenanceMCP server for network operations that lets AI assistants interact with Cisco/Juniper network devices through safe, well-defined tools like compliance audits and configuration backups.MIT