cml2-mcp
Provides tools to interact with Cisco CML2 (Cisco Modeling Labs) API, enabling network simulation management via generic REST calls.
Click on "Deploy 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., "@cml2-mcp Read the OpenAPI spec and list all labs."
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.
cml2-mcp
Thin MCP server for Cisco CML2.
It deliberately avoids mirroring the CML API as typed (Pydantic) tools — every prior generation that did so broke when the controller shipped a schema change. Instead this server exposes only:
cml_openapi(refresh=False)— fetch CML's liveopenapi.json(cached 24 h).cml_api(method, path, body=None)— generic authenticated REST call after/api/v0. Re-authenticates and retries once on HTTP 401.Resource
cml://openapi.json— same content ascml_openapi().
The model is expected to read the OpenAPI spec first and then craft calls.
Configuration
Required environment:
Var | Example |
|
|
|
|
|
|
Optional:
CML_VERIFY_SSL=true— verify TLS (default: off; CML often uses self-signed certs).CML_CACHE_DIR— token / openapi cache directory (default:~/.cache/cml/).
The token is written to $CML_CACHE_DIR/token with mode 0600.
Related MCP server: specrun
Running
With uv directly from the source tree:
uv run cml2-mcpAfter publishing to PyPI (or via uv tool install .):
uvx cml2-mcpClaude Desktop / Claude Code registration
Wrap the command so the password is fetched from a secure store rather than appearing in plain text. Example with macOS Keychain:
{
"mcpServers": {
"cml2": {
"command": "sh",
"args": [
"-c",
"CML_PASSWORD=$(security find-generic-password -a <account> -s <service> -w) exec uvx cml2-mcp"
],
"env": {
"CML_URL": "https://cml.example.net/",
"CML_USERNAME": "admin"
}
}
}
}For Claude Code:
claude mcp add cml2 -- sh -c 'CML_PASSWORD=$(security find-generic-password -a <account> -s <service> -w) exec uvx cml2-mcp'(Set CML_URL / CML_USERNAME in the same env or via claude mcp add ... -e KEY=VAL.)
Available Tools
2 toolscml_apiA
Authenticated CML2 REST call.
Args: method: HTTP method (GET/POST/PUT/PATCH/DELETE). path: Path AFTER /api/v0, must start with '/'. Example: '/labs'. body: Optional JSON-serializable value (object/array/string/etc.). Sent as the request body with Content-Type: application/json.
Returns the raw response body as text (callers should json.parse if needed). Re-authenticates and retries once on HTTP 401. Raises on non-2xx.
Inputs: method (required), path (required), body. Returns: result
cml_openapiA
Return CML2's live OpenAPI spec as a JSON string.
Cached at $CML_CACHE_DIR/openapi.json (default ~/.cache/cml/) for 24h. Set refresh=True to force a re-fetch.
Inputs: refresh. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 2 tools
The two tools have clearly distinct purposes: cml_api makes arbitrary REST calls to the CML2 API, while cml_openapi fetches the OpenAPI specification. There is no overlap in functionality.
Both tools use the consistent prefix 'cml_' followed by a descriptive snake_case name ('api' and 'openapi'), following a clear pattern.
With only two tools, the server is extremely minimal for what appears to be a full API wrapper. Most use cases would require the user to manually parse the OpenAPI spec and craft REST calls, making the tool set feel incomplete.
The server provides only a low-level API call tool and a spec fetcher, lacking any higher-level operations (e.g., CRUD for labs, devices, etc.). Users must implement all logic themselves, which is a significant gap for a CML2 integration.
Maintenance
Related MCP Connectors
An MCP server that provides an API to LLMs to manage their JumpCloud resources.
MCP server for AI access to Swagger by SmartBear.
Model Context Protocol server for the Apideck Unified API. Connect any MCP-compatible agent framework to 100+ accounting systems, HRIS platforms, file storage providers, and more through one integration. More information https://www.apideck.com/mcp-server
MCP server providing access to the Scorecard API to evaluate and optimize LLM systems.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceA MCP server that exposes OpenAPI schema information to LLMs like Claude. This server allows an LLM to explore and understand large OpenAPI schemas through a set of specialized tools, without needing to load the whole schema into the context308 npm50MIT
- AlicenseCqualityDmaintenanceMCP server that turns OpenAPI specs into tools and calls API16 npm5MIT
- AlicenseNot gradedqualityDmaintenanceMCP server that wraps any REST API with an OpenAPI spec, dynamically creating MCP tools at runtime without code generation.6 npmMIT
- AlicenseNot gradedqualityDmaintenanceRuntime MCP server that dynamically bridges any OpenAPI 3.x spec to MCP tools.9 npmMIT