mcpField
C
Containerlab MCP Server

Containerlab MCP Server

Local
github.com/FloSch62Cloud & Infra13Updated 78w ago

About Containerlab MCP Server

Containerlab MCP Server connects an AI client to a running containerlab API for managing network labs. It supports lab listing, topology deployment, inspection, node commands, and cleanup.

Key features

  1. 01List available labs
  2. 02Deploy network topologies
  3. 03Inspect lab details
  4. 04Run commands on lab nodes
  5. 05Destroy and clean up labs

Use cases

  1. 01Listing labs through Claude
  2. 02Deploying a network topology
  3. 03Inspecting a lab or running node commands
  4. 04Removing labs after testing

MCP support

Exposes containerlab lab-management operations as MCP tools, allowing clients such as Claude Desktop to interact with the configured containerlab API server.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

No install method listed yet

We haven’t collected a package or remote endpoint for this server. Follow the instructions in the project README.

Repository

Tools

No tool list yet

Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.

Details

From the project README

Containerlab MCP Server

This is a quick and dirty MCP (Model Context Protocol) trial for interacting with containerlab using AI. The example is tailored for claude desktop.

  1. Running containerlab API server
  2. Latest build of containerlab from the main branch
    • Build it yourself: make build
    • Copy the binary: cp bin/containerlab $(which containerlab)

Building the MCP Server

For Windows
export GOOS=windows
export GOARCH=amd64
go build -o clab-mcp-server.exe main.go
For Mac
# For Intel Macs
export GOOS=darwin
export GOARCH=amd64
go build -o clab-mcp-server main.go

# For Apple Silicon (M1/M2/M3)
export GOOS=darwin
export GOARCH=arm64
go build -o clab-mcp-server main.go
For Linux
export GOOS=linux
export GOARCH=amd64
go build -o clab-mcp-server main.go

Setup for Claude Desktop

  1. Place the MCP server executable in an accessible location
    • For Windows: clab-mcp-server.exe
    • For Mac/Linux: clab-mcp-server
  2. Create a configuration file named claude_desktop_config.json with the following content:
# For Windows:
{
  "mcpServers": {
    "clab-api": {
      "command": "C:\\clab-mcp-server.exe",
      "args": [],
      "env": {
        "API_SERVER_URL": "http://localhost:8080"
      }
    }
  }
}

# For Mac/Linux:
{
  "mcpServers": {
    "clab-api": {
      "command": "/path/to/clab-mcp-server",
      "args": [],
      "env": {
        "API_SERVER_URL": "http://localhost:8080"
      }
    }
  }
}
  1. Ensure the containerlab API server is running at http://localhost:8080 or update the URL as needed

Usage

Once configured, Claude will be able to:

  • List available labs
  • Deploy new network topologies
  • Inspect lab details
  • Execute commands on lab nodes
  • Destroy and clean up labs

You can ask Claude to perform these operations using natural language, and it will use the appropriate MCP tools to interact with your containerlab environment.

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.