
Claude-Modeling-Labs MCP Server
A comprehensive toolkit that enables automated interaction with Cisco Modeling Labs (CML) for creating network topologies, configuring devices, and managing lab environments.
README
Claude-Modeling-Labs MCP Server
A comprehensive, modular toolkit for interacting with Cisco Modeling Labs (CML) through the Model Context Protocol (MCP) interface. This server enables automated lab creation, topology management, device configuration, and network testing for educational and development purposes.
Features
Core Capabilities
- Lab Management: Create, start, stop, and delete CML labs
- Topology Building: Add routers, switches, and create network links
- Device Configuration: Apply and retrieve device configurations
- Console Access: Execute commands on network devices
- Network Discovery: Inspect lab topologies, nodes, and interfaces
Key Benefits
- Modular Architecture: Clean separation of concerns across handlers
- Educational Focus: Perfect for networking students and instructors
- Automation Ready: Designed for agentic AI tutoring systems
- Windows Compatible: Modular design resolves previous Windows compatibility issues
Installation
Prerequisites
- Python 3.8 or higher
- Access to a Cisco Modeling Labs server
- Valid CML credentials
Quick Start
- Clone or download this repository
- Install dependencies:
pip install -r requirements.txt
- Run the MCP server:
python claude_modeling_labs_modular.py
Development Installation
pip install -e .[dev]
Usage
Initialize Connection
# First, initialize the client with your CML server details
initialize_client(
base_url="https://your-cml-server.com",
username="your-username",
password="your-password",
verify_ssl=True # Set to False for self-signed certificates
)
Basic Lab Operations
# Create a new lab
lab = create_lab("My Network Lab", "Learning OSPF routing")
# Create network devices
router1 = create_router(lab["lab_id"], "R1", x=100, y=100)
router2 = create_router(lab["lab_id"], "R2", x=300, y=100)
switch1 = create_switch(lab["lab_id"], "SW1", x=200, y=200)
# Connect devices
link_nodes(lab["lab_id"], router1["node_id"], router2["node_id"])
link_nodes(lab["lab_id"], router1["node_id"], switch1["node_id"])
# Start the lab
start_lab(lab["lab_id"])
wait_for_lab_nodes(lab["lab_id"], timeout=120)
Device Configuration
# Apply configuration to a router
ospf_config = """
hostname Router1
interface GigabitEthernet0/0
ip address 10.1.1.1 255.255.255.0
no shutdown
router ospf 1
network 10.1.1.0 0.0.0.255 area 0
"""
configure_node(lab["lab_id"], router1["node_id"], ospf_config)
# Retrieve current configuration
current_config = get_node_config(lab["lab_id"], router1["node_id"])
Console Commands
# Execute commands on devices
send_console_command(lab["lab_id"], router1["node_id"], "show ip route")
check_interfaces(lab["lab_id"], router1["node_id"])
# Send multiple commands
commands = [
"show version",
"show ip interface brief",
"show running-config"
]
send_multiple_commands(lab["lab_id"], router1["node_id"], commands)
Architecture
The modular design separates functionality into focused handlers:
src/
├── client/ # CML API authentication and HTTP client
├── handlers/ # Modular tool handlers
│ ├── lab_management.py # Lab CRUD operations
│ ├── topology.py # Node and link management
│ ├── configuration.py # Device configuration
│ └── console.py # Console session management
├── utils/ # Common utilities and helpers
└── server.py # Main MCP server entry point
Key Design Principles
- Separation of Concerns: Each handler focuses on one aspect of CML management
- Clean Dependencies: Minimal coupling between modules
- Error Handling: Consistent error handling across all operations
- Windows Compatibility: Modular structure avoids file size limitations
Available Tools
Lab Management
initialize_client()
- Authenticate with CML serverlist_labs()
- List all available labscreate_lab()
- Create a new labget_lab_details()
- Get detailed lab informationdelete_lab()
- Delete a labstart_lab()
- Start lab executionstop_lab()
- Stop lab executionwait_for_lab_nodes()
- Wait for nodes to initializelist_node_definitions()
- List available device types
Topology Management
get_lab_nodes()
- List nodes in a labadd_node()
- Add a device to a labcreate_router()
- Create a router (iosv)create_switch()
- Create a switch (iosvl2)get_node_interfaces()
- List node interfacesget_physical_interfaces()
- Get physical interfaces onlycreate_interface()
- Create new interface on a nodeget_lab_links()
- List all links in a labcreate_link_v3()
- Create link between specific interfaceslink_nodes()
- Automatically link two nodesdelete_link()
- Remove a linkget_lab_topology()
- Get complete topology summary
Configuration Management
configure_node()
- Apply configuration to a deviceget_node_config()
- Retrieve device configuration
Console Operations
open_console_session()
- Open console access to deviceclose_console_session()
- Close console sessionsend_console_command()
- Execute single commandsend_multiple_commands()
- Execute multiple commandscheck_interfaces()
- Check interface statusget_diagnostic_recommendations()
- Get troubleshooting suggestions
Educational Use Cases
This toolkit is designed to support networking education through:
Automated Lab Creation
- Dynamic topology generation based on learning objectives
- Pre-configured scenarios for specific networking concepts
- Rapid iteration and experimentation
AI-Powered Tutoring
- Agentic systems can create custom labs for individual students
- Real-time guidance and troubleshooting assistance
- Adaptive learning paths based on student progress
Curriculum Integration
- Support for various networking topics (OSPF, BGP, VLAN, STP, etc.)
- Scalable from basic connectivity to complex enterprise scenarios
- Integration with existing learning management systems
Contributing
This project follows a modular architecture to support easy extension and maintenance:
- Adding New Tools: Create new functions in the appropriate handler module
- New Handler Categories: Add new handler files and register them in
server.py
- Testing: Each module can be tested independently
- Documentation: Update both code comments and this README
License
MIT License - see LICENSE file for details.
Support
For issues, questions, or contributions, please refer to the project repository or documentation.
Version: 2.0.0
Authors: Claude AI Assistant
Purpose: Educational networking automation and AI-powered tutoring
推荐服务器

Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。