gns3-mcp
Enables AI agents to control GNS3 network emulation labs. Supports building topologies, managing devices, capturing packets, and automating device CLIs.
README
gns3-mcp
A full-feature MCP server for the GNS3 v3 (3.0) controller REST API. It lets an AI agent (Claude Code / Claude Desktop / any MCP client) drive a GNS3 network-emulation lab end-to-end: build topologies, manage device lifecycle, snapshot, capture packets, manage templates / computes / images / RBAC, and automate device CLIs over node consoles.
Built with Python + FastMCP. Ships as a Claude Code plugin and as a standalone pip-installable MCP server. ~125 tools, 4 resources, and 3 prompts.
Features
| Area | Tools |
|---|---|
| Controller | version, statistics, reload/shutdown, IOU license |
| Projects | CRUD, open/close/load, duplicate, export/import, lock, files |
| Nodes | CRUD, create-from-template, start/stop/suspend/reload (single + all), isolate, duplicate, idle-PC, disk/files |
| Links | CRUD, filters, reset |
| Console automation | node_console_send, node_console_session, node_console_read, node_console_info (telnet) |
| Packet capture | start/stop, Wireshark restart, pcap download |
| Snapshots | list / create / restore / delete |
| Drawings | canvas annotations CRUD |
| Templates / Appliances | CRUD + duplicate; browse & install appliance catalog |
| Computes / Images | manage compute servers, query emulators; upload/install/prune images |
| RBAC | users, groups, roles, privileges, ACL |
| Resource pools | CRUD + membership |
| Resources | gns3://projects, gns3://templates, gns3://computes, gns3://project/{id}/topology |
| Prompts | build_lab, troubleshoot_node, snapshot_before_change |
Configuration
All settings come from the environment (prefix GNS3_):
| Variable | Default | Purpose |
|---|---|---|
GNS3_BASE_URL |
http://localhost:3080 |
Controller URL (no /v3) |
GNS3_USERNAME / GNS3_PASSWORD |
– | Login credentials |
GNS3_TOKEN |
– | Pre-issued bearer token (skips login) |
GNS3_VERIFY_TLS |
true |
Verify TLS for https |
GNS3_DEFAULT_PROJECT |
– | Project id used when a tool omits project_id |
GNS3_READ_ONLY |
false |
Disable all mutating tools (41 read-only tools remain) |
GNS3_TRANSPORT |
stdio |
stdio or http |
GNS3_HTTP_HOST / GNS3_HTTP_PORT |
127.0.0.1 / 8080 |
HTTP bind |
GNS3_CONSOLE_TIMEOUT |
15 |
Console read timeout (s) |
Install
As a Claude Code plugin
/plugin marketplace add /home/oscar/Code/gns3-mcp
/plugin install gns3
The plugin declares the MCP server in plugin/.mcp.json; it runs the gns3-mcp console
script, so install the package first (below) or adjust the command to python -m gns3_mcp.
As a standalone MCP server
pip install -e . # from this repo (or, once published: pipx install gns3-mcp-server)
The PyPI distribution is named gns3-mcp-server; it installs the gns3-mcp
console script (and a gns3-mcp-server alias, so uvx gns3-mcp-server works too).
Register with Claude Code:
claude mcp add gns3 -- gns3-mcp
# then set env: GNS3_BASE_URL, GNS3_USERNAME, GNS3_PASSWORD
Or in Claude Desktop config:
{
"mcpServers": {
"gns3": {
"command": "gns3-mcp",
"env": {
"GNS3_BASE_URL": "http://localhost:3080",
"GNS3_USERNAME": "admin",
"GNS3_PASSWORD": "your-password"
}
}
}
}
Run as a remote HTTP server instead:
GNS3_TRANSPORT=http GNS3_HTTP_PORT=8080 gns3-mcp
Safety
GNS3_READ_ONLY=trueregisters only read-only tools.- Destructive tools (
project_delete,node_deletevia flow,controller_shutdown,controller_reload,images_prune) require an explicitconfirm=true. - Console automation can run arbitrary commands on emulated devices — treat it like shell access to your lab.
Development
pip install -e ".[dev]"
python -m pytest # hermetic unit + tool + console tests (respx-mocked)
# Opt-in live smoke test against a real controller:
GNS3_LIVE=1 GNS3_BASE_URL=http://localhost:3080 \
GNS3_USERNAME=admin GNS3_PASSWORD=... python -m pytest tests/test_live_smoke.py -s
Architecture: a single async GNS3Client (client.py) handles login, 401 re-auth,
pagination, and binary I/O; every tool module under tools/ is a thin layer over it and
exposes register(mcp). console.py is a minimal telnet proxy for driving node consoles.
Contributing & releases
Commits follow Conventional Commits (feat:,
fix:, feat!: for breaking changes), which drives automated versioning.
release-please opens a release PR that
bumps the version and updates CHANGELOG.md; merging it tags a release and
publishes to PyPI via Trusted Publishing (after the test suite passes). Full details in
CONTRIBUTING.md.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
mcp-server-qdrant
这个仓库展示了如何为向量搜索引擎 Qdrant 创建一个 MCP (Managed Control Plane) 服务器的示例。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器