Documentation
Everything you need to install, connect your MCP client, and deploy your first topology. No prior MCP experience required.
Required runtime. Check with python --version
Python package manager for installation
To clone the repository
Plus the MCP Control Center extension — only for live deploy, not for planning or generation
git clone https://github.com/Mats2208/MCP-Packet-Tracer.git cd MCP-Packet-Tracer
pip install -e .
Dependencies (mcp[cli]>=1.13, pydantic>=2.11) install automatically. The packet_tracer_mcp module is then importable from any directory.
claude mcp add --scope user --transport stdio packet-tracer -- python -m packet_tracer_mcp --stdio
Claude Code shown. For VS Code / Copilot or any other client, see Connect a Client below.
claude mcp add (or any stdio client config), the client spawns
python -m packet_tracer_mcp --stdio for you. The internal HTTP bridge to Packet Tracer
(:54321) still starts automatically inside that process, so live deploy works the same. Want one shared instance for multiple clients? Run it yourself in streamable-HTTP mode:
$ python -m packet_tracer_mcp INFO Packet Tracer MCP v0.4.0 INFO Transport: streamable-http INFO Listening on http://127.0.0.1:39000/mcp
Then point any client at http://127.0.0.1:39000/mcp.
Add to .vscode/mcp.json:
{
"servers": {
"packet-tracer": {
"type": "stdio",
"command": "python",
"args": ["-m", "packet_tracer_mcp", "--stdio"]
}
}
} Add to claude_desktop_config.json:
{
"mcpServers": {
"packet-tracer": {
"command": "python",
"args": ["-m", "packet_tracer_mcp", "--stdio"]
}
}
} python -m packet_tracer_mcp --stdio) — recommended for desktop clients —
or point an HTTP client at http://127.0.0.1:39000/mcp. The server exposes 36 tools and 5 resources that any
MCP-compatible client can discover automatically. On Windows, if your client can't spawn the server, use the full path to python.exe in the command field.
Once connected, ask your AI agent to build a topology. You can also call tools directly:
pt_full_build( routers=2, pcs_per_lan=2, dhcp=True, routing="ospf", has_wan=True ) # Returns: plan + script + configs + explanation
# 1. Generate plan plan = pt_plan_topology(routers=2, pcs_per_lan=2, routing="static") # 2. Validate pt_validate_plan(plan) # 3. Auto-fix if needed pt_fix_plan(plan) # 4. Generate artifacts pt_generate_script(plan) # topology build script (JS) pt_generate_configs(plan) # IOS CLI configs # 5. Get explanation pt_explain_plan(plan) # Natural language summary
# Save everything to a directory pt_export(plan, path="./my_lab/")
.pts script module from Releases).
Live deploy streams commands into a running PT via a bidirectional HTTP bridge — no copy-paste, no bootstrap snippet. Download the latest .pts (e.g. V4.0.pts) from Releases, then in Packet Tracer:
Extensions → Scripting → Configure PT Script Modules → Add… → select the .pts
This installs our own extension — you do not need any third-party tool.
Open Extensions → MCP BUILDER. The MCP Control Center window appears and auto-connects to the bridge — its polling loop is built in, so there's nothing to paste.
# Check the bridge — should report ACTIVE and CONNECTED pt_bridge_status() # Deploy a plan in real-time pt_live_deploy(plan)
Devices, links, and configurations appear in Packet Tracer within seconds. Full steps in the Live Deploy docs ↗.
Save and load topologies for later reuse.
# List saved projects
pt_list_projects()
# Load a previously saved project
pt_load_project("my_lab")
# Export creates a project automatically
pt_export(plan, path="./my_lab/") Check Python version: python --version (needs 3.11+). Ensure all dependencies installed: pip install -e .
For stdio clients, make sure python is on your PATH — on Windows, use the full path to python.exe in the command field. For HTTP mode, verify the server is reachable on http://127.0.0.1:39000/mcp.
The MCP Control Center extension isn't registered. Re-add the .pts via Extensions → Scripting → Configure PT Script Modules → Add…, then open Extensions → MCP BUILDER — it auto-connects (no snippet to paste). Make sure port 54321 is free.
Minimize the MCP Control Center window (don't just push it behind PT). When the webview is visible but in the background, Chromium keeps rendering and competes for the GPU.
Run pt_fix_plan(plan) to auto-correct common issues (wrong cables, model limitations, port conflicts). If errors persist, check the error codes for specific guidance.
Routing covers static, OSPF, EIGRP and RIP (static and OSPF are the most mature). NAT (static/dynamic/PAT) and ACLs (standard/extended/named) can be applied on live routers via the bridge. VLAN and STP automation aren't in the planner yet.
The full documentation — tool reference, device catalog, and networking guides — lives on the docs site.