openstack
A lightweight and extensible service that enables AI assistants to securely execute OpenStack CLI commands via the Model Context Protocol (MCP)
claude mcp add --transport stdio dragomiralin-openstack-mcp-server java -jar <path_to_your_jar>/openstack-mcp-server-0.0.1.jar --port 8080 --host localhost \ --env JAVA_HOME="path to Java 21 installation (optional if JAVA_HOME is set in your environment)" \ --env OPENSTACK_CONFIG="path to your OpenStack configuration if needed"
How to use
This OpenStack MCP Server exposes a controlled interface for AI assistants to securely execute OpenStack CLI commands via the Model Context Protocol (MCP). It is designed to integrate with Claude Desktop, enabling you to manage OpenStack resources directly from your AI prompts. The server relies on a Java-based Spring Boot application that uses the OpenStack CLI under the hood, with credentials configured in application.yml to authenticate and authorize actions against your OpenStack deployment. With MCP enabled, you can guide the AI to list, create, or modify resources by issuing MCP-enabled commands that map to OpenStack CLI invocations, while keeping credentials and sensitive operations sandboxed within the server.
To use the server, start it (for example via the Claude Desktop integration or by running the packaged JAR with the provided port/host). The server will expose its OpenStack CLI wrapper over HTTP, and Claude Desktop will be configured to route relevant prompts through this MCP endpoint. Typical interactions include listing tenants, networks, images, flavors, servers, and performing lifecycle actions like boot, stop, or delete, all mediated by the MCP layer to ensure consistent context handling and security boundaries.
How to install
Prerequisites:
- Java 21
- Maven 3.8+
- OpenStack CLI installed on your machine
- Clone the repository and navigate to its directory.
- Build the application: mvn clean package
- Prepare configuration:
- Edit application.yml in the project (or the packaged JAR's configuration location) to provide your OpenStack credentials, including: openstack: authType: v3applicationcredential authUrl: <your_auth_url> regionName: <your_region_name> interface: public applicationCredentialId: "<your_application_credential_id>" applicationCredentialSecret: "<your_application_credential_secret>"
- Run the packaged JAR (as required by your Claude Desktop integration or local testing): java -jar openstack-mcp-server-0.0.1.jar --port 8080 --host localhost
- If integrating with Claude Desktop, update claude-desktop.json with the wrapper command that launches the JAR, for example: { "mcpServers": { "openstack-mcp-server": { "command": "java", "args": ["-jar", "<path_to_your_jar>/openstack-mcp-server-0.0.1.jar", "--port", "8080", "--host", "localhost"] } } }
Notes:
- Ensure OpenStack CLI is properly installed and accessible in the environment where the MCP server runs.
- If you change ports or host bindings, update the integration configuration accordingly.
Additional notes
Tips and common issues:\n- Ensure Java 21 is installed and JAVA_HOME is set if needed.\n- The MCP server uses OpenStack application credentials; keep them secure and avoid hard-coding in accessible files.\n- When deploying behind a reverse proxy, configure host/port appropriately and consider enabling TLS in production.\n- If the server cannot authenticate with OpenStack, verify authUrl, regionName, and the application credential IDs/secrets.\n- Verify that the OpenStack CLI is installed and functional on the host by running an example openstack command manually before starting the MCP server.\n- For Claude Desktop integration, ensure the path to the JAR is correct and that the host/port match your Claude configuration.\n- Logging configurations can help diagnose issues; adjust logging.pattern.console or enable verbose logging in application.yml if needed.