OpenStack MCP Server for Cloud Integration
Enable seamless cloud integration with an MCP server that implements OpenStack interactions for scalable, secure orchestration and automation.
npx -y @wangsqly0407/openstack-mcp-serverOverview
This MCP (Model Context Protocol) server implements OpenStack interactions to provide a centralized, programmatic way to orchestrate cloud resources. It exposes a lightweight HTTP API that mediates between orchestration agents and OpenStack services (Nova, Neutron, Keystone, etc.), allowing teams to automate VM lifecycle, networking, and tenant configuration using a consistent model-context interface.
The server is useful when you need to standardize how agents or external systems request cloud actions, manage credentials securely, and enforce policies across projects and regions. By translating MCP-style requests into OpenStack API calls, the server simplifies integrations for CI/CD pipelines, autoscaling controllers, and multi-tenant orchestration layers.
Features
- MCP-style HTTP API to fetch and update model context for orchestration agents
- Integration adapters for core OpenStack services (compute, network, identity)
- Credential management and token caching for efficient OpenStack access
- Pluggable configuration (endpoints, regions, and service mappings)
- Lightweight, developer-friendly REST endpoints for automation and testing
- Example scripts and configuration templates for common tasks
- Basic authentication and TLS support for secure deployments
Installation / Configuration
Prerequisites:
- Python 3.8+
- Access to an OpenStack cloud (credentialed user with appropriate roles)
- Git, pip
Clone and set up a virtual environment:
Create a configuration file (config.yaml) with your OpenStack and server settings. Example minimal config:
openstack:
auth_url: "https://openstack.example.com:5000/v3"
username: "mcp_user"
password: "secret"
project_name: "service_project"
user_domain_name: "Default"
project_domain_name: "Default"
server:
host: "0.0.0.0"
port: 8080
use_tls: false
logging:
level: INFO
Run the server locally:
For production, run behind a reverse proxy (nginx) and enable TLS. Optionally create a systemd unit:
[Unit]
OpenStack MCP Server
network.target
[Service]
mcp
/opt/openstack-mcp-server
/opt/openstack-mcp-server/.venv/bin/python run_server.py --config /etc/mcp/config.yaml
on-failure
[Install]
multi-user.target
Available Resources
- API endpoints: REST routes for model context retrieval, update, and action requests
- Example scripts: example/ folder with curl and Python usage snippets
- Configuration templates: config.yaml.sample in the repository
- Tests: unit tests for adapters and request translation
- Documentation: inline docstrings and README examples in the repo
- Logging and metrics: configurable logging and hooks for integration with Prometheus or other monitoring
API overview (example):
| Endpoint | Method | Purpose |
|---|---|---|
| /mcp/context | GET | Retrieve a model context for an agent or node |
| /mcp/context | POST | Update or store model context |
| /mcp/action | POST | Request an OpenStack action (create VM, create network) |
| /health | GET | Health check for liveness/readiness |
Example curl to request VM creation:
Use Cases
- Tenant provisioning: When a new project or tenant is created, an orchestration agent can POST a model context to the MCP server which then provisions networks, attaches security groups, and creates initial instances based on predefined templates.
- Autoscaling orchestration: An autoscaler can request context updates and issue create/destroy actions through the MCP server. The server handles token management and translates the high-level action into Nova/Neutron calls.
- CI/CD environments: CI runners deploy ephemeral test environments by sending action requests to the MCP server. The server enforces constraints (image choices, flavors) and returns contextual metadata when resources are ready.
- Network automation: A network automation tool can request Neutron operations (create subnet, attach router) through MCP actions, keeping network configuration centralized and auditable.
- Hybrid workflows: Use the MCP server as a façade to standardize provisioning between multiple clouds or OpenStack regions; plugins/adapters can route requests to the appropriate backend.
Tips for Developers
- Start by adapting the sample config.yaml to point at a sandbox OpenStack project and test with the example scripts.
- Use the health endpoint and logs to debug token or endpoint problems.
- Extend or replace adapters to support additional OpenStack services or cloud providers — adapters should translate MCP requests to provider API calls.
- Add unit tests for any new action handlers to ensure consistent behavior across releases.
For repository details, usage examples, and contribution guidelines, refer to the project on GitHub.