AWS Infrastructure MCP Server
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@AWS Infrastructure MCP Serveraudit my AWS resources for security vulnerabilities"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
AWS Infrastructure MCP Server
透過 Model Context Protocol(MCP),讓 Claude AI 自動審計 AWS 雲端資源配置,診斷安全漏洞並生成高可用性優化報告。
專案背景
傳統 AWS 資源審計需要人工逐一檢查控制台,耗時且容易遺漏。 本專案將 AWS CloudShell 導出的資源快照透過 MCP 協議接入 Claude Desktop,實現 AI 一鍵自動診斷與結構化報告生成。
Related MCP server: AWS MCP Server
架構流程
① AWS CloudShell(跨區環境)
→ ② 導出台灣區資源快照 all_aws_config_exports.json
→ ③ MCP 協議對接?(自動審查)
→ ④ Claude AI 核心診斷專家
→ ⑤ 一鍵生成高可用性與防禦優化報告實際診斷出的安全漏洞
編號 | 問題 | 風險等級 | 說明 |
1 | NAT Gateway Blackhole | 🔴 高風險 | NAT Gateway 被刪除,私有子網(10.8.3.0/24 等)對外路由完全失效 |
2 | 安全群組過度暴露 | 🔴 高風險 | Default VPC 內多個 launch-wizard 安全群組將 SSH(22) 和 RDP(3389) 開放給全世界(0.0.0.0/0),面臨暴力破解風險 |
現有雲端資源審計矩陣
安全審計領域 | 當前潛在風險 | 風險等級 | 建議方案 |
VPC 邊界隔離 | NAT Gateway 已成 blackhole,私有子網失去對外連線 | 高風險 | 重建 NAT Gateway 或改用 VPC Endpoint |
安全組入口 | SSH/RDP 對全網際網路開放 | 高風險 | 限縮來源 IP 或改用 SSM Session Manager |
IAM 權限管理 | Assume Role 權限過於寬泛 | 極高風險 | 嚴格實施最小特權原則 |
S3 存取控管 | 儲存桶未設封閉,IaC 狀態檔可能外洩 | 高風險 | 啟動 Public Access Block |
技術棧
類別 | 工具 |
AI 協議 | Model Context Protocol(MCP) |
AI 模型 | Claude Desktop |
後端 | Python(MCP Server) |
容器化 | Docker、Dockerfile |
資源導出 | AWS CloudShell |
腳本 | Shell Script |
專案結構
aws-infrastructure-mcp-server/
├── server.py # MCP Server 主程式
├── all_aws_config_exports.json # AWS 台灣區資源快照(mock示範資料)
├── feature.md # 功能說明文件
├── requirements.txt # Python 依賴套件
├── setup_and_run.sh # 一鍵啟動腳本
├── Dockerfile # 容器化部署定義
└── .gitignore快速啟動
# 1. 安裝依賴
pip install -r requirements.txt
# 2. 一鍵啟動 MCP Server
bash setup_and_run.sh操作步驟
步驟一:導出 AWS 資源快照
在 AWS CloudShell 執行以下指令,導出台灣區完整資源配置:
# 在 AWS CloudShell 執行
aws configservice list-discovered-resources \
--resource-type AWS::EC2::SecurityGroup \
--region ap-east-2 > all_aws_config_exports.json步驟二:啟動 MCP Server
bash setup_and_run.sh步驟三:Claude Desktop 對接
開啟 Claude Desktop,透過 MCP 協議連接本地 Server, 輸入審計指令即可讓 AI 自動分析資源快照。
步驟四:取得診斷報告
Claude AI 自動解析 JSON 資源快照,輸出結構化安全漏洞報告。
Docker 部署
# 建置映像檔
docker build -t aws-mcp-server .
# 啟動容器
docker run -d \
-v $(pwd)/all_aws_config_exports.json:/app/all_aws_config_exports.json \
aws-mcp-server注意事項
all_aws_config_exports.json為 mock 示範資料, 實際使用時請替換為從 AWS CloudShell 導出的真實資源快照真實資源快照包含帳號 ID、ARN 等敏感資訊, 請勿將真實資料推送至公開倉庫
建議搭配
.gitignore排除真實快照檔案
延伸應用
本 MCP Server 可進一步擴充以下功能:
自動生成 Terraform 修復腳本
整合 Slack / Email 告警通知
排程定期審計並比對資源變更差異
結合 AWS Config Rules 實現持續合規檢查
作者
陳銘暉 | Tibame 網工班 2026
配套專案:雙雲 CI/CD 與 AIOps 自動化維運平台
This server cannot be installed
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/figfhgfgg/aws-infrastructure-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server