packet-tracer
Integrates with Cisco Packet Tracer 9 to let agents build network topologies, configure devices and servers, push IOS configurations, and read real command output (e.g. show ip route, ping), with additional support for DHCP pools, DNS records, HTTP pages, and server services.
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.
cisco-pt-mcp-plus
REST + MCP gateway for Cisco Packet Tracer 9. It's a small patch to the cisco-pt-mcp script module plus a Python gateway. Together they let an AI agent (or curl, or a script) configure servers and read real output from a running Packet Tracer instead of just building topologies.
Claude / Cursor / any MCP client curl / Python scripts
│ stdio │ HTTP
▼ ▼
ptgateway.mcp_proxy ──HTTP──► ptgateway (aiohttp, 127.0.0.1:7532)
│ REST /api/pt/tool/<name>
│ Socket.IO (cisco-pt-mcp wire protocol)
▼
Packet Tracer ── patched cisco-pt-mcp module
userfunctions.js + ptEval(code)
interface.js → MCP_URL :7532Why
The stock cisco-pt-mcp module exposes 18 fixed functions (add devices, cable, push IOS config, send a simulation PDU). That covers building a lab, but not configuring or checking one:
Needed | Stock cisco-pt-mcp | This repo |
Read | ✗ ( |
|
Real | ✗ (only simulation PDUs, results garbled in PT 9) |
|
Server-PT: DHCP pools, DNS records, web pages, service on/off | ✗ |
|
Renew a DHCP lease and get the address | ✗ |
|
Open a page in a PC's browser | ✗ |
|
Anything else in PT's script API (open/save | ✗ |
|
Several clients share one PT (MCP + scripts + curl) | one MCP process owns PT | one gateway, REST for everyone |
The trick: add one generic function, ptEval(code), to the plugin. It runs a JS function body inside PT's
script engine. Every new tool is then a short JS snippet built in Python (ptgateway/tools.py), with no more
plugin edits per feature.
Built while automating a 4-design hospital network project in PT 9.0.1 (D0 flat → D3 micro-segmented).
The PT 9 surprises found along the way are in docs/PT9-NOTES.md.
Related MCP server: mcp-gateway
Quick start
# 1. Python side
git clone https://github.com/<you>/cisco-pt-mcp-plus && cd cisco-pt-mcp-plus
python -m venv .venv && .venv/Scripts/pip install -e . # Linux/macOS: .venv/bin/pip
python -m ptgateway # or ./run.ps1 / ./run.sh
# 2. Packet Tracer side (one time): patch 2 files of the cisco-pt-mcp module
# -> docs/INSTALL-PLUGIN.md (Info tab -> Save, then Stop/Start the module)
# then: Extensions -> Packet Tracer MCP => "connected"
# 3. Check
curl http://127.0.0.1:7532/api/pt/statusUse it from an MCP client
claude mcp add packet-tracer -- <path-to>/.venv/Scripts/python -m ptgateway.mcp_proxyThe proxy lists all 34 tools (18 stock + 16 new) and forwards each call to the gateway.
PTGATEWAY_URL overrides the default http://127.0.0.1:7532.
Use it from code
curl -X POST http://127.0.0.1:7532/api/pt/tool/iosExec \
-H "content-type: application/json" \
-d '{"deviceName":"R1","command":"show ip route"}'import json, urllib.request
def pt(tool, **args):
r = urllib.request.urlopen(urllib.request.Request(
f"http://127.0.0.1:7532/api/pt/tool/{tool}", json.dumps(args).encode(),
{"content-type": "application/json"}), timeout=180)
return json.loads(r.read())
print(pt("pcCommand", deviceName="PC0", command="ping 10.0.0.1")["result"]["output"])More: examples/rest_examples.sh, examples/ping_sweep.py.
Tools
New (via ptEval): ptEval, iosExec, pcCommand, pcSession, httpGet, renewDhcp, getHostIp,
listDevices, setServerService, setDhcpPool, listDhcpPools, removeDhcpPool, addDnsRecord,
listDnsRecords, setHttpPage, probeProcesses.
Stock (forwarded): addDevice, addModule, addLink, removeDevice, removeLink, renameDevice,
moveDevice, setPower, configurePcIp, configureIosDevice, getNetwork, getDeviceInfo,
setSimulationMode, getSimulationStatus, stepSimulation, sendPdu, getPduResults, getCommandLog.
Arguments for each tool are listed in docs/TOOLS.md.
Layout
ptgateway/
server.py aiohttp app: /api/pt/status, /api/pt/tools, POST /api/pt/tool/{name}
bridge.py Socket.IO server speaking the cisco-pt-mcp wire protocol (one call at a time)
tools.py 16 composite tools = JS snippets sent through ptEval
mcp_proxy.py stdio MCP server -> REST
legacy_schemas.py the 18 stock tool schemas (from cisco-pt-mcp)
selftest.py fake PT plugin + REST round-trip checks (no Packet Tracer needed)
plugin/ the full module source; only userfunctions.js and interface/interface.js differ from upstream
docs/ INSTALL-PLUGIN.md, TOOLS.md, PT9-NOTES.md
examples/ curl + Python examplesTest without Packet Tracer
python -m ptgateway --port 9532 &
PTGATEWAY_URL=http://127.0.0.1:9532 python -m ptgateway.selftest # 7 PASS linesSecurity
ptEval runs arbitrary JavaScript inside Packet Tracer, and the gateway has no auth. Keep it on loopback
(the default). It warns if you bind to anything else. Don't expose port 7532.
Other projects
If you need a full topology generator with ~80+ tools, use Mats2208/MCP-Packet-Tracer. It covers server DHCP/DNS/HTTP, PC commands and a raw-JS escape hatch on its own extension. This repo is the small option: if you already use cisco-pt-mcp, replace two files and you get output reading and server/service control, plus the PT 9 notes. See also caixax/packet-tracer-mcp and cleonte/MCP_Packet_Tracer.
Credits & license
MIT. plugin/, ptgateway/legacy_schemas.py and the wire protocol in ptgateway/bridge.py come from
cisco-pt-mcp © 2026 Muhammad Balawal (MIT).
Cisco and Packet Tracer are trademarks of Cisco Systems, Inc. Not affiliated with Cisco.
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
Managed MCP gateway with OAuth, per-agent permissions, shared accounts and activity logs.
Governed MCP gateway: one endpoint for your tools, with credential custody and audit log.
Streamable HTTP MCP gateway for NV oOS fleets — one API key, namespaced tools, quotas and policy.
MCP federation gateway: route, govern and observe agent tools across clouds and MCP servers.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceMCP Gateway that aggregates multiple upstream MCP servers into a single endpoint with persistent connections, tool registry, and authentication.84 npm2MIT
- AlicenseNot gradedqualityBmaintenanceEnables multiple MCP clients to securely access various third-party MCP backends through a single HTTP gateway, with modern MCP handshake compatibility and session lifecycle management.46 npmMIT
- AlicenseNot gradedqualityCmaintenanceEnables a single MCP client to connect to many upstream MCP servers through one gateway, with prefix-based routing, health checks, circuit-breaker failover, and unified stdio/HTTP access.MIT
- FlicenseNot gradedqualityCmaintenanceEnables centralized routing, discovery, namespacing, and execution of tools from multiple remote MCP servers over HTTP/SSE, aggregating them behind a unified MCP gateway with dynamic server management.-