AiStackOps MCP server
Commit Nov 2, 2026Enables AI assistants to manage OpenStack cloud infrastructure through natural language commands with built-in safety guardrails and auditing.
Also known as shariatissh/ai-stack-ops
- Stars
- 1
- Tools
- —
- Downloads, 30 days
- —
- Latest version
- —
- Last commit
- Nov 2, 2026
- License
- MIT
What is AiStackOps MCP?
AiStackOps enables AI assistants to manage OpenStack cloud infrastructure through natural language commands with built-in safety guardrails and auditing.
Summary generated from the project's README
About AiStackOps MCP server
Managing OpenStack cloud infrastructure through natural language is what ai-stack-ops enables for DevOps engineers and system administrators. By connecting to AI clients like Claude Desktop, Cursor, or ChatGPT via the Model Context Protocol, users can control cloud resources using conversational commands instead of complex dashboards or manual CLI identifiers. The server provides sixteen specialized tools to handle tasks ranging from inspecting server health to managing security groups and volumes.
Security is a core focus, featuring a mandatory preview mode where every mutating action requires explicit human approval via a confirm flag. The system protects sensitive data by keeping credentials strictly in local files like .env or clouds.yaml, ensuring the AI never accesses or prints passwords. It also supports working over HTTPS via the Horizon gateway, which allows management even when standard OpenStack ports are restricted. Users can also perform instant infrastructure backups and one-click reverts to protect against accidental configuration drift.
What you can do with it
- 1Audit security group exposuresAsk the AI to scan all security groups for risky public access to sensitive ports.
- 2Diagnose server connectivity issuesRequest a health check to determine why a specific virtual machine is unreachable.
- 3Modify firewall rules safelyInstruct the assistant to allow a specific IP address to access a production server.
- 4Roll back infrastructure changesRevert security group and server attachment settings to a previous state if a change causes issues.
Written from the project's README. Every use case is checked against a quote from it.
Automated checks
Ran Nov 15, 2026Full report →Not verified yet. A server needs a score of 80, no serious finding, and enough data for us to check. How checks work · What to fix for more points
- Source repository linked and reachableshariatissh/ai-stack-ops is public and reachablegithub.com/shariatissh/ai-stack-ops ↗Pass
- Package names this repository as its sourceNot checked
- Build provenance (Sigstore attestation)Not checked
- Open source license (OSI)MITspdx.org/licenses/MIT.html ↗Pass
- Commit or release in the last yearLast commit or release 2026-11-02github.com/shariatissh/ai-stack-ops ↗Pass
- OpenSSF ScorecardNot checked
- Package name not close to a popular packageNot checked
- No critical advisory in the package or its dependenciesNot checked
- No hidden instructions to the model0 tool descriptions and the README read; no override phrases, credential paths or hidden charactersPass
- Destructive tools are labelledNot checked
- Remote endpoint answers the MCP handshakeNot checked
README
View on GitHub☁️🤖 AiStackOps (osctl)
Universal AI-Native OpenStack Cloud Copilot — MCP Server, Agent Skill & Safe CLI Engine
دستیار هوشمند، تعاملی و ایمن مدیریت زیرساخت ابری OpenStack (مبتنی بر MCP، Skill و خط فرمان)
🇬🇧 English Documentation • 🇮🇷 مستندات فارسی
🇬🇧 English Documentation
What is AiStackOps?
AiStackOps turns your AI assistant (OpenCode, Claude Code, Claude Desktop, Cursor, Windsurf, or ChatGPT) into a Senior OpenStack DevOps & Cloud Security Engineer.
Instead of navigating complex Horizon dashboards or memorizing long openstack CLI UUIDs, you simply talk to your AI in natural language (English, Persian, or any language):
- "Allow IP
203.0.113.50to access serverweb-prod" - "Scan all our security groups for risky public
0.0.0.0/0exposures" - "Why can't I SSH into
app-server-02? Diagnose it." - "Take a backup of all firewall rules before we clean them up, and revert if anything breaks."
✨ Key Differentiators & AI Safety Guardrails
- Mandatory
PREVIEW_ONLYHuman-in-the-Loop Safety:
Every mutating action (opening/revoking firewall rules, stopping/rebooting/deleting VMs, detaching SGs, reverting snapshots) runs in Preview Mode by default. The AI inspects the live state, shows you the exact plan, asks clarifying questions (e.g., which Security Group? and which Port/Protocol?), and only executes with--confirmafter your explicit approval. - Zero-Secret Exposure Architecture:
Credentials live strictly in.env,openrc, orclouds.yaml. The AI agent never reads or prints your passwords or session tokens. - Firewall-Bypassing Horizon Gateway + Standard OpenStack Support:
Works seamlessly over HTTPS (port 443) via OpenStack Horizon Web/REST APIs (ideal when ports5000/8774/9696are firewalled) as well as standard OpenStack environment configurations. - Instant Infrastructure State Backup & 1-Click Revert:
Snapshot all Security Groups, rules, and server attachments to JSON before risky changes (./osctl backup) and roll back any drift in seconds (./osctl revert --confirm). - AI Security Auditor & Smart Diagnostics:
Built-insg auditdetects critical0.0.0.0/0exposures (SSH, RDP, Databases, Docker, etc.), duplicate rules, and unused Security Groups. Built-inservers diagnosechecks VM power state, network ports, floating IPs, and ingress reachability in one shot.
🚀 Quick Start (Connect Any OpenStack Cloud)
1. Clone & Install
git clone https://github.com/shariatissh/ai-stack-ops.git
cd ai-stack-ops
pip install -e .
2. Configure Your OpenStack Connection
Choose any of the 3 supported methods:
-
Method A: Interactive Setup Wizard
./osctl initOr non-interactively:
./osctl init \ --horizon-url "https://horizon.example.com" \ --username "your_username" \ --password "your_password" -
Method B:
.envFilecp .env.example .env chmod 600 .env # Edit .env and set OS_HORIZON_URL, OS_USERNAME, OS_PASSWORD -
Method C: Standard OpenStack
openrc.shorclouds.yamlIf you already haveOS_AUTH_URL,OS_USERNAME, andOS_PASSWORDexported in your shell, or a~/.config/openstack/clouds.yamlfile,AiStackOpsdetects them automatically.
Verify your connection:
./osctl auth-check
🤖 AI Integrations (MCP & Skills)
1. Model Context Protocol (MCP) — Claude Desktop, Cursor, ChatGPT, OpenCode
aistackops_mcp.py is a zero-dependency stdio JSON-RPC 2.0 MCP Server exposing 16 cloud tools:
openstack_overview,openstack_quotasopenstack_servers_list,openstack_server_inspect,openstack_server_diagnose,openstack_server_actionopenstack_sg_list,openstack_sg_audit,openstack_sg_check_access,openstack_sg_allow,openstack_sg_revokeopenstack_volumes_list,openstack_fip_list,openstack_networks_listopenstack_backup,openstack_revert
Add to claude_desktop_config.json / Cursor MCP:
{
"mcpServers": {
"aistackops": {
"command": "python3",
"args": ["/absolute/path/to/ai-stack-ops/aistackops_mcp.py"]
}
}
}
Add to OpenCode (~/.config/opencode/opencode.jsonc):
{
"mcp": {
"aistackops": {
"type": "local",
"command": ["python3", "/absolute/path/to/ai-stack-ops/aistackops_mcp.py"],
"enabled": true
}
}
}
2. Native Agent Skill (OpenCode & Claude Code)
Copy the skill globally so every session knows the interactive safety workflows:
mkdir -p ~/.config/opencode/skills/aistackops ~/.claude/skills/aistackops
cp skills/aistackops/SKILL.md ~/.config/opencode/skills/aistackops/SKILL.md
cp skills/aistackops/SKILL.md ~/.claude/skills/aistackops/SKILL.md
🛠️ Complete CLI Reference (./osctl)
| Category | Command | Description |
|---|---|---|
| Setup & Auth | ./osctl init |
Interactive or flag-based .env setup wizard |
./osctl auth-check [--refresh] |
Verify authentication and active project/region | |
| Cloud Overview | ./osctl overview |
Full summary of VMs, Security Groups, Floating IPs, and Volumes |
./osctl quotas |
CPU, RAM, Instances, and Volume storage usage & free capacity | |
| Servers (Nova) | ./osctl servers list |
List all instances with IPs, status, flavor, and SGs |
./osctl servers find "<query>" |
Smart fuzzy search by name, partial name, IP, or UUID | |
./osctl servers show "<server>" |
Detailed server ports and attached Security Groups | |
./osctl servers diagnose "<server>" |
AI health check (power state, ports, FIPs, SSH/RDP firewall reachability) | |
./osctl servers start|stop|reboot-soft|reboot-hard "<srv>" [--confirm] |
Power lifecycle operations (Preview first, --confirm to execute) |
|
./osctl servers pause|unpause|suspend|resume "<srv>" [--confirm] |
Pause or suspend operations | |
./osctl servers resize "<srv>" --flavor "<flavor>" [--confirm] |
Resize VM hardware flavor (resize-confirm / resize-revert) |
|
./osctl servers rename "<srv>" --name "<new_name>" [--confirm] |
Rename an instance | |
./osctl servers snapshot "<srv>" --name "<snap_name>" [--confirm] |
Create an instance snapshot | |
./osctl servers console "<srv>" --type log|url [--lines 100] |
Fetch boot console log or VNC console URL | |
./osctl servers attach-sg|detach-sg "<srv>" --sg "<sg>" [--confirm] |
Attach or detach a Security Group on a server | |
./osctl servers delete "<srv>" [--confirm] |
Permanently delete an instance | |
| Firewall (Neutron) | ./osctl sg list [--with-rules] |
List all Security Groups and attached servers |
./osctl sg audit |
Scan for risky 0.0.0.0/0 exposures, duplicate rules, and unused SGs |
|
./osctl sg for-server "<server>" |
Inspect all Security Groups & rules attached to a specific server | |
./osctl sg show "<sg>" [--server "<srv>"] |
Show rules and attached servers for a Security Group | |
./osctl sg check-access --server "<srv>" --ip "<ip>" [--port "<port>"] |
Verify if an IP/CIDR currently has firewall access | |
./osctl sg allow --sg "<sg>" [--server "<srv>"] --ip "<ip>" --port "<port>" --protocol "<proto>" [--confirm] |
Allow IP/CIDR access (supports aliases: ssh, rdp, http, https, web, mysql, postgres, redis, ping, all) |
|
./osctl sg revoke --rule-id "<id>" [--confirm] |
Revoke a rule by exact ID or by --sg + --ip match |
|
./osctl sg create --name "<name>" [--description "..."] [--confirm] |
Create a new Security Group | |
./osctl sg delete "<sg>" [--confirm] |
Delete a Security Group | |
| Storage & Net | ./osctl networks / ./osctl fip list |
List Neutron networks and Floating IPs |
./osctl volumes list / ./osctl flavors / ./osctl images |
List Cinder volumes, Nova flavors, and Glance images | |
| Safety & Audit | ./osctl backup [--label "..."] / ./osctl backups |
Snapshot all SGs and server attachments to JSON |
./osctl revert [--file "..."] [--confirm] |
Roll back firewall rules & attachments to backup snapshot | |
./osctl audit-log [--limit 50] |
View chronological audit trail of confirmed changes |
🇮🇷 مستندات فارسی
معرفی AiStackOps
AiStackOps یک کوپایلوت ابری هوشمند (AI-Native Cloud Copilot) برای زیرساختهای OpenStack است که به هر مهندس DevOps، مدیر سیستم یا تیم زیرساخت اجازه میدهد کلود اوپناستک خود را از طریق گفتگو به زبان طبیعی در OpenCode، Claude (Desktop / Code)، Cursor و ChatGPT با امنیت کامل مدیریت کند.
به جای جستجوی دستی در پنلهای پیچیده Horizon یا حفظ کردن شناسههای طولانی، کافیست به زبان طبیعی بگویید:
- «دسترسی آیپی
185.10.20.30رو بده به سرورweb» - «کل سکیوریتی گروپها رو ممیزی امنیتی کن ببین چه پورتهای حساسی به کل اینترنت (
0.0.0.0/0) بازه» - «سرور
db-01رو عیبیابی کن ببین چرا بهش وصل نمیشم» - «قبل از پاکسازی قوانین فایروال یه بکاپ کامل بگیر تا اگه مشکلی پیش اومد سریع Revert کنیم»
🛡️ ویژگیهای منحصربهفرد و لایههای امنیتی هوشمند
۱. حالت پیشنمایش اجباری (PREVIEW_ONLY):
هیچ دستور تغییردهندهای بدون تایید صریح شما و فلگ --confirm اجرا نمیشود. دستیار ابتدا وضعیت فعلی را بررسی میکند، اگر سرور چند سکیوریتی گروپ داشته باشد لیست آنها را به شما نشان میدهد، میپرسد روی کدام سکیوریتی گروپ و چه پورتی اعمال شود، و فقط پس از تایید شما تغییر را اعمال میکند.
۲. حفاظت صددرصدی از رمز عبور و اطلاعات حساس:
اطلاعات اتصال شما فقط در فایل محلی .env (یا ~/.config/aistackops/.env) با سطح دسترسی 600 نگهداری میشود. هوش مصنوعی هرگز محتوای فایل .env را نمیخواند و رمز عبور در هیچ خروجی یا لاگی چاپ نمیشود.
۳. پشتیبانی از هر کلود OpenStack (حتی پشت فایروال):
علاوه بر متغیرهای استاندارد openrc و clouds.yaml، این ابزار قادر است تمام عملیات را از طریق درگاه وب HTTPS (پورت ۴۴۳ پنل Horizon) انجام دهد؛ بنابراین حتی زمانی که پورتهای 5000، 8774 و 9696 از بیرون بسته باشند، بدون مشکل کار میکند.
۴. پشتیبانگیری آنی و بازگردانی یککلیکی (backup & revert):
پیش از هر تغییر حساس روی فایروالها، وضعیت کامل قوانین و اتصالات سرورها ذخیره شده و در هر لحظه با دستور revert دقیقاً به نقطه قبل بازگردانده میشود.
⚡ راهاندازی سریع (برای هر سرویسدهنده OpenStack)
git clone https://github.com/shariatissh/ai-stack-ops.git
cd ai-stack-ops
./osctl init
پس از وارد کردن آدرس پنل، نام کاربری و رمز عبور، اتصال خود را تست کنید:
./osctl auth-check
🧠 فلوچارت هوشمند تعامل با کاربر
هنگامی که به دستیار میگویید: «دسترسی آیپی X رو بده به سرور Y»:
- دستیار ابتدا دستور
./osctl sg for-server "Y"را اجرا میکند. - اگر بیش از یک سرور با نام
Yهمخوانی داشته باشد، لیست سرورهای مشابه را به همراه آیپیهایشان از شما میپرسد. - سپس لیست سکیوریتی گروپهای متصل به آن سرور را نمایش میدهد و از شما میپرسد:
- روی کدام سکیوریتی گروپ ثبت شود؟
- چه پورت و پروتکلی باز شود؟ (SSH، RDP، Web، پینگ یا پورت دلخواه)
- پس از انتخاب و تایید شما، قانون را با
--confirmثبت کرده و نتیجه دقیق را گزارش میدهد.
📄 License
Released under the MIT License.
AiStackOps MCP questions
How does the tool ensure safety during infrastructure changes?
It uses a mandatory PREVIEW_ONLY mode where the AI inspects the state and shows a plan, requiring an explicit --confirm flag to execute mutating actions.
Can I use this if my OpenStack API ports are firewalled?
Yes, it can work over HTTPS (port 443) via the OpenStack Horizon Web/REST APIs, making it ideal when standard ports like 5000 or 9696 are blocked.
What happens if a configuration change breaks my setup?
You can use the backup and revert features to snapshot security groups and server attachments to JSON and roll back changes in seconds.