clab
MCP server from FloSch62/clab-mcp-server
claude mcp add --transport stdio flosch62-clab-mcp-server ./clab-mcp-server \ --env API_SERVER_URL="http://localhost:8080"
How to use
This MCP server (clab) provides a gateway for Claude to interact with containerlab via an MCP protocol server. It is designed to work with a running containerlab API server and a local containerlab binary. With this server, Claude can list available labs, deploy new network topologies, inspect lab details, execute commands on lab nodes, and destroy labs when finished. The API URL is typically set to http://localhost:8080 for the containerlab API server, and the MCP server itself serves as the bridge between Claude’s requests and containerlab actions.
How to install
Prerequisites:
- Go toolchain installed to build the MCP server (as described in the project’s build instructions).
- containerlab installed and its API server available if you plan to interact with containerlab environments.
- A suitable target platform (Windows, macOS, or Linux) with a compatible Go build environment.
Build from source (examples shown assume you’re in the project directory):
- For Windows:
- set GOOS=windows
- set GOARCH=amd64
- go build -o clab-mcp-server.exe main.go
- For Mac (Intel):
- set GOOS=darwin
- set GOARCH=amd64
- go build -o clab-mcp-server main.go For Apple Silicon (M1/M2/M3):
- set GOOS=darwin
- set GOARCH=arm64
- go build -o clab-mcp-server main.go
- For Linux:
- set GOOS=linux
- set GOARCH=amd64
- go build -o clab-mcp-server main.go
Run the server (example):
- ./clab-mcp-server
Configuration (example from Claude Desktop setup):
- Create a file claude_desktop_config.json with an mcpServers entry pointing to the built binary and the API server URL, e.g.: { "mcpServers": { "clab-api": { "command": "/path/to/clab-mcp-server", "args": [], "env": { "API_SERVER_URL": "http://localhost:8080" } } } }
Additional notes
Notes and tips:
- Ensure the containerlab API server is running and reachable at the configured API_SERVER_URL (default http://localhost:8080).
- Make sure the MCP server binary has executable permissions on Unix-based systems (chmod +x clab-mcp-server).
- If you modify the API server URL, update the environment variable API_SERVER_URL in your MCP config accordingly.
- The MCP server is designed to work with Claude Desktop; adjust paths to your built binary as needed.
- If you encounter connectivity issues, verify that the containerlab API server is up and that network routes allow Claude to reach it.
Related MCP Servers
trpc-agent-go
trpc-agent-go is a powerful Go framework for building intelligent agent systems using large language models (LLMs) and tools.
station
Station is our open-source runtime that lets teams deploy agents on their own infrastructure with full control.
tiger-cli
Tiger CLI is the command-line interface for Tiger Cloud. It includes an MCP server for helping coding agents write production-level Postgres code.
gopls
MCP server for golang projects development: Expand AI Code Agent ability boundary to have a semantic understanding and determinisic information for golang projects.
kubernetes
A Model Context Protocol (MCP) server for the Kubernetes API.
gcp-cost
💰 An MCP server that enables AI assistants to estimate Google Cloud costs, powered by Cloud Billing Catalog API and built with Genkit for Go