Requirements
- • Cisco Packet Tracer, running. Version 8.2 or newer.
- • A model provider. Either an authenticated
claudeCLI, or an API key or coding subscription from any provider in/connect. You do not need both. - • Nothing else. The binary carries its runtime inside — no Bun, no Node, no npm. Python only if you install the MCP server yourself instead of letting
packetsmith setupdo it.
Install
Any of these. They all end up with the same binary.
npm
npm i -g packetsmith
bun
bun add -g packetsmith
macOS · Linux · WSL
curl -fsSL https://raw.githubusercontent.com/Mats2208/packetsmith/main/scripts/install.sh | sh
Windows
irm https://raw.githubusercontent.com/Mats2208/packetsmith/main/scripts/install.ps1 | iex
The npm package has no code of its own: a small Node launcher plus one binary per platform as optional dependencies, so npm downloads only the ~100 MB that matches your machine instead of all seven.
Set up Packet Tracer
Once. This installs the MCP server, registers it, and downloads the Packet Tracer extension.
packetsmith setup
It asks before every step, and --dry-run shows the plan without
touching anything.
One manual step
Packet Tracer only accepts an extension through its own menu, and no installer can click it for you:
- Extensions ▸ Scripting ▸ Configure PT Script Modules
- Add… and pick the
.ptsfile that setup just printed - Extensions ▸ MCP BUILDER — it connects on its own
Connect a provider
Press /
and pick /connect. It asks two things, in this order:
- Who answers — the ones you already connected come first.
- Which plan, when the provider has more than one. Kimi has two: the Code subscription and the metered Open Platform. Different endpoints, different keys, and a key for one returns 401 against the other.
Keys land in ~/.packetsmith/auth.json with mode
0600. They are never printed, never logged, and never sent
anywhere except that provider's own API. Environment variables win over the file.
export PACKETSMITH_KIMI_KEY=sk-kimi-... # or KIMI_API_KEY export OPENAI_API_KEY=sk-... # whatever the plan documents
Your first lab
Plain language. No command syntax to learn.
3 routers with OSPF and a LAN on each
The right panel fills in from the tool results as they arrive. Nothing is polled and nothing is faked: the panel is derived from what the agent actually ran, so a device it says it created but did not, does not appear.
Useful next asks:
read the topology and tell me what's wrong segment it into VLANs by department verify connectivity between PC1 and the server
Commands
/ on an empty prompt, or Ctrl+P anywhere. Typing filters. Nothing here needs a restart.
/engine Who answers — ~150 providers, the ones you already connected first. /connect Pick a provider and a plan, then paste a key or run a device login. /model Switch model without losing the conversation. Shows context window and price. /effort low · medium · high · xhigh · max /usage How much of the plan is used up. /topology Re-read the topology and refill the panel. /bridge Check the bridge to Packet Tracer. /theme 13 palettes, previewed live, reverted on Esc. /debug Version, platform, engine, plan and model — a paste-ready bug report. /export Save the conversation and the topology to a file. Troubleshooting
Every one of these was a real failure.
Every pt_* call says Packet Tracer is not connected
Something else owns the bridge port. The MCP binds 127.0.0.1:54321 and only one process can hold it — and the port belongs to the Python server, not to Packet Tracer, so two live servers fight over it. If Claude Code, Cursor or Claude Desktop is running with the MCP configured, it already has the port. Close it and restart.
The bridge is down and nothing else is running
Packet Tracer needs the extension loaded, once per session: Extensions ▸ MCP BUILDER. The first-run screen tells you where the switch is.
401 from a provider whose key I just pasted
Almost always the wrong plan. Kimi Code keys (sk-kimi-…) work against api.kimi.com/coding; Moonshot platform keys work against api.moonshot.ai. Each returns 401 against the other, and the message does not explain why. /debug shows which plan and base URL are in use.
packetsmith: command not found, right after installing
The install directory is not on your PATH yet. The curl and PowerShell installers print the exact line to add and name the file it belongs in. On Windows, open a new terminal — the PATH change does not reach the one that is already open.
It says a provider is not verified
Seven of the ~150 are tested end to end; the rest come from the models.dev catalog and have not been run. They are offered anyway. If one fails, open an issue with the output of /debug — there is a template that asks for the right things.
Still stuck? Run /debug, then /copy,
and paste it into an issue.
It carries the version, platform, engine, plan and model — most of what anyone would ask you next.
Want the server without the terminal? MCP-Packet-Tracer works with any MCP client — Claude Code, Cursor, VS Code. Install it on its own →