cml-mcp-server
Integration with Cisco Modeling Labs (CML) for managing network labs, including creating/deleting labs, managing nodes and links, applying configurations, and deploying example network topologies.
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., "@cml-mcp-serverDeploy the two_router_ospf example topology and start it."
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.
cml-mcp-server
An MCP (Model Context Protocol) server for Cisco Modeling Labs (CML) v2.10.
It wraps Cisco's official virl2_client Python SDK to expose lab/topology
CRUD, node/link management, node configuration, and a catalog of ready-made
example network architectures as MCP tools - so an MCP client (Claude Code,
Claude Desktop, etc.) can build and run network labs for testing designs and
configs.
Setup
cd cml-mcp-server
python3 -m venv .venv
source .venv/bin/activate
pip install -e .
cp cml-config.example.toml cml-config.toml # then fill in host / username / password
chmod 600 cml-config.tomlCredentials: config file vs. env vars
Connection settings can come from either a TOML config file or environment variables; env vars win if both are present. The config file is the recommended approach since it keeps credentials out of shell history and process-list-visible env, and out of MCP client config JSON.
cml-config.toml (project root) - searched first - or
~/.config/cml-mcp-server/config.toml, or an explicit path via
CML_CONFIG_PATH:
[cml]
host = "cml.example.com"
username = "api-user"
password = "change-me"
# verify_ssl = falseEquivalent env vars: CML_HOST, CML_USERNAME, CML_PASSWORD,
CML_VERIFY_SSL. CML_VERIFY_SSL accepts true/false or a path to a CA
bundle; it defaults to false since most CML controllers run with a
self-signed certificate.
Related MCP server: Claude-Modeling-Labs MCP Server
Running
source .venv/bin/activate
cml-mcp-serverThis starts the server on stdio, ready to be attached to an MCP client.
Claude Code / Claude Desktop config
{
"mcpServers": {
"cisco-cml": {
"command": "/absolute/path/to/cml-mcp-server/.venv/bin/cml-mcp-server"
}
}
}Or point at an explicit config file / use env vars instead:
{
"mcpServers": {
"cisco-cml": {
"command": "/absolute/path/to/cml-mcp-server/.venv/bin/cml-mcp-server",
"env": {
"CML_CONFIG_PATH": "/absolute/path/to/cml-config.toml"
}
}
}
}Tools
Labs
list_labs,get_lab_topologycreate_lab,delete_labstart_lab,stop_lab,wipe_lab
Platform catalog
list_node_definitions- available platform types (iosv, iosvl2, csr1000v, nxosv, asav, alpine, unmanaged_switch, ...), depends on which reference images are imported into your CML controller
Nodes
add_node,remove_nodestart_node,stop_nodeget_node_config,set_node_config(day-0 startup config)extract_node_config(pull the running config off a booted node)get_node_console_log
Links
add_link,remove_link- by default connects the next free interface on each node; interface labels can be given explicitly
Bulk topology building
build_topology- create a whole lab (nodes + links + configs) in one call from a node/link speclist_example_topologies,get_example_topology,deploy_example_topology- a small catalog of ready-made architectures:two_router_ospf- single-area OSPF adjacencybgp_two_as_peering- eBGP between two ASesthree_tier_campus- core/distribution/access skeletonleaf_spine_datacenter- 2-spine/2-leaf full-mesh underlayfirewall_dmz- IOS zone-based firewall with inside/outside/DMZ zones
These templates default to
iosv/iosvl2(bundled with every CML install); swapnode_definitionper node for platform-specific images (e.g.nxosv,csr1000v,asav) if you have them.
Typical flow
list_node_definitions()- see what platforms are available.Either:
list_example_topologies()→deploy_example_topology("two_router_ospf"), ordescribe an architecture and let the assistant design a node/link spec, then call
build_topology(...)directly.
start_lab(lab_id), thenget_lab_topology(lab_id)to check node state.get_node_console_log/extract_node_configto inspect a running node;set_node_config+wipe_lab+start_labto iterate on day-0 config.delete_lab(lab_id)when done - this is permanent.
Security notes
This server can create, start, and delete labs and nodes on the target CML controller. Scope the CML account to a dedicated user if you don't want it operating with full admin rights, and treat
delete_lab,wipe_lab, andremove_nodeas destructive, unrecoverable actions.Credentials are only ever read (from
cml-config.tomlor env vars); nothing is written to disk by this server. Keep the config file out of version control (it's in.gitignoreby default) and permissioned600.Session/token handling (login, refresh, re-auth) is delegated entirely to
virl2_client.
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
- AlicenseCqualityCmaintenanceA Python-based MCP server that enables querying Cisco's Meraki Dashboard API to discover, monitor, and manage Meraki environments.Last updated2240MIT
- Flicense-qualityDmaintenanceA comprehensive toolkit that enables automated interaction with Cisco Modeling Labs (CML) for creating network topologies, configuring devices, and managing lab environments.Last updated1
- Alicense-qualityAmaintenanceAn MCP server that allows LLMs to create, configure, validate, and explain Cisco Packet Tracer network topologies. It provides a comprehensive suite of tools for generating deployment scripts, CLI configurations, and automated network troubleshooting.Last updated111MIT
- AlicenseAqualityCmaintenanceThin MCP server for Cisco CML2 that exposes the live OpenAPI specification and a generic API call tool, enabling models to interact with CML2 by reading the spec first.Last updated2MIT
Related MCP Connectors
An MCP server that let you interact with Cycloid.io Internal Development Portal and Platform
The official MCP Server from Mia-Platform to interact with Mia-Platform Console
MCP server for Appcircle mobile CI/CD platform.
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/jonathanLynn/ciscocml-mcpserver'
If you have feedback or need assistance with the MCP directory API, please join our Discord server