cisco-pt-mcp
Provides tools for automating Cisco Packet Tracer, including creating network topologies, adding and connecting devices, configuring IOS devices and PCs, and running monitoring and simulation workflows.
Integrates Google Gemini AI to generate network designs and PTBuilder code from natural-language descriptions, which can then be applied to Packet Tracer.
Click on "Install 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., "@cisco-pt-mcpCreate a small office network with one router, one switch, and three PCs."
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.
cisco-pt-mcp 🚀
AI-powered Cisco Packet Tracer automation - Let AI clients control Packet Tracer with natural language. Open source MCP server with Gemini AI integration.

✨ Features
🤖 AI Network Generation - Describe networks in plain English, get working topologies
🎨 Visual Builder Interface - Web-based code editor with syntax highlighting
📦 Ready-Made Templates - Campus, branch office, VLAN, routing configurations
🔌 MCP Protocol - Works with Claude Desktop, Cursor, and other MCP clients
⚡ Real-time Control - Direct bridge to running Packet Tracer instance
🛠️ Complete Toolset - 20+ tools for device management, configuration, and testing
Related MCP server: packet-tracer-mcp
📥 Quick Install
1. Install MCP Server
# Clone or download this repository
cd cisco-pt-mcp
# Install with AI support
pip install -e ".[ai]"
# Configure Gemini API (optional, for AI features)
python setup_config.py2. Install Packet Tracer Extension
Open Cisco Packet Tracer
Extensions → Scripting → Configure PT Script Modules
Click Add → Select
extension/cisco-pt-mcp.ptsRestart Packet Tracer
3. Start & Connect
# Start the MCP server
python -m mcp_serverIn Packet Tracer:
Click Extensions → Packet Tracer MCP
Status should show "MCP Connected"
📖 See QUICKSTART.md for detailed instructions
🎯 Usage Modes
Mode 1: AI Generator (Natural Language)
Open the PTBuilder interface in Packet Tracer and use the AI Generator tab:
"Create a corporate network with 1 edge router, 1 core switch,
2 department switches, and 3 PCs per department. Configure VLANs."Click Generate → Network appears in workspace!
Mode 2: Code Editor (JavaScript)
Write PTBuilder code directly:
addDevice("R1", "2911", 150, 150);
addDevice("S1", "2960-24TT", 350, 150);
addLink("R1", "GigabitEthernet0/0", "S1", "GigabitEthernet0/1", "straight");
configureIosDevice("R1", "interface Gi0/0\nip address 192.168.1.1 255.255.255.0");Mode 3: MCP Client (Claude/Cursor)
Configure your MCP client:
Claude Desktop (~/Library/Application Support/Claude/claude_desktop_config.json):
{
"mcpServers": {
"cisco-pt-mcp": {
"command": "python",
"args": ["-m", "mcp_server"],
"cwd": "/path/to/cisco-pt-mcp",
"env": {
"GEMINI_API_KEY": "your_key_here"
}
}
}
}Then chat with Claude:
"Create a network lab for testing OSPF routing with 3 routers"
🛠️ Available Tools
AI-Powered Tools
Tool | Description | Example |
| Generate complete network from text | "Create a small office network..." |
| Generate PTBuilder JavaScript | "Code for 5 switches in a ring" |
| Run PTBuilder code | Execute custom/generated code |
| Build from JSON specification | Import complex designs |
| Open the web UI | Access code editor & templates |
Core Network Tools
Tool | Description |
| Add router, switch, PC, or server |
| Install interface module (WIC, NIM, etc.) |
| Connect devices with cables |
| Delete devices |
| Remove connections |
| Rename devices |
| Reposition on canvas |
| Power device on/off |
Configuration Tools
Tool | Description |
| Set IP, subnet, gateway, DNS on PCs |
| Run IOS CLI commands on routers/switches |
Monitoring & Simulation Tools
Tool | Description |
| Snapshot of all devices and connections |
| Detailed device information |
| Switch simulation/realtime mode |
| Query simulation state |
| Step through packet flow |
| Send ICMP ping PDU |
| Read PDU outcomes |
| View IOS command history |
📚 Documentation
QUICKSTART.md - Get running in 5 minutes
SETUP_GUIDE.md - Complete setup & usage guide
packet-tracer-automation-build-doc.md - Advanced automation techniques
🎓 Examples
Example 1: Simple Network with AI
Prompt: "Create a basic network with one 2911 router, one 2960 switch,
and two PCs. Configure the router with IP 192.168.1.1 and the PCs
with static IPs in the same subnet."
Result: Complete working network in 30 secondsExample 2: Campus Network Template
Load the "Campus Network" template from the Templates tab:
3-tier architecture (core, distribution, access)
1 core switch
2 distribution switches
4 access switches
Proper inter-switch connections
Example 3: VLAN Configuration
// From templates - VLAN setup
addDevice("S1", "2960-24TT", 300, 200);
addDevice("PC1", "PC-PT", 150, 300);
addDevice("PC2", "PC-PT", 450, 300);
configureIosDevice("S1", `
vlan 10
name Sales
vlan 20
name Engineering
interface FastEthernet0/1
switchport mode access
switchport access vlan 10
interface FastEthernet0/2
switchport mode access
switchport access vlan 20
`);🔧 Configuration
Gemini API Setup
Option 1: Interactive
python setup_config.pyOption 2: Environment Variable
export GEMINI_API_KEY="your_key_here"Option 3: Config File
Create ~/.cisco-pt-mcp/config.json:
{
"gemini_api_key": "YOUR_KEY_HERE",
"bridge_host": "127.0.0.1",
"bridge_port": 7531,
"tool_timeout": 60
}🏗️ Architecture
┌─────────────────┐
│ MCP Client │ (Claude Desktop, Cursor, etc.)
│ (Natural Lang) │
└────────┬────────┘
│ MCP Protocol
┌────────▼────────┐
│ MCP Server │ (Python)
│ + Gemini AI │ - Network generation
│ │ - Code generation
└────────┬────────┘
│ Socket.IO (port 7531)
┌────────▼────────┐
│ PT Extension │ (JavaScript)
│ cisco-pt-mcp │ - PTBuilder integration
│ │ - Web interface
└────────┬────────┘
│ IPC API
┌────────▼────────┐
│ Packet Tracer │ (Cisco Application)
│ Workspace │
└─────────────────┘🤝 Contributing
Contributions welcome! This project integrates:
PTBuilder - JavaScript automation for PT
Gemini API - AI network generation
📄 License
MIT License - See LICENSE file
🙏 Acknowledgments
PTBuilder by kimmknight - JavaScript automation framework
MCP Protocol - Standard for AI-application communication
Google Gemini - AI generation capabilities
Original cisco-pt-mcp by muhammadbalawal
🆘 Support & Issues
Troubleshooting: See SETUP_GUIDE.md
Issues: Open an issue on GitHub
Documentation: Check the docs folder
Star ⭐ this repo if you find it useful!
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceConnects Claude with Cisco Packet Tracer 9.x to control network topologies, configure devices with IOS commands, and run diagnostics via natural language.MIT
- AlicenseNot gradedqualityCmaintenanceEnables control of Cisco Packet Tracer 9.0 via natural language, allowing creation of network topologies, device configuration, and simulation launches through an MCP interface.998MIT
- AlicenseBqualityBmaintenanceEnables automation of Cisco Packet Tracer simulations by placing devices, connecting links, and generating IOS configurations via MCP, ideal for network coursework and demonstrations.231MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to control Cisco Packet Tracer in real time, allowing natural language-driven creation and configuration of network topologies.4MIT
Related MCP Connectors
Hosted MCP server connecting claude.ai, ChatGPT and other AI apps to your own computer
MCP server for Pentest-Tools.com: run scans, manage findings and reports via your preffered LLM.
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/2001sithum/cisco-pt-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server