MC

MCP Server: OpenStack Operations Automation

Automate OpenStack operations with MCP server for monitoring, instance, volume and network control—FastMCP, OpenStack SDK, Bearer auth, Claude-ready.

Quick Install
npx -y @call518/MCP-OpenStack-Ops

Overview

MCP Server: OpenStack Operations Automation is a Model Context Protocol (MCP) server that exposes a set of operational controls for OpenStack clouds. It translates high-level tool calls into OpenStack SDK actions so LLM agents and orchestration systems can monitor and manage compute instances, block volumes, network resources, and basic health metrics using a standardized tool interface. The server is designed to be “Claude-ready” and compatible with other LLMs that use the MCP/FastMCP tool pattern.

This server is useful when you want programmatic, secure, and agent-friendly control over OpenStack resources. Instead of embedding OpenStack credentials and SDK code into multiple automation clients, the MCP server centralizes operations behind a small HTTP API that supports bearer token auth. That makes it easier to audit access, decouple AI agents from cloud credentials, and integrate monitoring and remediation workflows.

Features

  • Exposes OpenStack operations as MCP-compatible tools (instances, volumes, networks, monitoring)
  • Uses python-openstacksdk (OpenStack SDK) to interact with cloud APIs
  • Bearer token authentication for API clients
  • Supports operations to list, create, update, delete, attach/detach resources
  • Designed to integrate with LLM agents (FastMCP / Claude-style tool manifests)
  • Simple HTTP JSON API; easy to call from curl, Python, or agent frameworks
  • Configurable via environment variables and Docker

Installation / Configuration

Requirements:

  • Python 3.9+ (or run via Docker)
  • OpenStack credentials (auth URL, username, password, project, domain)
  • A bearer token or API gateway to protect the MCP endpoints

Quick start (local Python):

# Clone repository
git clone https://github.com/call518/MCP-OpenStack-Ops.git
cd MCP-OpenStack-Ops

# Create virtualenv and install
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt

# Set environment variables (example)
export OS_AUTH_URL="https://openstack.example.com:5000/v3"
export OS_USERNAME="clouduser"
export OS_PASSWORD="secret-password"
export OS_PROJECT_NAME="project"
export OS_USER_DOMAIN_NAME="Default"
export OS_PROJECT_DOMAIN_NAME="Default"

# Optional: set a secret for MCP bearer auth
export MCP_BEARER_TOKEN="replace-with-long-secret"

# Run the FastAPI/uvicorn server (module name may vary)
uvicorn main:app --host 0.0.0.0 --port 8080

Docker build and run:

docker build -t mcp-openstack-ops .
docker run -p 8080:8080 \
  -e OS_AUTH_URL="https://openstack.example.com:5000/v3" \
  -e OS_USERNAME="clouduser" \
  -e OS_PASSWORD="secret-password" \
  -e OS_PROJECT_NAME="project" \
  -e MCP_BEARER_TOKEN="replace-with-long-secret" \
  mcp-openstack-ops

Environment variables reference:

VariablePurpose
OS_AUTH_URLOpenStack Identity endpoint (Keystone)
OS_USERNAMEOpenStack username
OS_PASSWORDOpenStack password
OS_PROJECT_NAMEOpenStack project/tenant
OS_USER_DOMAIN_NAMEUser domain (often “Default”)
OS_PROJECT_DOMAIN_NAMEProject domain (often “Default”)
MCP_BEARER_TOKENShared secret used to authenticate API requests

Available Tools / Resources

The server exposes toolbox-like endpoints that map to OpenStack operations. Typical tools provided:

  • Monitoring: host/instance metrics, basic alerts
  • Instances: list, create, delete, reboot, resize
  • Volumes: list, create, delete, attach, detach, snapshot
  • Networks: list networks, create port, list subnets, security group actions

Developer resources:

  • GitHub repo: https://github.com/call518/MCP-OpenStack-Ops
  • OpenStack SDK docs: https://docs.openstack.org/openstacksdk/latest/
  • FastMCP / MCP protocol: use the server’s tool manifest to integrate with your agent platform

Example tool manifest snippet (Claude/LLM agent friendly):

{
  "name": "openstack_instances",
  "description": "Manage compute instances (list/create/delete).",
  "url": "https://mcp.example.com/tools/openstack/instances",
  "method": "POST",
  "headers": {"Authorization": "Bearer <MCP_BEARER_TOKEN>", "Content-Type": "application/json"}
}

API Endpoints (example)

EndpointMethodDescription
/tools/instancesPOSTDispatch instance operations (action in JSON body: list/create/delete)
/tools/volumesPOSTDispatch volume actions (attach/detach/snapshot)
/tools/networksPOSTNetwork queries & port creation
/tools/monitoringGETGet basic metrics and health status

Example curl (list instances):

curl -s -H "Authorization: Bearer ${MCP_BEARER_TOKEN}" \
  -H "Content-Type: application/json" \
  -X POST https://mcp.example.com/tools/instances \
  -d '{"action":"list"}'

Python example using requests:

import requests, os
token = os.environ.get("MCP_BEARER_TOKEN")
resp = requests.post(
    "https://mcp.example.com/tools/instances",
    headers={"Authorization": f"Bearer {token}"},
    json={"action":"create", "name":"test-vm", "flavor":"m1.small", "image":"ubuntu-22.04"}
)
print(resp.json())

Use Cases

  • Automated remediation: An LLM agent monitors metrics and, when disk I/O or CPU exceeds thresholds, calls the MCP server to create a replacement instance and migrate workloads.
  • Self-service provisioning: Internal tools call the MCP API to spin up pre-configured VMs for developer sandboxes without exposing OpenStack credentials to each consumer.
  • Volume lifecycle automation: Scheduled jobs snapshot