AWS Security Analyzer
An MCP server for automated AWS security scanning. It detects over-privileged IAM roles and S3 Public Access Block misconfigurations, enabling least-privilege enforcement through tools like list_iam_roles, analyze_iam_policy, and analyze_s3_security.
README
AWS Security Analyzer (MCP Server)
An automated Cloud Security Posture Management (CSPM) tool built on the Model Context Protocol (MCP). This server acts as a local security scanner for AWS environments, designed to detect over-privileged IAM roles and S3 Public Access Block misconfigurations using the Principle of Least Privilege.
🚀 Features
- IAM Role Enumeration: Lists IAM roles and ARNs with pagination support.
- Policy Analysis: Scans both managed and inline IAM policies for
AdministratorAccessand wildcard (*) action/resource risks. - S3 Public Access Block Scanner: Audits S3 buckets for missing or partial Public Access Block (PAB) settings.
🛠️ Prerequisites
- Python 3.10+
- Node.js (optional, for MCP Inspector testing)
- AWS credentials configured (
aws configure, environment variables, or an IAM role)
⚙️ Installation
- Clone the repository:
git clone https://github.com/ekremcakir/aws-security-mcp.git
cd aws-security-mcp
- Create and activate a virtual environment:
python3 -m venv .venv
macOS / Linux:
source .venv/bin/activate
Windows:
.venv\Scripts\activate
- Install dependencies:
pip install -r requirements.txt
🔍 Usage
MCP Inspector (local testing)
npx @modelcontextprotocol/inspector .venv/bin/python server.py
Open the localhost URL in your browser, go to Tools, and run:
list_iam_rolesanalyze_iam_policyanalyze_s3_security
Cursor / Claude Desktop
Add this to your MCP config (adjust paths to your machine):
{
"mcpServers": {
"aws-security": {
"command": "/absolute/path/to/aws-security-mcp/.venv/bin/python",
"args": ["/absolute/path/to/aws-security-mcp/server.py"]
}
}
}
Windows example:
{
"mcpServers": {
"aws-security": {
"command": "C:\\path\\to\\aws-security-mcp\\.venv\\Scripts\\python.exe",
"args": ["C:\\path\\to\\aws-security-mcp\\server.py"]
}
}
}
🔐 Required AWS IAM Permissions
The IAM user or role running this server needs at least:
| Service | Actions |
|---|---|
| IAM | iam:ListRoles, iam:ListAttachedRolePolicies, iam:ListRolePolicies, iam:GetRolePolicy, iam:GetPolicy, iam:GetPolicyVersion |
| S3 | s3:ListAllMyBuckets, s3:GetPublicAccessBlock |
Example read-only policy snippet:
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"iam:ListRoles",
"iam:ListAttachedRolePolicies",
"iam:ListRolePolicies",
"iam:GetRolePolicy",
"iam:GetPolicy",
"iam:GetPolicyVersion",
"s3:ListAllMyBuckets",
"s3:GetPublicAccessBlock"
],
"Resource": "*"
}
]
}
⚠️ Limitations
- S3 scope: Checks Public Access Block settings only. Does not analyze bucket policies, ACLs, or actual public object exposure.
- IAM scope: Does not evaluate permission boundaries, trust policies, or cross-account access patterns.
- Pagination:
list_iam_rolesrespectsmax_items; large accounts may need multiple calls with higher limits. - Credentials: Uses the default Boto3 credential chain (environment, shared config, instance profile).
🛡️ Architecture & DevSecOps Context
This project demonstrates cloud security automation with standard AWS SDKs (Boto3) and the MCP standard, bridging infrastructure auditing and AI-driven workflow integrations.
📄 License
MIT — see LICENSE.
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.