Name | cml-mcp JSON |
Version |
0.8.1
JSON |
| download |
home_page | None |
Summary | Cisco Modeling Labs (CML) MCP Server |
upload_time | 2025-08-23 21:54:41 |
maintainer | None |
docs_url | None |
author | Joe Clarke |
requires_python | >=3.12 |
license | None |
keywords |
|
VCS |
 |
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# Model Context Protocol (MCP) Server for Cisco Modeling Labs (CML)
## Overview
`cml-mcp` is a server implementation of the [Model Context Protocol (MCP)](https://modelcontextprotocol.io/docs/getting-started/intro) designed
for [Cisco Modeling Labs (CML)](https://www.cisco.com/c/en/us/products/cloud-systems-management/modeling-labs/index.html). It is built using [FastMCP 2.0](https://gofastmcp.com/getting-started/welcome) and designed to provide a set of tools for LLM apps like Claude Desktop, Claude Code, and Cursor to interact with CML.
## Features
- **Create Lab Topologies:** Tool for create new labs and define network topologies.
- **Query Status:** Tools to retrieve status information for labs, nodes, and the CML server itself.
- **Control Labs and Nodes:** Tools to start and stop labs or individual nodes as needed.
- **Run Commands on Devices:** Using [PyATS](https://developer.cisco.com/pyats/), MCP clients can execute commands on virtual devices within CML labs.
## Requirements
- Python 3.12+
- Cisco Modeling Labs (CML) instance
- PyATS (for device command execution)
- The [uv](https://docs.astral.sh/uv/) Python package/project manager
## Getting Started
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. For that, you need to edit your client's config and add something like the following. This example is for Claude Desktop:
```json
{
"mcpServers": {
"Cisco Modeling Labs MCP Server": {
"command": "uvx",
"args": [
"cml-mcp"
],
"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 `PYATS` environment variables are optional but will be required if you want to run commands on the devices running within CML.
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:
1. Clone this repository:
```sh
git clone https://github.com/xorrkaz/cml-mcp.git
```
1. Change directory to the cloned repository.
1. Run `uv sync` to install all the correct dependencies, including FastMCP 2.0.
1. Create a `.env` file with the following variables set:
```sh
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>
```
1. Run the FastMCP CLI command to install the server. For example:
```sh
fastmcp install claude-desktop src/cml_mcp/server.py:server_mcp --project `realpath .` --env-file .env
```
## Usage
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:
- Create a new CML lab called "Joe's MCP Lab".
- Add two IOL nodes, a unmanaged switch, and an external connector to this lab.
- Connect the two IOL nodes to the unmanaged switch and the unmanaged switch to the external connector.
- Configure the routers so that their connected interfaces have IPs in the 192.0.2.0/24 subnet. Configure OSPF on them. Then start the lab and validate OSPF is working correctly.
- Add a box annotation around the two IOL nodes that indicates they speak OSPF. Make it a green box.
And here is an obligatory demo GIF to show it working in Claude Desktop:

### System Prompt
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.
## License
The MCP server portion of this project is licensed under the [BSD 2-Clause "Simplified" License](LICENSE). However, it leverages the pydantic
schema typing code from CML itself, which is covered under a [proprietary Cisco license](src/cml_mcp/schemas/LICENSE).
Raw data
{
"_id": null,
"home_page": null,
"name": "cml-mcp",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.12",
"maintainer_email": null,
"keywords": null,
"author": "Joe Clarke",
"author_email": "Joe Clarke <jclarke@cisco.com>",
"download_url": "https://files.pythonhosted.org/packages/01/ef/7843a35c39678f0bf966131e00cb870cc1c71c54d9a250735c49e3cc2a04/cml_mcp-0.8.1.tar.gz",
"platform": null,
"description": "# Model Context Protocol (MCP) Server for Cisco Modeling Labs (CML)\n\n## Overview\n\n`cml-mcp` is a server implementation of the [Model Context Protocol (MCP)](https://modelcontextprotocol.io/docs/getting-started/intro) designed\nfor [Cisco Modeling Labs (CML)](https://www.cisco.com/c/en/us/products/cloud-systems-management/modeling-labs/index.html). It is built using [FastMCP 2.0](https://gofastmcp.com/getting-started/welcome) and designed to provide a set of tools for LLM apps like Claude Desktop, Claude Code, and Cursor to interact with CML.\n\n## Features\n\n- **Create Lab Topologies:** Tool for create new labs and define network topologies.\n- **Query Status:** Tools to retrieve status information for labs, nodes, and the CML server itself.\n- **Control Labs and Nodes:** Tools to start and stop labs or individual nodes as needed.\n- **Run Commands on Devices:** Using [PyATS](https://developer.cisco.com/pyats/), MCP clients can execute commands on virtual devices within CML labs.\n\n## Requirements\n\n- Python 3.12+\n- Cisco Modeling Labs (CML) instance\n- PyATS (for device command execution)\n- The [uv](https://docs.astral.sh/uv/) Python package/project manager\n\n## Getting Started\n\nYou 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. For that, you need to edit your client's config and add something like the following. This example is for Claude Desktop:\n\n```json\n{\n \"mcpServers\": {\n \"Cisco Modeling Labs MCP Server\": {\n \"command\": \"uvx\",\n \"args\": [\n \"cml-mcp\"\n ],\n \"env\": {\n \"CML_URL\": \"<URL_OF_CML_SERVER>\",\n \"CML_USERNAME\": \"<USERNAME_ON_CML_SERVER>\",\n \"CML_PASSWORD\": \"<PASSWORD_ON_CML_SERVER>\",\n \"PYATS_USERNAME\": \"<DEVICE_USERNAME>\",\n \"PYATS_PASSWORD\": \"<DEVICE_PASSWORD>\",\n \"PYATS_AUTH_PASS\": \"<DEVICE_ENABLE_PASSWORD>\"\n }\n }\n }\n}\n```\n\nThe `PYATS` environment variables are optional but will be required if you want to run commands on the devices running within CML.\n\nAn 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:\n\n1. Clone this repository:\n\n ```sh\n git clone https://github.com/xorrkaz/cml-mcp.git\n ```\n\n1. Change directory to the cloned repository.\n\n1. Run `uv sync` to install all the correct dependencies, including FastMCP 2.0.\n\n1. Create a `.env` file with the following variables set:\n\n ```sh\n CML_URL=<URL_OF_CML_SERVER>\n CML_USERNAME=<USERNAME_ON_CML_SERVER>\n CML_PASSWORD=<PASSWORD_ON_CML_SERVER>\n # Optional in order to run commands\n PYATS_USERNAME=<DEVICE_USERNAME>\n PYATS_PASSWORD=<DEVICE_PASSWORD>\n PYATS_AUTH_PASS=<DEVICE_ENABLE_PASSWORD>\n ```\n\n1. Run the FastMCP CLI command to install the server. For example:\n\n ```sh\n fastmcp install claude-desktop src/cml_mcp/server.py:server_mcp --project `realpath .` --env-file .env\n ```\n\n## Usage\n\nThe 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,\nthe following sequence of prompts nicely shows off some of the server's capabilities:\n\n- Create a new CML lab called \"Joe's MCP Lab\".\n- Add two IOL nodes, a unmanaged switch, and an external connector to this lab.\n- Connect the two IOL nodes to the unmanaged switch and the unmanaged switch to the external connector.\n- Configure the routers so that their connected interfaces have IPs in the 192.0.2.0/24 subnet. Configure OSPF on them. Then start the lab and validate OSPF is working correctly.\n- Add a box annotation around the two IOL nodes that indicates they speak OSPF. Make it a green box.\n\nAnd here is an obligatory demo GIF to show it working in Claude Desktop:\n\n\n\n### System Prompt\n\nIf 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:\n\n>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:\n>\n>- Creating new lab\n>- Adding nodes to a lab\n>- Creating interfaces between nodes\n>- Configuring nodes\n>- Creating annotations\n>\n>You have access to tools to access the CML server.\n\n## License\n\nThe MCP server portion of this project is licensed under the [BSD 2-Clause \"Simplified\" License](LICENSE). However, it leverages the pydantic\nschema typing code from CML itself, which is covered under a [proprietary Cisco license](src/cml_mcp/schemas/LICENSE).\n",
"bugtrack_url": null,
"license": null,
"summary": "Cisco Modeling Labs (CML) MCP Server",
"version": "0.8.1",
"project_urls": {
"Homepage": "https://github.com/xorrkaz/cml-mcp",
"Issues": "https://github.com/xorrkaz/cml-mcp/issues"
},
"split_keywords": [],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "fe9527d0e00ef7fd7b2e095c867ff2f6b7e0d9cdd0553312d39d59f081c175ef",
"md5": "ff9f145a055ace6faa7b9c7b5f68a7e3",
"sha256": "1d3c4a84649f514c8b8b974d5875e43a33bb776de018129d9756679a0a355e2f"
},
"downloads": -1,
"filename": "cml_mcp-0.8.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "ff9f145a055ace6faa7b9c7b5f68a7e3",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.12",
"size": 68333,
"upload_time": "2025-08-23T21:54:40",
"upload_time_iso_8601": "2025-08-23T21:54:40.404542Z",
"url": "https://files.pythonhosted.org/packages/fe/95/27d0e00ef7fd7b2e095c867ff2f6b7e0d9cdd0553312d39d59f081c175ef/cml_mcp-0.8.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "01ef7843a35c39678f0bf966131e00cb870cc1c71c54d9a250735c49e3cc2a04",
"md5": "cf22c428d2d012b2da0288263961aca5",
"sha256": "60974d4da3da1512a8c99c2e495b29a13cb5f384182c73424a422930f7b2e617"
},
"downloads": -1,
"filename": "cml_mcp-0.8.1.tar.gz",
"has_sig": false,
"md5_digest": "cf22c428d2d012b2da0288263961aca5",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.12",
"size": 45912,
"upload_time": "2025-08-23T21:54:41",
"upload_time_iso_8601": "2025-08-23T21:54:41.680081Z",
"url": "https://files.pythonhosted.org/packages/01/ef/7843a35c39678f0bf966131e00cb870cc1c71c54d9a250735c49e3cc2a04/cml_mcp-0.8.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-08-23 21:54:41",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "xorrkaz",
"github_project": "cml-mcp",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "cml-mcp"
}