gns3-lab-mcp
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
gns3-lab-mcp
An MCP server that lets an AI agent build real network labs in
GNS3: create a project, add routers, switches, and
hosts from the templates your GNS3 server already has, cable their ports
together, start them, and hand back a Mermaid diagram of the result. It wraps
the GNS3 controller's REST API through
gns3fy, turns every response into
clean JSON (or a friendly Error: ... string), and ships an
agent skill that teaches the complete lab-design workflow.
The distribution is named gns3-lab-mcp on PyPI (not yet published —
install from source below); the import package is gns3_mcp.
Demo: GIF placeholder — an agent creating the two-router OSPF lab from SKILL.md, then rendering the diagram below.
graph TD
n0["R1"]
n1["R2"]
n0 --- n1Requirements
GNS3 2.2 or newer, with its controller reachable over HTTP (default
http://localhost:3080).GNS3_BASE_URLmay include or omit a trailing/v2.Node templates with their images installed on that controller — the server can list and add nodes, but it cannot install images.
No local Python install is needed:
uvxfetches and runs the package.
Related MCP server: GNS3 MCP Server
Install
uvx gns3-lab-mcpThe console script starts the MCP server on stdio. Point it at a GNS3 controller other than the default with:
GNS3_BASE_URL=http://192.168.1.10:3080 uvx gns3-lab-mcpClient configuration
OpenCode
Add this to opencode.json (project or global):
{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"gns3": {
"type": "local",
"command": ["uvx", "gns3-lab-mcp"],
"enabled": true,
"environment": {
"GNS3_BASE_URL": "http://localhost:3080"
}
}
}
}Claude Code
Add this to .mcp.json in the project root, or use claude mcp add:
{
"mcpServers": {
"gns3": {
"command": "uvx",
"args": ["gns3-lab-mcp"],
"env": {
"GNS3_BASE_URL": "http://localhost:3080"
}
}
}
}Tools
Every tool returns text. Mutating tools return the created or changed object as
indented JSON; failures come back as a string starting with Error: rather
than raising.
Error handling is deliberately split: failures to reach the controller say
cannot reach GNS3 server at <url> (with the is gns3server running? hint on
gns3_version), a request that hangs for 30 seconds says timed out contacting GNS3 server at <url>, and a controller that answers with an HTTP error returns
GNS3's own message — for example node name already used in this project,
without the status-code prefix gns3fy adds.
Tool | Arguments | Returns |
| — |
|
| — | GNS3 server version information |
| — | JSON list of |
|
| JSON |
|
| JSON |
| — | JSON list of |
|
| JSON list of |
|
| JSON node |
|
| JSON |
|
| JSON |
|
| JSON link |
|
| JSON list of |
|
| Mermaid |
Notes:
add_nodehas no position arguments: nodes are created at canvas position(0, 0)and overlap until moved in the GNS3 GUI.draw_topologyis unaffected — it draws from nodes and links, not coordinates.Link ports are zero-based (
adapter_a=0, port_a=0is the first port on the first adapter). GNS3 rejects a port that is already in use.The server does not configure devices, open consoles, delete objects, or take snapshots.
Agent skill
SKILL.md is an Agent-Skills-standard skill named
gns3-lab-designer. It covers template discovery, the build workflow, naming
conventions (R1, R2, SW1), a worked two-router OSPF example, and
troubleshooting. Install it by copying it into your agent's skills directory,
for example:
mkdir -p ~/.claude/skills/gns3-lab-designer
cp SKILL.md ~/.claude/skills/gns3-lab-designer/SKILL.mdDevelopment
uv sync
uv run pytest tests/ -vLicense
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
AI network lab: build and validate real multi-vendor router and switch labs from a prompt.
Provides capabilities that let LLM agents perform a range of infrastructure management tasks.
Create and manage Mermaid.js flowcharts and diagrams with AI agents via MCP.
Remote MCP for RunComfy: ComfyUI deployments, hosted models, LoRA training. 31 tools.
Related MCP Servers
- AlicenseBqualityDmaintenanceEnables AI-powered network engineering by providing natural language control over GNS3 network simulations. Supports creating projects, building network topologies, managing devices, controlling simulations, and analyzing network traffic through conversational AI interactions.4228MIT
- AlicenseAqualityBmaintenanceEnables control of GNS3 network lab automation, including projects, nodes, consoles, and SSH, through Claude Desktop or any MCP-compatible client.15426 PyPI17MIT
- AlicenseCqualityCmaintenanceEnables AI agents to control GNS3 network emulation labs. Supports building topologies, managing devices, capturing packets, and automating device CLIs.1002MIT
- AlicenseAqualityCmaintenanceEnables automating GNS3 network labs via the Model Context Protocol, including managing projects, nodes, links, virtual machines, and console commands from ChatGPT.152MIT