Get the FREE Ultimate OpenClaw Setup Guide →

cloudstack

Apache CloudStack Local MCP Server

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio phantosmax-cloudstack-mcp-server node /path/to/cloudstack-mcp-server/build/index.js \
  --env CLOUDSTACK_API_KEY="your-api-key" \
  --env CLOUDSTACK_API_URL="https://your-cloudstack-server/client/api" \
  --env CLOUDSTACK_TIMEOUT="30000" \
  --env CLOUDSTACK_SECRET_KEY="your-secret-key"

How to use

This CloudStack MCP Server provides a high-performance TypeScript-based interface to manage CloudStack infrastructure via the MCP protocol. It exposes a set of tools to perform VM lifecycle operations, infrastructure discovery, and common CloudStack tasks, all accessible through MCP-compatible clients and the built-in CLI. You can integrate AI assistants or automation pipelines by issuing MCP commands that map to actions like deploying VMs, listing templates, or starting and stopping instances. The included CLI lets you interact directly with CloudStack from the command line for ad-hoc management and testing.

To use it, configure your MCP client to point at the server (or run the server locally and connect through MCP). The server ships with tools for Virtual Machine management, VM scaling, storage, networking, monitoring, and many administrative actions. For example, you can deploy a VM, query VM details, retrieve zone and template lists, or manage volumes. The MCP interface enables structured, variant-rich requests with clearly defined parameters, making it straightforward to script and automate CloudStack tasks while preserving type safety through the TypeScript implementation.

How to install

Prerequisites:

  • Node.js and npm installed on your system
  • Access to a CloudStack deployment and valid API credentials
  1. Clone the repository and install dependencies:
git clone <repository-url>
cd cloudstack-mcp-server
npm install
  1. Configure environment variables: Create a .env file in the project root (or set environment variables in your deployment environment):
CLOUDSTACK_API_URL=https://your-cloudstack-server/client/api
CLOUDSTACK_API_KEY=your-api-key
CLOUDSTACK_SECRET_KEY=your-secret-key
CLOUDSTACK_TIMEOUT=30000
  1. Build the project (if required by the project setup):
npm run build
  1. Run the server (development or production modes):
# Development mode (MCP server)
npm run dev

# Production mode (MCP server)
npm start

# CLI mode (optional)
npm run cli -- --help
  1. If integrating with an MCP client, point the client to the server and provide the necessary environment variables for CloudStack access (as shown in the mcp_config example).

Additional notes

Tips and common issues:

  • Ensure CLOUDSTACK_API_URL is reachable from the server host and that API credentials have appropriate permissions.
  • The MCP server may require TLS/SSL termination or proxy settings in certain environments; configure NODE_TLS_REJECT_UNAUTHORIZED accordingly if using self-signed certs (not recommended for production).
  • If you update environment variables, restart the server to apply changes.
  • When using the MCP client configuration, you can embed credentials in the env field to keep secrets out of code.
  • Review the available tools in the README (VM management, storage, networking, monitoring, and admin tools) to plan your automation workflows.
  • For CLI usage, the cloudstack-cli binary provides quick access to common commands; use cloudstack-cli --help to discover all available commands.

Related MCP Servers

Sponsor this space

Reach thousands of developers