思科建模实验室
STDIO思科建模实验室网络拓扑创建管理MCP服务器
思科建模实验室网络拓扑创建管理MCP服务器
mcp-name: io.github.xorrkaz/cml-mcp
cml-mcp is a server implementation of the Model Context Protocol (MCP) designed
for Cisco Modeling Labs (CML). It is built using FastMCP 2.0 and designed to provide a set of tools for LLM apps like Claude Desktop, Claude Code, and Cursor to interact with CML.
If you do not want to run CLI commands on devices running in CML, you don't need to do anything else other than install the base cml-mcp package.  However,
if you want full support, Windows users also require either Windows Subsystem for Linux (WSL) with Python and uv installed within WSL or a Docker environment running on the Windows machine.
You have a couple of choices to hook this server up to your favorite MCP client.  Probably the easiest way is to use uvx, which downloads the server from PyPi and runs it in a standalone environment.  This works for Linux, Mac, and Windows users but does not provide CLI command support.  Edit your client's config and add something like the following.  This example is for Claude Desktop:
{ "mcpServers": { "Cisco Modeling Labs (CML)": { "command": "uvx", "args": [ "cml-mcp" ], "env": { "CML_URL": "<URL_OF_CML_SERVER>", "CML_USERNAME": "<USERNAME_ON_CML_SERVER>", "CML_PASSWORD": "<PASSWORD_ON_CML_SERVER>" } } } }
In order to execute CLI commands on devices running within CML, Linux and Mac users will need to change the "args" to cml-mcp[pyats].  For example:
{ "mcpServers": { "Cisco Modeling Labs (CML)": { "command": "uvx", "args": [ "cml-mcp[pyats]" ], "env": { "CML_URL": "<URL_OF_CML_SERVER>", "CML_USERNAME": "<USERNAME_ON_CML_SERVER>", "CML_PASSWORD": "<PASSWORD_ON_CML_SERVER>", "PYATS_USERNAME": "<DEVICE_USERNAME>", "PYATS_PASSWORD": "<DEVICE_PASSWORD>", "PYATS_AUTH_PASS": "<DEVICE_ENABLE_PASSWORD>" } } } }
The additional PYATS environment variables are needed to let the MCP server know how to login to those running devices.
Windows users that want CLI command support and are using Windows Subsystem for Linux (WSL) should configure:
{ "mcpServers": { "Cisco Modeling Labs (CML)": { "command": "wsl", "args": [ "uvx", "cml-mcp[pyats]" ], "env": { "CML_URL": "<URL_OF_CML_SERVER>", "CML_USERNAME": "<USERNAME_ON_CML_SERVER>", "CML_PASSWORD": "<PASSWORD_ON_CML_SERVER>", "PYATS_USERNAME": "<DEVICE_USERNAME>", "PYATS_PASSWORD": "<DEVICE_PASSWORD>", "PYATS_AUTH_PASS": "<DEVICE_ENABLE_PASSWORD>", "WSLENV": "CML_URL/u:CML_USERNAME/u:CML_PASSWORD/u:PYATS_USERNAME/u:PYATS_PASSWORD/u:PYATS_AUTH_PASS/u:PYATS_AUTH_PASS/u" } } } }
Windows (and really Mac and Linux users, too) that want CLI command support and are using Docker should configure:
{ "mcpServers": { "Cisco Modeling Labs (CML)": { "command": "docker", "args": [ "run", "-i", "--rm", "--pull", "always", "-e", "CML_URL", "-e", "CML_USERNAME", "-e", "CML_PASSWORD", "-e", "PYATS_USERNAME", "-e", "PYATS_PASSWORD", "-e", "PYATS_AUTH_PASS", "xorrkaz/cml-mcp:latest" ], "env": { "CML_URL": "<URL_OF_CML_SERVER>", "CML_USERNAME": "<USERNAME_ON_CML_SERVER>", "CML_PASSWORD": "<PASSWORD_ON_CML_SERVER>", "PYATS_USERNAME": "<DEVICE_USERNAME>", "PYATS_PASSWORD": "<DEVICE_PASSWORD>", "PYATS_AUTH_PASS": "<DEVICE_ENABLE_PASSWORD>" } } } }
An alternative is to use FastMCP CLI to install the server into your favorite client. FastMCP CLI supports Claude Desktop, Claude Code, Cursor, and manual JSON generation. To use FastMCP, do the following:
Clone this repository:
git clone https://github.com/xorrkaz/cml-mcp.git
Change directory to the cloned repository.
Run uv sync to install all the correct dependencies, including FastMCP 2.0.  Note: on Linux and Mac, run uv sync --all-extras to get CLI command support.
Create a .env file with the following variables set:
CML_URL=<URL_OF_CML_SERVER> CML_USERNAME=<USERNAME_ON_CML_SERVER> CML_PASSWORD=<PASSWORD_ON_CML_SERVER> # Optional in order to run commands PYATS_USERNAME=<DEVICE_USERNAME> PYATS_PASSWORD=<DEVICE_PASSWORD> PYATS_AUTH_PASS=<DEVICE_ENABLE_PASSWORD>
Run the FastMCP CLI command to install the server. For example:
fastmcp install claude-desktop src/cml_mcp/server.py:server_mcp --project `realpath .` --env-file .env
The tools should show up automatically in your MCP client, and you can chat with the LLM to get it to invoke tools as needed. For example, the following sequence of prompts nicely shows off some of the server's capabilities:
And here is an obligatory demo GIF to show it working in Claude Desktop:

If your LLM tool supports a system prompt, or you want to provide some richer initial context, here's a good example courtesy of Hank Preston:
You are a network lab assistant specializing in supporting Cisco Modeling Labs (CML). You provide a natural language interface for many common lab activities such as:
- Creating new lab
 - Adding nodes to a lab
 - Creating interfaces between nodes
 - Configuring nodes
 - Creating annotations
 You have access to tools to access the CML server.
The MCP server portion of this project is licensed under the BSD 2-Clause "Simplified" License. However, it leverages the pydantic schema typing code from CML itself, which is covered under a proprietary Cisco license.