cml-mcp-server
MCP server for Cisco Modeling Labs (CML) that enables building, managing, and running network labs through MCP tools, wrapping the CML Python SDK for lab/topology CRUD, node/link management, and configuration.
README
cml-mcp-server
An MCP (Model Context Protocol) server for Cisco Modeling Labs (CML) v2.10.
It wraps Cisco's official virl2_client Python SDK to expose lab/topology
CRUD, node/link management, node configuration, and a catalog of ready-made
example network architectures as MCP tools - so an MCP client (Claude Code,
Claude Desktop, etc.) can build and run network labs for testing designs and
configs.
Setup
cd cml-mcp-server
python3 -m venv .venv
source .venv/bin/activate
pip install -e .
cp cml-config.example.toml cml-config.toml # then fill in host / username / password
chmod 600 cml-config.toml
Credentials: config file vs. env vars
Connection settings can come from either a TOML config file or environment variables; env vars win if both are present. The config file is the recommended approach since it keeps credentials out of shell history and process-list-visible env, and out of MCP client config JSON.
cml-config.toml (project root) - searched first - or
~/.config/cml-mcp-server/config.toml, or an explicit path via
CML_CONFIG_PATH:
[cml]
host = "cml.example.com"
username = "api-user"
password = "change-me"
# verify_ssl = false
Equivalent env vars: CML_HOST, CML_USERNAME, CML_PASSWORD,
CML_VERIFY_SSL. CML_VERIFY_SSL accepts true/false or a path to a CA
bundle; it defaults to false since most CML controllers run with a
self-signed certificate.
Running
source .venv/bin/activate
cml-mcp-server
This starts the server on stdio, ready to be attached to an MCP client.
Claude Code / Claude Desktop config
{
"mcpServers": {
"cisco-cml": {
"command": "/absolute/path/to/cml-mcp-server/.venv/bin/cml-mcp-server"
}
}
}
Or point at an explicit config file / use env vars instead:
{
"mcpServers": {
"cisco-cml": {
"command": "/absolute/path/to/cml-mcp-server/.venv/bin/cml-mcp-server",
"env": {
"CML_CONFIG_PATH": "/absolute/path/to/cml-config.toml"
}
}
}
}
Tools
Labs
list_labs,get_lab_topologycreate_lab,delete_labstart_lab,stop_lab,wipe_lab
Platform catalog
list_node_definitions- available platform types (iosv, iosvl2, csr1000v, nxosv, asav, alpine, unmanaged_switch, ...), depends on which reference images are imported into your CML controller
Nodes
add_node,remove_nodestart_node,stop_nodeget_node_config,set_node_config(day-0 startup config)extract_node_config(pull the running config off a booted node)get_node_console_log
Links
add_link,remove_link- by default connects the next free interface on each node; interface labels can be given explicitly
Bulk topology building
-
build_topology- create a whole lab (nodes + links + configs) in one call from a node/link spec -
list_example_topologies,get_example_topology,deploy_example_topology- a small catalog of ready-made architectures:two_router_ospf- single-area OSPF adjacencybgp_two_as_peering- eBGP between two ASesthree_tier_campus- core/distribution/access skeletonleaf_spine_datacenter- 2-spine/2-leaf full-mesh underlayfirewall_dmz- IOS zone-based firewall with inside/outside/DMZ zones
These templates default to
iosv/iosvl2(bundled with every CML install); swapnode_definitionper node for platform-specific images (e.g.nxosv,csr1000v,asav) if you have them.
Typical flow
list_node_definitions()- see what platforms are available.- Either:
list_example_topologies()→deploy_example_topology("two_router_ospf"), or- describe an architecture and let the assistant design a node/link spec,
then call
build_topology(...)directly.
start_lab(lab_id), thenget_lab_topology(lab_id)to check node state.get_node_console_log/extract_node_configto inspect a running node;set_node_config+wipe_lab+start_labto iterate on day-0 config.delete_lab(lab_id)when done - this is permanent.
Security notes
- This server can create, start, and delete labs and nodes on the target
CML controller. Scope the CML account to a dedicated user if you don't
want it operating with full admin rights, and treat
delete_lab,wipe_lab, andremove_nodeas destructive, unrecoverable actions. - Credentials are only ever read (from
cml-config.tomlor env vars); nothing is written to disk by this server. Keep the config file out of version control (it's in.gitignoreby default) and permissioned600. - Session/token handling (login, refresh, re-auth) is delegated entirely to
virl2_client.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。