A Model Context Protocol (MCP) server for Apache CloudStack, allowing AI agents to interact with CloudStack infrastructure.
Important
|
This project is still under development and not all features are available. Treat it as a proof of concept. |
# Install the dependencies
brew install go-task go docker
# Install the CLI
git clone https://github.com/walteh/cloudstack-mcp.git
cd cloudstack-mcp
# Start the environment (will take a while)
task docker:start
-
works with
Cursor
{
"mcpServers": {
"cloudstack": {
"url": "http://localhost:8250/sse"
}
}
}
-
make sure server is running and you are in the root of the project (see above)
-
set up dependencies
brew install --cask cursor
-
open the project in Cursor
cursor cloudstack-mcp.code-workspace
-
open cursor settings from the menu bar
Cursor → Settings… → Cursor Settings
(or pressShift-Cmd-J
) -
go to the
MCP
tab, you should see thecloudstack
server already added (because of./.cursor/mcp.json
) -
click on the buttons to refresh and enable the
cloudstack
server - you should see a green dot and a list oflist
cloudstack api commands -
open a new composer by making sure the composer pane is open (toggle with
Cmd-Option-B
) and start a new conversation (pressCmd-N
) -
make sure the composer is set to
Agent
-
type
can you list my @cloudstack vpcs?
-
press
Enter
and watch the magic happen! (realistically, you might have to try and convince the AI to do this, but it should work)
Caution
|
There is a 99% chance this will not work, but you can use it as a starting point to get the MCP working with Claude Desktop if you like. |
-
make sure server is running and you are in the root of the project (see above)
-
set up dependencies
brew install --cask claude-desktop
-
run this to setup the server in Claude Desktop
# injects the server into claudes config, doesn't overwrite anything (unless you have another mcp called 'cloudstack') task mcp:setup:claude-desktop
-
restart claude desktop
This MCP implementation allows AI assistants to manage CloudStack resources by:
-
Translating MCP protocol requests into CloudStack API calls
-
Providing common operations like VM deployment and management
-
Handling authentication and API interaction automatically
CloudMonkey (the CloudStack CLI) is containerized in this setup:
# Basic commands
task cmk -- list zones
task cmk -- list serviceofferings
# Fix API cache issues if they occur
task cmk -- sync
# Get API credentials
task cloudstack:get-credentials