CloudStack MCP について
CloudStack MCPは、AIエージェントからApache CloudStackのインフラを操作するための概念実証MCPサーバーです。開発中で、機能は未完成です。
主な機能
- 01MCPリクエストをCloudStack API呼び出しに変換
- 02VMのデプロイと管理に対応
- 03認証とAPI操作を処理
活用シーン
- 01エージェント経由でCloudStackのVPCを一覧
- 02CloudStack仮想マシンの管理
MCP 対応
MCPリクエストをCloudStack API呼び出しに変換し、SSEまたはstdio経由でMCPクライアントに接続できます。
設定
リモートサーバーはインストール不要です。クライアントを選んで設定をコピーするか、ワンクリックで導入できます。
エンドポイント
http://localhost:8250/sseインストールコマンドをコピー
Claude CodeTerminal
claude mcp add --transport http cloudstack http://localhost:8250/sseCursor.cursor/mcp.json
{"mcpServers":{"cloudstack":{"type":"http","url":"http://localhost:8250/sse"}}}Cursor で開くVS Code.vscode/mcp.json
{"servers":{"cloudstack":{"type":"http","url":"http://localhost:8250/sse"}}}VS Code で開くClaude Desktopclaude_desktop_config.json
{"mcpServers":{"cloudstack":{"type":"http","url":"http://localhost:8250/sse"}}}Windsurf~/.codeium/windsurf/mcp_config.json
{"mcpServers":{"cloudstack":{"serverUrl":"http://localhost:8250/sse"}}}コマンドはターミナルで実行し、JSON は各クライアントの MCP 設定に貼り付けて再起動します。認可が必要なサーバーは初回接続時にログインを求めます。
ツール
README(原文)English
プロジェクトの README よりこの README の日本語訳はまだありません。以下は英語の原文です。日本語の紹介はページ上部をご覧ください。
= CloudStack MCP
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.
== Running the server (macOS)
[source,bash]
----
# 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
----
== Generic MCP Usage
=== for `sse` servers (recommended, if possible)
* works with `Cursor`
[source,json]
----
{
"mcpServers": {
"cloudstack": {
"url": "http://localhost:8250/sse"
}
}
}
----
=== for `stdio` servers
* works with `Cursor`, and `Claude Desktop`
[source,json]
----
{
"mcpServers": {
"cloudstack": {
"command": "docker",
"args": ["compose", "-f", "<<LOCAL_PATH_TO_THIS_REPO>>/docker-compose.yaml", "run", "mcp-stdio-server"]
}
}
}
----
== Usage with Cursor (macOS)
1. make sure server is running and you are in the root of the project (see above)
2. set up dependencies
+
[source,bash]
----
brew install --cask cursor
----
3. open the project in Cursor
+
[source,bash]
----
cursor cloudstack-mcp.code-workspace
----
4. open cursor settings from the menu bar `Cursor -> Settings... -> Cursor Settings` (or press `Shift-Cmd-J`)
5. go to the `MCP` tab, you should see the `cloudstack` server already added (because of link:./.cursor/mcp.json[`./.cursor/mcp.json`])
6. click on the buttons to refresh and enable the `cloudstack` server - you should see a green dot and a list of `list` cloudstack api commands
7. open a new composer by making sure the composer pane is open (toggle with `Cmd-Option-B`) and start a new conversation (press `Cmd-N`)
8. make sure the composer is set to `Agent`
9. type `can you list my @cloudstack vpcs?`
10. press `Enter` and watch the magic happen! (realistically, you might have to try and convince the AI to do this, but it should work)
== Usage with Claude Desktop (macOS)
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.
1. make sure server is running and you are in the root of the project (see above)
2. set up dependencies
+
[source,bash]
----
brew install --cask claude-desktop
----
3. run this to setup the server in Claude Desktop
+
[source,bash]
----
# injects the server into claudes config, doesn't overwrite anything (unless you have another mcp called 'cloudstack')
task mcp:setup:claude-desktop
----
4. restart claude desktop
== How It Works
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 Usage
CloudMonkey (the CloudStack CLI) is containerized in this setup:
[source,bash]
----
# 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
----
== License
Apache License 2.0コメント
Markdown 対応
AI アプリケーションが外部のツールやデータソースに統一的な方法で接続するためのオープンなプロトコルです。クライアントはモデルとの対話を担い、MCP サーバーはツール・リソース・プロンプトテンプレートを提供します。標準メッセージでやり取りするため、1 つのサーバーを複数のクライアントで再利用できます。