Packet Tracer MCP
Lets AI agents create and control Cisco Packet Tracer network topologies in real time: plan simple LAN or two-site OSPF designs, add routers/switches/PCs, connect cables, assign IPs, apply IOS configurations and CLI commands, query or clear the live topology, and deploy a full topology in a single call through a Script Engine HTTP bridge.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Packet Tracer MCPBuild a simple LAN with 1 router, 1 switch, and 2 PCs and deploy it live"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Packet Tracer MCP
MCP server that lets AI agents (OpenCode, Claude Code, Cursor, Claude Desktop…) create and control network topologies in Cisco Packet Tracer in real time.
You (prompt) → OpenCode / Claude → MCP (this server) → HTTP bridge → Packet TracerAdaptive Script Engine layer: works across Packet Tracer 8.x / 9.x by probing available APIs at runtime (no hard-coded single method).
Features
Capability | Description |
Planning |
|
Live deploy | One call deploys devices + cables + IPs + IOS configs |
Granular control | Add device, connect, configure PC, send CLI, clear, query topology |
API probe |
|
Catalog | Routers, switches, PCs, cables with aliases |
Related MCP server: Packet Tracer MCP Server
Requirements
Python 3.11+
Cisco Packet Tracer 8.x or 9.x (running, with Script Module bridge active)
An MCP client: OpenCode, Claude Code, Cursor, etc.
Install
Windows (PowerShell)
git clone https://github.com/DiomedesMateo/packet-tracer-mcp.git
cd packet-tracer-mcp
python -m venv .venv
.\.venv\Scripts\Activate.ps1
# If execution policy blocks Activate:
# Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
pip install -e .
pip install "mcp<2"OpenCode config (%USERPROFILE%\.config\opencode\opencode.json or %APPDATA%\opencode\opencode.json):
{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"packet-tracer": {
"type": "local",
"command": [
"C:\\Users\\YOUR_USER\\path\\to\\packet-tracer-mcp\\.venv\\Scripts\\python.exe",
"-m",
"packet_tracer_mcp.server"
],
"enabled": true
}
}
}Replace the path with your real absolute path.
macOS / Linux
git clone https://github.com/DiomedesMateo/packet-tracer-mcp.git
cd packet-tracer-mcp
python3 -m venv .venv
source .venv/bin/activate
pip install -e .
pip install "mcp<2"OpenCode config (~/.config/opencode/opencode.json):
{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"packet-tracer": {
"type": "local",
"command": [
"/absolute/path/to/packet-tracer-mcp/.venv/bin/python",
"-m",
"packet_tracer_mcp.server"
],
"enabled": true
}
}
}Claude Desktop / Cursor
Add a similar MCP entry pointing to the same Python module and absolute interpreter path.
Configure Packet Tracer (required for live control)
Without this step the MCP can only plan topologies. Live tools (pt_add_device, pt_live_deploy, pt_connect, etc.) need Packet Tracer polling the local HTTP bridge.
Step-by-step (PT 8.x / 9.x)
Open Cisco Packet Tracer.
Menu Extensions → Scripting → New PT Script Module...
(or Configure PT Script Modules... → select a module → Edit).Open the Script Engine tab
(or Info → 3. Script Engine Files → Go To).Create or edit a
.jsfile and paste the entire contents of the file that matches your PT version:Packet Tracer 9.0.1+:
extension/bridge_pt901.js(multi-signature_NetAccess— fixes Passing incompatible arguments to C++)Packet Tracer 8.x:
extension/bridge_debug.js(classic_NetAccess)Alternative / webview:
extension/bridge_bootstrap.js(XMLHttpRequest)
Save the script inside the module.
Go to Info → 6. Saving → Export and save as e.g.
MCP-Bridge.pts.Open Extensions → Scripting → Configure PT Script Modules...
If the module is not in the list → Add → choose the
.ptsfile.Select the module → click Start.
The window title should show (Running), not
(Stopped).
Optional: click Debug to see logs such as
PT-MCP 9.0.1: bridge ACTIVE.Leave Packet Tracer open while you use OpenCode / Claude / Cursor.
If PT shows "New script modules must be exported and added as persistent script modules before starting", you must Export + Add before Start.
Verify from the AI client
Usa pt_bridge_statusResult | Meaning |
| PT is polling — live tools work |
| Module not Running, wrong JS, or PT closed |
| MCP HTTP server is up; PT still not polling |
The MCP bridge listens on http://127.0.0.1:54321 (GET /next, POST /result).
Detailed guide: docs/PACKET_TRACER_SETUP.md.
Usage examples
Usa pt_bridge_statusCrea una red simple con 1 router, 1 switch y 2 PCs en 192.168.1.0/24 y despliégala en Packet Tracer.pt_add_device R1 router-pt
pt_get_topologyPlan a two-site OSPF topology and deploy it live.More prompts: examples/sample_prompts.md.
Tools
Status
pt_bridge_status/pt_start_bridgept_probe_api— discover Script Engine paths & cache type codes
Catalog
pt_list_devices/pt_list_cables
Planning (offline)
pt_plan_simple_lan/pt_plan_two_site_ospf/pt_plan_from_prompt
Live
pt_add_device/pt_connect/pt_configure_pc/pt_send_clipt_get_topology/pt_clear_topology/pt_live_deploy/pt_run_js
Project layout
packet-tracer-mcp/
├── pyproject.toml
├── README.md
├── LICENSE
├── extension/
│ ├── bridge_bootstrap.js # XHR / webview bootstrap
│ ├── bridge_debug.js # PT 8.x (_NetAccess)
│ └── bridge_pt901.js # PT 9.0.1+ (multi-signature)
├── src/packet_tracer_mcp/
│ ├── server.py
│ ├── bridge.py
│ ├── api_probe.py
│ ├── catalog.py
│ ├── planner.py
│ └── js_generator.py
└── examples/
├── opencode.json
└── sample_prompts.mdNotes
Prefer
pip install "mcp<2"if you hit FastMCP / MCPServer import errors (SDK 2.x rename).Cache file:
~/.packet_tracer_mcp_cache.json.If
connected: false, re-Start the Script Module and keep Packet Tracer open.PT 9.0.1 error Passing incompatible arguments to C++ → use
extension/bridge_pt901.js.
License
MIT
This server cannot be deployed
Maintenance
Related MCP Connectors
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.
Human-input bridge for AI agents with voice-first answer links, MCP tools, and HTTP APIs.
Provides capabilities that let LLM agents perform a range of infrastructure management tasks.
Connect your AI to your own devices, 3D printers, factory tools and a shared agent task pool.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to control Cisco Packet Tracer in real time, allowing natural language-driven creation and configuration of network topologies.5MIT
- FlicenseNot gradedqualityDmaintenanceEnables AI models to generate, validate, and deploy network topologies directly into Cisco Packet Tracer from natural-language prompts.-
- AlicenseAqualityCmaintenanceEnables AI clients like Claude Desktop and Cursor to control Cisco Packet Tracer through natural language, including generating network topologies, running device configurations, and managing simulations.23MIT
- AlicenseNot gradedqualityCmaintenanceEnables LLMs to plan, validate, generate, and deploy Cisco Packet Tracer network topologies from natural-language prompts, including routing, switching, DHCP, VLANs, security, IPv6, wireless, live deployment, verification, and .pkt project management.3MIT