home / mcp / cloudlab mcp server
MCP server for managing CloudLab/Emulab experiments
Configuration
View docs{
"mcpServers": {
"ardagurcan-cloudlab-mcp": {
"command": "node",
"args": [
"/path/to/cloudlab-mcp/dist/index.js"
],
"env": {
"CLOUDLAB_API_URL": "https://www.emulab.net:43794",
"CLOUDLAB_TOKEN_PATH": "${TOKEN_PATH}"
}
}
}
}You run a CloudLab MCP Server to manage your CloudLab experiments through an MCP client. It lets you create, list, inspect, and control experiments and their nodes from automated tools, enabling seamless AI-assisted experiment management.
Use an MCP client to connect to the CloudLab MCP Server and perform common operations like creating experiments from profiles, listing all experiments, getting detailed status, and performing node-level actions such as rebooting, reloading, or extending experiments. You interact with the server through the provided MCP command surface, which is exposed locally via a standard input/output (stdio) interface that you start from your environment or an automation tool that invokes the node process directly.
Prerequisites: you need Node.js 18 or later.
Step 1: Set up your project and install dependencies.
npm install
npm run buildStep 2: Start the MCP server locally to obtain the runtime executable you will connect to from your MCP client. The server is run as a Node.js process that executes a built distribution.
If you keep the default build output path, you can run the server with the following command.
node /path/to/cloudlab-mcp/dist/index.jsConfiguration relies on a CloudLab JWT token for API access. You can set the token path via an environment variable or place the token file in a known location.
Token management is essential for secure operation. The server looks for a CloudLab JWT token in a prioritized list of locations and avoids committing tokens to version control.
If you run into token-related issues, verify the token location and permissions. Ensure the token file is readable by the user running the MCP server and that the path is correctly exposed to the runtime environment.
The MCP server supports a variety of actions you can perform through the MCP client, such as creating experiments from profiles, listing experiments, and managing node states (reboot, reload, powercycle). Use your MCP client to invoke these actions against the CloudLab MCP Server.
Two environment variables are used to configure access and endpoints for CloudLab: CLOUDLAB_TOKEN_PATH for a custom token file path and CLOUDLAB_API_URL to override the API endpoint.
The server provides a set of capabilities you can invoke via the MCP client, including creating experiments, listing experiments, retrieving detailed experiment status, rebooting specific nodes or all nodes in an experiment, reloading or reimaging nodes, performing a hard powercycle, extending experiment time, and terminating experiments.
Create a new experiment from a profile.
List all your CloudLab experiments.
Get detailed status of an experiment.
Reboot a specific node in an experiment.
Reboot all nodes in an experiment.
Reload or reimage a node to its disk image.
Power cycle a node (hard reboot) for unresponsive nodes.
Extend the expiration time of an active experiment.
Terminate and clean up an experiment.