# Cisco Modeling Labs CML

Connect an AI agent to Cisco Modeling Labs to build lab topologies, control nodes, and inspect device configuration and status.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 76
- Author: xorrkaz
- License: BSD-2-Clause · policy=link-only · description only; the file stays with the author
- Source: https://github.com/xorrkaz/cml-mcp
- Updated: 2026-10-23
- HTML: https://affpapa.org/en/nevibecode/mcp/cisco-modeling-labs-cml

## What it 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`.

## Requirements
- Needs: Python and uv (commands run via uvx)
- Environment variables: `CML_URL`, `CML_USERNAME`, `CML_PASSWORD`, `PYATS_USERNAME`, `PYATS_PASSWORD`, `PYATS_AUTH_PASS` — keys and tokens: ask the human for the values, never commit them or put them in shared files.

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
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 <…> 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>

### Codex

**Platform CLI**
```bash
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-mcp
```
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>

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "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>

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "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>

### Gemini CLI

**Platform CLI**
```bash
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-mcp
```
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>

## When to use it
- 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
- 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.

## Similar
- [GitHub](https://affpapa.org/en/nevibecode/mcp/github.md) — MCP server · ★ 33918
- [Netdata](https://affpapa.org/en/nevibecode/mcp/netdata.md) — MCP server · ★ 81115
- [Oh My Posh Validator](https://affpapa.org/en/nevibecode/mcp/oh-my-posh-validator.md) — MCP server · ★ 23643
- [Keploy](https://affpapa.org/en/nevibecode/mcp/keploy.md) — MCP server · ★ 18727
- [Coder](https://affpapa.org/en/nevibecode/mcp/coder.md) — MCP server · ★ 17160
- [mcp](https://affpapa.org/en/nevibecode/mcp/kubeshark-mcp.md) — MCP server · ★ 12109

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
