CloudGuard MCP
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., "@CloudGuard MCPrun a security audit"
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.
CloudGuard MCP
A read-only Model Context Protocol (MCP) server for AWS resource inspection, misconfiguration detection, and cost estimation. It gives an MCP-compatible agent (Claude, or any other MCP client) a safe, structured way to query EC2, S3, and IAM state and to reason about it across multiple tool calls, without granting the agent any ability to modify or delete infrastructure.
Problem
Answering a question like "which S3 buckets are missing encryption, and what would it cost to fix them" normally means opening the AWS console, checking each bucket by hand, and cross-referencing Cost Explorer manually. An LLM agent cannot do this today because it has no safe, structured interface into a live AWS account. This project builds that interface.
Related MCP server: aws-safe-mcp
Design principles
Read-only by construction, not by convention. Every AWS call in this project is enforced read-only at two independent layers: the IAM policy attached to the credentials (
iam/cloudguard-readonly-policy.json), and an application-level check inaws_client.pythat refuses to invoke any boto3 operation not prefixeddescribe_,get_, orlist_, regardless of what the IAM policy allows. Either layer failing independently still results in no mutating call reaching AWS.Compound detectors, not just raw tools. Individual tools (
list_s3_buckets,get_bucket_encryption_status, ...) are composed into detector functions (find_unencrypted_buckets,run_security_audit, ...) that perform the multi-step orchestration server-side, so a calling agent can ask a compound question in one tool call instead of re-deriving the same chain of calls on every query.Cached and throttle-aware. All AWS calls go through a shared, TTL-cached client with exponential backoff on throttling, so repeated or overlapping agent queries don't hammer the AWS API.
Typed contracts. Every tool input and output is a Pydantic model (
schemas.py), not a raw dict, so the tool interface is self-documenting and validated at the boundary.
Architecture
src/cloudguard_mcp/
aws_client.py Cached, safety-enforced boto3 wrapper. All AWS
calls in the project go through this module.
schemas.py Typed request/response models for every tool.
tools/
ec2_tools.py EC2 instance + security group inspection.
s3_tools.py S3 bucket, encryption, and public-access checks.
iam_tools.py IAM role and inline-policy risk checks.
cost_tools.py Cost Explorer spend-by-service queries.
detectors/
misconfiguration.py Compound detectors built by chaining the
tools above (e.g. find_unencrypted_buckets).
server.py The MCP server: registers every tool/resource
above with the MCP protocol via FastMCP.
iam/
cloudguard-readonly-policy.json The IAM policy to attach to whatever
credentials run this server.
tests/ pytest + moto test suite. No real AWS account or
credentials are required to run the tests.Available tools
list_ec2_instances (and the detectors built on it, find_open_security_groups
and find_idle_ec2_instances) accept a regions list and scan every region
in it concurrently, tagging each returned instance with the region it was
found in. This is EC2-specific: S3 (list_s3_buckets) and IAM
(list_iam_roles) are account-global AWS APIs, not region-scoped, so those
tools are unaffected by multi-region support.
Tool | Description |
| List EC2 instances across one or more regions; flags instances with a sensitive port open to 0.0.0.0/0 |
| List all S3 buckets |
| Check default encryption on a bucket |
| Check public-access-block configuration on a bucket |
| List IAM roles; flags wildcard Action/Resource grants in inline policies |
| Total cost grouped by AWS service over a trailing window |
| Compound: buckets missing default encryption |
| Compound: buckets not fully blocking public access |
| Compound: roles with Action: |
| Compound: instances open to the internet on a sensitive port |
| Compound: stopped instances, with recent EC2 spend as context |
| Runs every detector above and returns the combined finding list |
Plus one MCP resource, cloudguard://account/inventory, exposing a
browsable snapshot of the account's inspected EC2/S3/IAM state.
Setup
pip install -e ".[dev]"Running the tests (no AWS account required)
The full test suite runs against moto, an in-memory AWS mock — no real
credentials, network access, or cost.
pytest tests/ -vRunning against a real AWS account
Create a dedicated IAM user or role and attach the policy in
iam/cloudguard-readonly-policy.json.Configure credentials for that identity (e.g.
aws configure, or the standardAWS_ACCESS_KEY_ID/AWS_SECRET_ACCESS_KEY/AWS_DEFAULT_REGIONenvironment variables).Run the server:
python -m cloudguard_mcp.serverPoint an MCP client at this process over stdio to begin issuing tool calls.
Demo
demo/run_demo.py connects a real Claude Opus 5 model to this MCP server
over stdio (against a seeded, moto-mocked AWS account, so it's runnable
without real AWS credentials) and lets it chain tool calls on its own to
answer compound questions. See
docs/demo_transcript.md for a full writeup of a
real run, including the agent parallelizing independent tool calls, refusing
to fabricate a per-bucket cost figure when the data wasn't available, and
independently catching that one detector's cost estimate was aggregate
account spend rather than per-instance.
What this project does not do
This project does not modify, create, or delete any AWS resource under any circumstance. It does not replace dedicated security posture tools such as AWS Config, Prowler, or ScoutSuite for comprehensive compliance scanning; its scope is deliberately narrow (a handful of common, high-signal misconfigurations) in favor of exposing that scope through a well-designed, agent-composable MCP interface rather than a large, static rule set.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Alicense-qualityDmaintenanceA read-only Model Context Protocol server that exposes over 60 AWS tools across services like EC2, S3, and IAM for AI agent interaction. It features multi-region support, resource caching, and audit logging to provide secure, AI-ready access to AWS infrastructure data.Last updated159ISC
- Alicense-qualityAmaintenanceA read-only MCP server for safe, structured investigation of AWS serverless resources, providing curated tools for tracing dependencies, permissions, and failures without exposing raw SDK access.Last updatedMIT
- Alicense-qualityCmaintenanceA read-only MCP server that lets an LLM inspect an AWS account — list EC2 instances, S3 buckets, IAM users, and cost — with a structural guarantee against any mutations.Last updatedMIT
- Flicense-qualityCmaintenanceA read-only MCP server for AWS observability that provides tools to monitor EC2, EKS, RDS, ElastiCache Redis, and CloudWatch.Last updated
Related MCP Connectors
Scans MCP servers for tool poisoning, prompt injection and supply chain risks.
Security scanner for MCP servers. Detect vulnerabilities, prompt injection, and tool poisoning.
Free MCP tools: the only MCP linter, health checks, cost estimation, and trust evaluation.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- 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/kishoreqwerty/cloudguard-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server