Cisco Modeling Labs CML — Claude Code MCP server: features and setup
Connect an AI agent to Cisco Modeling Labs to build lab topologies, control nodes, and inspect device configuration and status.
claude mcp add cml-mcp -e CML_URL=<CML_URL> -e CML_USERNAME=<CML_USERNAME> -e CML_PASSWORD=<CML_PASSWORD> -e PYATS_PASSWORD=<PYATS_PASSWORD> -e PYATS_AUTH_PASS=<PYATS_AUTH_PASS> -- uvx cml-mcpWhat Cisco Modeling Labs CML does
The server lets an agent create empty labs or build a topology from a definition, then start or stop labs and inspect nodes and links. It can send CLI commands to running devices, fetch console logs, and capture traffic from network links. Device command execution uses the cml-mcp[pyats] package variant.
You need Python 3.12, 3.13, or 3.14, uv, and Cisco Modeling Labs 2.9 or later. Configure the connection with CML_URL, CML_USERNAME, and CML_PASSWORD; device commands also use PyATS variables. TLS verification is enabled by default, while CML ships with a self-signed certificate. If your server uses that certificate, set CML_VERIFY_SSL to false.
What it helps with
- create a CML lab from a topology definition
- inspect node and link status
- start or stop a lab
- retrieve device configuration and console logs
- capture packets from a network link
Example prompts for the agent
- Create a CML lab with two routers and configure OSPF.
- Show Router1's current configuration and console log.
- Stop the lab and capture packets from the selected link.
How to install Cisco Modeling Labs CML
Platform CLI
claude mcp add cml-mcp -e CML_URL=<CML_URL> -e CML_USERNAME=<CML_USERNAME> -e CML_PASSWORD=<CML_PASSWORD> -e PYATS_PASSWORD=<PYATS_PASSWORD> -e PYATS_AUTH_PASS=<PYATS_AUTH_PASS> -- uvx cml-mcpReplace <…> with your own values. 1 more environment variable is in the server README. uvx runs the command named after the package; if the README names another one, use uvx --from cml-mcp <command>
Platform CLI
codex mcp add cisco-modeling-labs-cml --env CML_URL=<CML_URL> --env CML_USERNAME=<CML_USERNAME> --env CML_PASSWORD=<CML_PASSWORD> --env PYATS_USERNAME=<PYATS_USERNAME> --env PYATS_PASSWORD=<PYATS_PASSWORD> -- uvx cml-mcpReplace <…> with your own values. 1 more environment variable is in the server README. uvx runs the command named after the package; if the README names another one, use uvx --from cml-mcp <command>
Config file
{
"mcpServers": {
"cisco-modeling-labs-cml": {
"command": "uvx",
"args": [
"cml-mcp"
],
"env": {
"CML_URL": "<CML_URL>",
"CML_USERNAME": "<CML_USERNAME>",
"CML_PASSWORD": "<CML_PASSWORD>",
"PYATS_USERNAME": "<PYATS_USERNAME>",
"PYATS_PASSWORD": "<PYATS_PASSWORD>"
}
}
}
}Replace <…> with your own values. 1 more environment variable is in the server README. uvx runs the command named after the package; if the README names another one, use uvx --from cml-mcp <command>
Config file
{
"servers": {
"cisco-modeling-labs-cml": {
"type": "stdio",
"command": "uvx",
"args": [
"cml-mcp"
],
"env": {
"CML_URL": "<CML_URL>",
"CML_USERNAME": "<CML_USERNAME>",
"CML_PASSWORD": "<CML_PASSWORD>",
"PYATS_USERNAME": "<PYATS_USERNAME>",
"PYATS_PASSWORD": "<PYATS_PASSWORD>"
}
}
}
}Replace <…> with your own values. 1 more environment variable is in the server README. uvx runs the command named after the package; if the README names another one, use uvx --from cml-mcp <command>
Platform CLI
gemini mcp add -e CML_URL=<CML_URL> -e CML_USERNAME=<CML_USERNAME> -e CML_PASSWORD=<CML_PASSWORD> -e PYATS_USERNAME=<PYATS_USERNAME> -e PYATS_PASSWORD=<PYATS_PASSWORD> cisco-modeling-labs-cml uvx cml-mcpReplace <…> with your own values. 1 more environment variable is in the server README. uvx runs the command named after the package; if the README names another one, use uvx --from cml-mcp <command>
Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about Cisco Modeling Labs CML
How do I install Cisco Modeling Labs CML in Claude Code?
Add the server with `claude mcp add cml-mcp -e CML_URL=<CML_URL> -e CML_USERNAME=<CML_USERNAME> -e CML_PASSWORD=<CML_PASSWORD> -e PYATS_PASSWORD=<PYATS_PASSWORD> -e PYATS_AUTH_PASS=<PYATS_AUTH_PASS> -- uvx cml-mcp`. Replace the placeholders with your CML address and credentials.
What does Cisco Modeling Labs CML do?
It gives an agent tools to create CML topologies, control labs and nodes, inspect device configuration, and capture traffic from links.
What does the server need to run?
It requires Python 3.12, 3.13, or 3.14, uv, and Cisco Modeling Labs 2.9 or later. Use cml-mcp[pyats] to run CLI commands on virtual devices.