AI Network Labs 01 — Setup on Claude Code, Cursor, VS Code and Codex
Install uv, register uvx cisco-pt-mcp with your client, add the Packet Tracer extension and get the bridge pill to say connected.
Setup has two halves: the MCP server, which your AI client starts, and the Packet Tracer extension, which opens a bridge inside Packet Tracer. Both must be running before the first prompt.
Step 1 — Install uv
The server runs through uvx, which downloads the package from PyPI into an isolated environment on demand — nothing is installed globally.
# 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"
# check
uvx --versioncisco-pt-mcp needs Python 3.10 or newer; uv will fetch a suitable interpreter if you don't have one.
Step 2 — Register the server with your client
Pick the client you use. The command is the same everywhere: uvx cisco-pt-mcp.
Claude Code
claude mcp add cisco-pt-mcp --scope user -- uvx cisco-pt-mcpCursor — ~/.cursor/mcp.json (all projects) or .cursor/mcp.json (one project):
{
"mcpServers": {
"cisco-pt-mcp": { "command": "uvx", "args": ["cisco-pt-mcp"] }
}
}VS Code — .vscode/mcp.json:
{
"servers": {
"cisco-pt-mcp": { "type": "stdio", "command": "uvx", "args": ["cisco-pt-mcp"] }
}
}Codex CLI — ~/.codex/config.toml:
[mcp_servers.cisco-pt-mcp]
command = "uvx"
args = ["cisco-pt-mcp"]Step 3 — Add the Packet Tracer extension
- Download
cisco-pt-mcp.ptsfrom theextensionfolder of the cisco-pt-mcp repository. - In Packet Tracer: Extensions → Scripting → Configure PT Script Modules… → Add, and pick the
.ptsfile. - Restart Packet Tracer.
Step 4 — Open the bridge
In Packet Tracer, open Extensions → Packet Tracer MCP. A bridge window appears with a status pill. Start (or restart) your AI client; within a second the pill should read connected.
Order matters less than you'd think, but if the pill stays disconnected: keep the bridge window open, then restart the AI client so it launches a fresh uvx cisco-pt-mcp process.
Step 5 — Smoke test
Ask your client:
Using cisco-pt-mcp, add one 2911 router named R1 to the canvas,
then show me the network snapshot.You should see the client call addDevice, then getNetwork, and a router appear in Packet Tracer. Delete it with removeDevice (or just ask) and you're ready for the labs.
Troubleshooting checklist
| Symptom | Check |
|---|---|
| Client says the tool doesn't exist | The MCP config file path and JSON syntax; restart the client |
uvx: command not found | Open a new terminal so uv's PATH change applies |
Pill never says connected | Bridge window open? Extension added and Packet Tracer restarted? |
| Tool calls time out | Packet Tracer is showing a modal dialog — close it |
The bridge listens on your own machine only (127.0.0.1). Nothing about your Packet Tracer session is exposed to the network.
ExerciseKnowledge check
The bridge pill stays disconnected. What is the first thing to check?
Finished this one?
Progress is saved in this browser.
