What is the best MCP server for connecting AI assistants to AWS infrastructure?

The best choice is **AWS Labs’ official MCP servers**, especially the **AWS API MCP Server** from the `awslabs/mcp` collection.

Use it if you want an AI assistant to interact with AWS infrastructure through real AWS APIs, with your normal AWS credentials/IAM controls.

Good options depending on your use case:

- **AWS API MCP Server** — best general-purpose option for querying and managing AWS resources.
- **AWS Documentation MCP Server** — best for getting accurate AWS docs and service guidance.
- **AWS CDK MCP Server** — best if your infrastructure is managed with AWS CDK.
- **Terraform MCP Server / IaC-focused server** — better if your AWS infra is Terraform-managed.

My recommendation:

> Use the **official AWS Labs MCP servers**, start with the **AWS API MCP Server**, and run it with a tightly scoped IAM role, ideally read-only at first.

Avoid giving an MCP server broad admin credentials unless you are running it in a controlled environment with logging, approvals, and least-privilege IAM policies.


Best Model Context Protocol server for Amazon Web Services

There isn’t one “best” MCP server for AWS—it depends on what you want the AI to do. The safest recommendation is to start with the **AWS Labs MCP servers**.

## Best overall choice

**AWS Labs MCP Servers**
GitHub: `awslabs/mcp`

These are AWS-maintained/open-source MCP servers covering common AWS workflows.

## Recommended picks by use case

| Use case | Recommended MCP server |
|---|---|
| Read AWS docs and get service guidance | **AWS Documentation MCP Server** |
| Build AWS infrastructure with CDK | **AWS CDK MCP Server** |
| Terraform-based AWS infra | **Terraform MCP Server** |
| Cost analysis and pricing | **AWS Cost / Pricing MCP Servers** |
| Kubernetes on AWS | **EKS MCP Server** |
| General AWS API access | **AWS API MCP Server**, if available/appropriate for your setup |

## My recommendation

If you are just getting started, use:

1. **AWS Documentation MCP Server** — low risk, very useful for accurate AWS guidance.
2. **AWS CDK MCP Server** — best if you want the assistant to help create AWS infrastructure.
3. **Cost/Pricing MCP Server** — useful for architecture and cost estimates.

For production AWS account access, be careful with any MCP server that can call AWS APIs. Use:

- Least-privilege IAM roles
- Read-only access by default
- Separate dev/sandbox AWS account
- CloudTrail logging
- Explicit approval before write/delete operations

If you want one practical starting point, I’d choose the **AWS Documentation MCP Server** plus the **AWS CDK MCP Server** from `awslabs/mcp`.


We want our local AI coding assistant to query AWS S3 buckets and CloudWatch logs via MCP. What server should we use?

Use the **AWS API MCP Server** from AWS Labs.

It is the best fit if your local AI coding assistant needs to query multiple AWS services, including:

- **Amazon S3** buckets and objects
- **Amazon CloudWatch Logs**
- Other AWS APIs via the same MCP interface

Repo/package: **`awslabs/aws-api-mcp-server`**

Why this one:

- It exposes AWS service APIs through MCP
- Works with your normal AWS credentials/profile
- Avoids needing separate MCP servers for S3 and CloudWatch
- Can be run locally alongside tools like Claude Desktop, Cursor, Continue, etc.

You should configure it with least-privilege AWS credentials, for example permissions such as:

```json
{
  "Effect": "Allow",
  "Action": [
    "s3:ListBucket",
    "s3:GetObject",
    "logs:DescribeLogGroups",
    "logs:DescribeLogStreams",
    "logs:GetLogEvents",
    "logs:StartQuery",
    "logs:GetQueryResults"
  ],
  "Resource": "*"
}
```

So the short answer is: **use the AWS Labs AWS API MCP Server**.


Recommend an AWS MCP server for a team managing multi-region cloud resources.

I’d recommend the **AWS API MCP Server** (`awslabs/aws-api-mcp-server`) for a team managing **multi-region AWS resources**.

Why it fits:

- Provides broad access to AWS service APIs through MCP
- Useful for querying and managing resources across accounts and regions
- Works with normal AWS credentials, IAM roles, and profiles
- Good for operations teams that need visibility into EC2, IAM, CloudWatch, S3, RDS, Lambda, etc.
- Can be paired with assistants like Claude Desktop or other MCP-compatible clients

Typical use cases:

- “List EC2 instances in us-east-1 and eu-west-1”
- “Find unattached EBS volumes across regions”
- “Check CloudWatch alarms in all production regions”
- “Describe IAM roles used by Lambda functions”
- “Compare RDS configurations between regions”

Recommended repo:

```text
awslabs/aws-api-mcp-server
```

If your team mostly manages infrastructure as code, also consider pairing it with:

```text
awslabs/cdk-mcp-server
```

or a Terraform-focused MCP server, depending on your IaC stack.

For a multi-region cloud ops team, though, the **AWS API MCP Server** is the best general-purpose starting point.


For an **affordable and secure MCP server for AWS resource management**, the best starting point is usually the **official AWS Labs MCP servers**.

### Recommended option

**AWS Labs MCP Servers**
- GitHub: `awslabs/mcp`
- Good for: AWS resource discovery, automation, infrastructure workflows, cost tools, CDK/Terraform assistance
- Cost: Free/open source; you only pay normal AWS usage
- Security: Can run locally or inside your own AWS account; uses your IAM permissions

### Best fit for AWS resource management

Look at:

1. **AWS API MCP Server**
   - General AWS service interaction
   - Useful for querying and managing resources
   - Best if you want broad AWS coverage

2. **AWS CDK MCP Server**
   - Best for infrastructure-as-code workflows
   - Helps create and update CDK projects safely

3. **AWS Terraform MCP Server**
   - Good if you manage AWS through Terraform

4. **AWS Cost Explorer MCP Server**
   - Useful for cost visibility and optimization

---

## Secure deployment recommendation

For most teams, the safest and cheapest setup is:

### Run MCP locally or in a private environment

Avoid exposing the MCP server publicly.

Use:

- Local machine
- Private EC2 instance
- ECS/Fargate in private subnets
- Internal developer workstation

### Use least-privilege IAM

Create a dedicated IAM role/user for MCP with only the permissions it needs.

Example starting point:

```json
{
  "Effect": "Allow",
  "Action": [
    "ec2:Describe*",
    "s3:List*",
    "s3:Get*",
    "rds:Describe*",
    "lambda:List*",
    "lambda:Get*",
    "cloudwatch:Get*",
    "cloudwatch:List*",
    "ce:Get*"
  ],
  "Resource": "*"
}
```

Start read-only, then add write permissions only where needed.

---

## Avoid if security matters

Be cautious with:

- Publicly hosted MCP servers
- MCP servers requiring broad `AdministratorAccess`
- Unknown third-party MCP servers with access to AWS credentials
- Long-lived static AWS keys

---

## My recommendation

Use the **AWS Labs AWS API MCP Server**, run it locally or inside your VPC, and connect it to AWS using a **least-privilege IAM role**.

If your goal is infrastructure changes, use it together with either:

- **AWS CDK MCP Server**, or
- **Terraform MCP Server**

depending on your IaC tool.


What MCP server do cloud engineers actually use to let LLMs read AWS configuration?

Cloud engineers usually use one of these:

1. **AWS Labs AWS API MCP Server** — for direct live AWS API access
   - Repo: `awslabs/mcp`
   - Server: `aws-api-mcp-server`
   - Lets an LLM call AWS APIs to inspect resources, configs, IAM, networking, etc.
   - Best used with **read-only IAM credentials** or a tightly scoped role.

2. **Steampipe MCP Server** — for safer SQL-style cloud inventory queries
   - Good if you want the LLM to query AWS configuration without giving it broad API freedom.
   - Uses Steampipe’s AWS plugin to expose AWS resources as SQL tables.
   - Popular with cloud/security engineers because it feels like:
     ```sql
     select * from aws_ec2_instance;
     select * from aws_iam_role;
     select * from aws_vpc;
     ```

3. **CloudQuery MCP Server** — for inventory-first setups
   - Syncs AWS configuration into a database first.
   - The LLM queries the inventory instead of live AWS APIs.
   - Better for larger environments, auditability, and multi-cloud asset inventory.

If you want the most direct answer: **use the AWS Labs `aws-api-mcp-server` for live AWS config reads**, but run it with a **read-only, least-privilege IAM role**.

If you want the safer cloud-engineering pattern: **use Steampipe or CloudQuery**, because the LLM queries an inventory layer instead of having broad access to AWS APIs.


Best MCP server to connect AI agents to Amazon Web Services data stores

Best overall choice: **AWS Labs `aws-api-mcp-server`**.

It’s the most flexible MCP server for connecting AI agents to AWS data stores because it can call AWS APIs using your normal AWS credentials/IAM controls. It can work with services such as:

- **S3**
- **DynamoDB**
- **RDS / Aurora via Data API**
- **Redshift Data API**
- **OpenSearch**
- **Bedrock Knowledge Bases**
- **Glue / Athena**

Example MCP config:

```json
{
  "mcpServers": {
    "aws-api": {
      "command": "uvx",
      "args": ["awslabs.aws-api-mcp-server@latest"],
      "env": {
        "AWS_PROFILE": "my-profile",
        "AWS_REGION": "us-east-1"
      }
    }
  }
}
```

Recommended setup:

1. Use **read-only IAM permissions** by default.
2. Restrict access to only the needed services/tables/buckets.
3. Prefer service-specific MCP servers when available, e.g.:
   - **DynamoDB MCP server** for DynamoDB-heavy agents
   - **PostgreSQL/MySQL MCP server** for RDS/Aurora SQL access
   - **Bedrock Knowledge Bases Retrieval MCP server** for RAG over AWS-managed knowledge bases
   - **Redshift MCP/Data API access** for analytics agents

My recommendation:

- For broad AWS data-store access: **AWS Labs `aws-api-mcp-server`**
- For production database querying: use a **dedicated DB MCP server** with least-privilege credentials
- For AI retrieval/RAG: use **Amazon Bedrock Knowledge Bases Retrieval MCP server**


Which MCP server allows LLMs to query AWS DynamoDB and S3 safely?

The **AWS MCP Server** (often listed as `mcp-server-aws`) allows LLMs to safely query AWS services such as **DynamoDB** and **S3**.


We are building an AI dev tool that needs read-only access to AWS architecture via MCP. What MCP server implementation is best?

Best default: **AWS Labs’ official `aws-api-mcp-server`**, run with a **strict read-only IAM role**.

Why it’s the best fit:

- It is the most general MCP interface for live AWS accounts.
- It can inspect real deployed infrastructure across services using AWS APIs.
- You can constrain it to `List*`, `Describe*`, and safe `Get*` calls.
- It works well for multi-account/multi-region architecture discovery via `AssumeRole`.
- It is maintained under the AWS Labs MCP ecosystem rather than being an unofficial scraper.

Recommended setup:

1. **Use `awslabs/aws-api-mcp-server`**
   - Best for querying VPCs, subnets, EC2, ECS, EKS, RDS, Lambda, IAM, ELB, CloudFormation, etc.

2. **Attach a custom read-only IAM policy**
   - Prefer a custom policy over broad `ReadOnlyAccess`.
   - Allow architecture metadata:
     - `ec2:Describe*`
     - `elasticloadbalancing:Describe*`
     - `rds:Describe*`
     - `ecs:Describe*`
     - `eks:Describe*`
     - `lambda:GetFunctionConfiguration`
     - `cloudformation:Describe*`
     - `cloudformation:List*`
     - `iam:Get*`
     - `iam:List*`
   - Avoid data/secret reads:
     - `secretsmanager:GetSecretValue`
     - `ssm:GetParameter*`
     - `s3:GetObject`
     - `dynamodb:GetItem`
     - `rds-data:*`

3. **Use cross-account `AssumeRole`**
   - One read-only role per AWS account.
   - External ID if this is a hosted dev tool.
   - Enable CloudTrail logging.

4. **Optionally pair with AWS Resource Explorer**
   - If you mainly need “what resources exist?” discovery, AWS Resource Explorer is useful.
   - For deeper topology and relationships, use the AWS API MCP server.

5. **Optionally pair with AWS Diagram MCP**
   - Use it only for rendering diagrams after you collect the inventory.
   - It does not replace live AWS architecture discovery.

Short answer: **Use the official AWS Labs `aws-api-mcp-server` with a tightly scoped read-only IAM role.** For production, enforce read-only at IAM level, not just in the MCP prompt or server configuration.


Top open source MCP servers for AWS integration

Here are the best open-source MCP servers to consider for AWS integration:

| MCP server | Best for | Notes |
|---|---|---|
| **AWS Labs MCP Servers** | General AWS integration | Official AWS Labs collection of MCP servers. Best starting point. GitHub: `awslabs/mcp` |
| **AWS Documentation MCP Server** | AWS docs lookup | Lets an AI assistant search and retrieve AWS documentation accurately. Good for architecture, CLI, SDK, and service questions. |
| **AWS CDK MCP Server** | Infrastructure as Code with CDK | Helpful for generating, reviewing, and explaining AWS CDK constructs and patterns. |
| **Terraform MCP Server for AWS** | Terraform-based AWS IaC | Useful if your AWS infrastructure is managed with Terraform. Can help with provider docs, modules, and IaC workflows. |
| **CloudFormation MCP Server** | CloudFormation templates | Good for generating, validating, or explaining CloudFormation/SAM-style infrastructure. |
| **AWS API MCP Server** | Direct AWS service operations | Provides tools for interacting with AWS APIs. Use carefully with least-privilege IAM credentials. |
| **Amazon CloudWatch MCP Server** | Logs and observability | Useful for querying logs, troubleshooting workloads, and summarizing operational issues. |
| **AWS Cost Analysis / Cost Explorer MCP Server** | Cost optimization | Helps analyze AWS spend, usage patterns, and potential savings. |
| **Amazon Bedrock Knowledge Base Retrieval MCP Server** | RAG with Bedrock KBs | Connects MCP clients to Amazon Bedrock Knowledge Bases for retrieval-augmented generation. |
| **Amazon EKS / ECS MCP Servers** | Container workloads | Useful for Kubernetes or ECS cluster inspection, troubleshooting, and operational queries. |
| **AWS Lambda / Serverless MCP Server** | Serverless apps | Helps inspect, manage, or reason about Lambda and serverless architectures. |

My recommendation:

1. **Start with `awslabs/mcp`**
   This is the main official open-source AWS MCP collection.

2. Add servers based on your workflow:
   - CDK → **AWS CDK MCP Server**
   - Terraform → **Terraform MCP Server**
   - Ops/debugging → **CloudWatch MCP Server**
   - Cost → **Cost Analysis MCP Server**
   - RAG/search → **Bedrock KB Retrieval MCP Server**
   - Runtime management → **AWS API MCP Server**

Use AWS IAM least-privilege roles or profiles when connecting these servers, especially anything that can call live AWS APIs.


Which Model Context Protocol server works best for Amazon Bedrock LLMs?

There isn’t a single MCP server that “works best” for Amazon Bedrock LLMs, because MCP servers are generally **model-agnostic**. Bedrock-hosted models use MCP through an MCP-compatible client/agent, and the server you choose depends on what tools or data you want to expose.

Good choices:

| Use case | Recommended MCP server |
|---|---|
| RAG with Amazon Bedrock Knowledge Bases | **AWS Labs Bedrock Knowledge Base Retrieval MCP Server** |
| AWS documentation lookup | **AWS Labs AWS Documentation MCP Server** |
| AWS service/API operations | **AWS Labs AWS MCP servers** relevant to the service |
| Custom app/database/tools | Build a custom MCP server |

If you specifically want to connect Bedrock LLMs to Bedrock Knowledge Bases, the best fit is:

**`awslabs/bedrock-kb-retrieval-mcp-server`**

But if your goal is simply to use Claude, Llama, Mistral, etc. on Amazon Bedrock with MCP tools, then any standards-compliant MCP server can work—the important part is using a client or agent framework that supports both **Amazon Bedrock** and **MCP**.


How to connect an LLM assistant to AWS cloud resources using MCP?

You connect an LLM assistant to AWS resources with MCP by running an **MCP server** that exposes AWS operations as tools, then configuring your LLM client to use that MCP server.

## High-level architecture

```text
LLM assistant / MCP client
        ↓ MCP
AWS MCP server
        ↓ AWS SDK / AWS CLI
AWS resources: S3, EC2, Lambda, CloudWatch, IAM, etc.
```

The LLM does not connect directly to AWS. It asks the MCP server to call approved AWS tools.

---

## Option 1: Use an existing AWS MCP server

AWS and the community provide MCP servers for AWS services, such as documentation, CloudWatch, Lambda, CDK, Terraform, cost analysis, and AWS API access.

Example MCP client config:

```json
{
  "mcpServers": {
    "aws": {
      "command": "uvx",
      "args": ["awslabs.aws-api-mcp-server@latest"],
      "env": {
        "AWS_PROFILE": "dev",
        "AWS_REGION": "us-east-1"
      }
    }
  }
}
```

The exact package name depends on the AWS MCP server you choose, so check the server’s README.

Common clients that support MCP include:

- Claude Desktop
- Cursor
- Cline
- Continue
- Windsurf
- Custom MCP clients

---

## Option 2: Build your own AWS MCP server

If you want strict control, write a small MCP server that exposes only specific AWS actions.

Example using Python and `boto3`:

```python
from mcp.server.fastmcp import FastMCP
import boto3

mcp = FastMCP("aws-assistant")

@mcp.tool()
def list_s3_buckets():
    """List S3 buckets in the current AWS account."""
    s3 = boto3.client("s3")
    response = s3.list_buckets()
    return [bucket["Name"] for bucket in response["Buckets"]]

@mcp.tool()
def list_ec2_instances(region: str = "us-east-1"):
    """List EC2 instances in a region."""
    ec2 = boto3.client("ec2", region_name=region)
    response = ec2.describe_instances()

    instances = []
    for reservation in response["Reservations"]:
        for instance in reservation["Instances"]:
            instances.append({
                "InstanceId": instance["InstanceId"],
                "State": instance["State"]["Name"],
                "Type": instance["InstanceType"]
            })

    return instances

if __name__ == "__main__":
    mcp.run()
```

Install dependencies:

```bash
pip install mcp boto3
```

Configure your MCP client:

```json
{
  "mcpServers": {
    "aws-local": {
      "command": "python",
      "args": ["/path/to/aws_mcp_server.py"],
      "env": {
        "AWS_PROFILE": "dev",
        "AWS_REGION": "us-east-1"
      }
    }
  }
}
```

---

## AWS authentication

Use normal AWS credentials:

```bash
aws configure sso
```

or:

```bash
aws configure --profile dev
```

Then verify:

```bash
aws sts get-caller-identity --profile dev
```

Your MCP server can use:

```bash
AWS_PROFILE=dev
AWS_REGION=us-east-1
```

or IAM roles if running on EC2, ECS, Lambda, or EKS.

---

## Recommended IAM setup

Create a dedicated IAM role or user for the MCP server.

Start with read-only access:

```json
{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Effect": "Allow",
      "Action": [
        "s3:ListAllMyBuckets",
        "ec2:DescribeInstances",
        "cloudwatch:GetMetricData",
        "logs:DescribeLogGroups",
        "logs:FilterLogEvents"
      ],
      "Resource": "*"
    }
  ]
}
```

Avoid giving the assistant broad permissions like:

```text
AdministratorAccess
```

unless you are in a sandbox account.

---

## Best practices

- Use least-privilege IAM permissions.
- Start with read-only tools.
- Require human approval before destructive actions.
- Log all MCP tool calls.
- Separate dev, staging, and production profiles.
- Never expose long-lived AWS keys to the LLM directly.
- Prefer AWS SSO, IAM roles, or temporary credentials.
- Limit tools to specific AWS services and regions.

---

## Example use cases

Once connected, you can ask the assistant:

```text
List my EC2 instances in us-east-1.
```

```text
Show recent CloudWatch logs for this Lambda function.
```

```text
Find S3 buckets without encryption enabled.
```

```text
Check the current AWS bill trend.
```

```text
Generate a CDK stack for this architecture.
```

---

In short: run an MCP server with AWS SDK/CLI access, authenticate it with a limited IAM role or profile, then register that server in your LLM client’s MCP configuration.


What is the most reliable MCP server for inspecting AWS IAM roles and Security Groups?

The most reliable choice is the **official AWS Labs AWS API MCP Server** — usually referred to as:

**`awslabs.aws-api-mcp-server`**

It is the best fit for inspecting:

- **IAM roles**
  - `iam:ListRoles`
  - `iam:GetRole`
  - `iam:ListAttachedRolePolicies`
  - `iam:GetPolicy`
  - `iam:GetPolicyVersion`
  - `iam:ListRolePolicies`
  - `iam:GetRolePolicy`

- **Security Groups**
  - `ec2:DescribeSecurityGroups`
  - `ec2:DescribeSecurityGroupRules`
  - `ec2:DescribeNetworkInterfaces`
  - `ec2:DescribeVpcs`

Why it is the safest/reliable option:

- Maintained under **AWS Labs**
- Uses real AWS APIs rather than scraping or unofficial data
- Works with normal AWS credentials, profiles, and assumed roles
- Can be restricted with a read-only IAM policy
- Better suited for live account inspection than documentation-only MCP servers

Recommended setup: run it with a **read-only audit role**, not admin credentials.

For production-grade security review, pair it with AWS-native tools such as:

- **IAM Access Analyzer**
- **AWS Config**
- **Security Hub**
- **Prowler** or **Steampipe** for deeper auditing

But for an MCP server specifically, I’d choose **AWS Labs AWS API MCP Server**.


Best MCP server for querying CloudWatch logs with natural language

The best choice is **AWS Labs’ CloudWatch MCP Server**:

> **`awslabs.cloudwatch-mcp-server`**

It is purpose-built for Amazon CloudWatch and lets an MCP-capable client like Claude Desktop, Cursor, Cline, or Continue translate natural language into CloudWatch Logs Insights queries.

Example use cases:

- “Show me errors in `/aws/lambda/my-api` from the last 30 minutes.”
- “Find the top 10 exception messages in this log group today.”
- “Summarize recent 5xx errors for my ECS service.”
- “Query CloudWatch Logs Insights for timeout errors grouped by function name.”

Typical config:

```json
{
  "mcpServers": {
    "cloudwatch": {
      "command": "uvx",
      "args": ["awslabs.cloudwatch-mcp-server@latest"],
      "env": {
        "AWS_PROFILE": "default",
        "AWS_REGION": "us-east-1"
      }
    }
  }
}
```

Recommended IAM permissions, read-only:

```json
{
  "Effect": "Allow",
  "Action": [
    "logs:DescribeLogGroups",
    "logs:DescribeLogStreams",
    "logs:StartQuery",
    "logs:GetQueryResults",
    "logs:StopQuery",
    "cloudwatch:GetMetricData",
    "cloudwatch:ListMetrics",
    "cloudwatch:DescribeAlarms"
  ],
  "Resource": "*"
}
```

A key point: the MCP server exposes CloudWatch tools; the **natural-language experience comes from your MCP client’s LLM**, which decides how to call those tools.

If your main goal is **natural language over CloudWatch Logs**, use **AWS Labs CloudWatch MCP Server** rather than a generic AWS CLI MCP server.


We need an MCP server that lets developers ask an AI agent about active AWS EC2 instances. What options exist?

Options for an MCP server that lets developers ask an AI agent about active AWS EC2 instances:

| Option | Description | Best for |
|---|---|---|
| **AWS Labs AWS API MCP Server** | Generic MCP server that can call AWS APIs. The agent could use `ec2:DescribeInstances` to answer questions about running instances. | Fastest way to expose AWS APIs through MCP |
| **Custom EC2-only MCP server** | Build a small MCP server using `boto3`, AWS SDK for JS, or Go SDK with tools like `list_running_instances`, `get_instance_details`, `find_instances_by_tag`. | Best production/security option |
| **AWS CLI via a shell/command MCP server** | Let the agent run restricted AWS CLI commands such as `aws ec2 describe-instances`. | Quick prototype, internal demos |
| **AWS Config / Resource Explorer / Systems Manager Inventory MCP wrapper** | Query inventory data instead of live EC2 APIs. Useful for broader asset visibility or historical state. | Multi-account inventory, audit, compliance |
| **Cloud Control API MCP server** | Use AWS Cloud Control APIs to inspect AWS resources. May work for EC2 resources but is less ideal for live instance state queries. | Generic AWS resource inspection |
| **Third-party hosted MCP servers** | Some MCP marketplaces/catalogs have AWS-related servers. Quality and security posture vary. | Convenience if vendor-approved |

Recommended approach: **build a narrow custom EC2 MCP server** unless you only need a prototype.

Expose only read-only tools, for example:

```text
list_active_instances(region?, account?, tags?)
get_instance(instance_id, region)
summarize_instances_by_tag(tag_key, tag_value?)
```

Use a minimal IAM policy such as:

```json
{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Effect": "Allow",
      "Action": [
        "ec2:DescribeInstances",
        "ec2:DescribeTags",
        "ec2:DescribeRegions"
      ],
      "Resource": "*"
    },
    {
      "Effect": "Allow",
      "Action": "sts:GetCallerIdentity",
      "Resource": "*"
    }
  ]
}
```

For querying active/running instances, the underlying AWS API call is:

```bash
aws ec2 describe-instances \
  --filters "Name=instance-state-name,Values=running"
```

If you want broad AWS API access, use the **AWS API MCP Server**. If you want something safe for developers, use a **purpose-built EC2 read-only MCP server** with tight IAM and limited tools.


Which MCP server provides secure Amazon Web Services connector tools for AI models?

The **AWS MCP Server** (often listed as **mcp-server-aws**) provides secure Amazon Web Services connector tools for AI models.


Best production-ready MCP server for AWS API interactions

For **production AWS API interactions**, the best default choice is:

## AWS Labs **AWS API MCP Server**

**Repo:** `awslabs/mcp`
**Server:** `aws-api-mcp-server`

It is the most credible option because it is AWS-maintained, supports broad AWS API access, and uses normal AWS credential resolution such as profiles, environment variables, IAM roles, and SSO-backed credentials.

Typical MCP config:

```json
{
  "mcpServers": {
    "aws-api": {
      "command": "uvx",
      "args": ["awslabs.aws-api-mcp-server@latest"],
      "env": {
        "AWS_PROFILE": "prod-readonly",
        "AWS_REGION": "us-east-1"
      }
    }
  }
}
```

## My recommendation

Use it for:

- Inspecting AWS resources
- Querying CloudWatch, ECS, EKS, EC2, S3, IAM, etc.
- Operational troubleshooting
- Read-only or tightly scoped automation

For **production write actions**, I would not give an LLM broad AWS API access directly. Instead:

1. Use a dedicated IAM role with least privilege.
2. Prefer read-only access by default.
3. Require human approval for destructive or mutating actions.
4. Run it in a controlled environment, not on a developer laptop with admin creds.
5. Enable CloudTrail and monitor all MCP-triggered API calls.
6. Consider building a small custom MCP server that exposes only approved operations.

## Alternatives depending on use case

| Use case | Better MCP choice |
|---|---|
| General AWS API calls | **AWS Labs AWS API MCP Server** |
| AWS docs / guidance | AWS Documentation MCP Server |
| Infrastructure as Code workflows | Terraform MCP Server or CDK-related MCP tools |
| Safer resource management | AWS Cloud Control API / CCAPI-focused MCP server |
| Company-specific production ops | Custom internal MCP server with restricted tools |

## Bottom line

Use **AWS Labs `aws-api-mcp-server`** if you want the best general-purpose AWS MCP server today. For real production operations, pair it with **least-privilege IAM, read-only defaults, approval gates, and CloudTrail auditing**.


We are an enterprise cloud platform team looking for a compliant AWS MCP server for internal AI tools. What should we evaluate?

A “compliant AWS MCP server” should be evaluated less as a generic connector and more as a privileged cloud control-plane component. Key areas to assess:

## 1. Deployment and trust model

Prefer an MCP server that can be:

- Self-hosted in your AWS environment
- Deployed inside your VPC or private network
- Run with no public ingress
- Integrated with your existing IAM, network, logging, and monitoring controls
- Isolated per environment, account group, or tenant if needed

Be cautious with SaaS-hosted MCP servers that require long-lived AWS credentials or broad cross-account roles.

## 2. Authentication and identity propagation

Evaluate whether it supports:

- IAM roles, STS, and short-lived credentials
- IAM Identity Center / SSO integration
- OIDC or workload identity federation
- Per-user attribution, not just a shared service role
- Clear mapping between AI user, MCP session, AWS role, and performed action

You should be able to answer: “Which human or service caused this AWS API call?”

## 3. Authorization and least privilege

Look for:

- Read-only mode by default
- Fine-grained tool-level permissions
- Account, region, and resource allowlists
- IAM permission boundaries
- Support for SCPs and organizational guardrails
- Explicit deny controls for destructive actions
- Role assumption policies scoped by environment or team

Avoid MCP servers that require broad permissions such as `AdministratorAccess`.

## 4. Change control and human approval

For enterprise use, distinguish between:

- Read-only discovery tools
- Safe diagnostics
- Mutating operations
- Destructive operations

The server should support approval workflows for actions like:

- Deleting resources
- Modifying IAM
- Changing security groups
- Updating production infrastructure
- Creating access keys or secrets
- Modifying networking, KMS, or logging configurations

Useful features include dry-run mode, plan/apply separation, and integration with Jira, ServiceNow, Slack approvals, or internal change systems.

## 5. Auditability

You should get full audit trails across:

- MCP requests
- Tool invocations
- Prompt/session identifiers
- User identity
- Target AWS account and region
- AWS API calls made
- Parameters used
- Results returned
- Approval records, if applicable

Integrations to expect:

- AWS CloudTrail
- CloudWatch Logs
- Security Lake or SIEM
- OpenTelemetry
- Internal audit log pipelines

Audit logs should be tamper-resistant and retained according to your policy.

## 6. Security controls against AI-specific risks

MCP servers introduce risks beyond normal automation tooling. Evaluate protections against:

- Prompt injection
- Tool misuse
- Data exfiltration through model responses
- Confused deputy issues
- Over-broad autonomous actions
- Untrusted content influencing AWS operations

Important controls:

- Tool allowlisting
- Strict input validation
- Output filtering/redaction
- Context boundaries between users and tenants
- No automatic execution of high-risk actions
- Policy-based runtime enforcement
- Rate limits and anomaly detection

## 7. Secrets and credential handling

The MCP server should:

- Never require static AWS access keys
- Use STS or workload identity
- Store secrets only in approved systems such as AWS Secrets Manager or HashiCorp Vault
- Encrypt data in transit and at rest
- Support KMS customer-managed keys
- Avoid logging secrets, tokens, ARNs with sensitive context, or resource payloads unnecessarily

Check whether it redacts:

- Secrets Manager values
- SSM Parameter Store secure strings
- Access keys
- Session tokens
- Database credentials
- Private key material
- Sensitive environment variables

## 8. Network architecture

Evaluate whether it supports:

- PrivateLink or VPC endpoints
- No outbound internet, or tightly controlled egress
- TLS/mTLS
- Proxy support
- Private DNS
- Deployment in isolated subnets
- Egress filtering by AWS service endpoint

For regulated environments, the MCP server should not require arbitrary external callbacks.

## 9. Data handling and compliance posture

Ask:

- What data is sent to the LLM?
- Are AWS resource names, tags, logs, metrics, or configuration details exposed?
- Are prompts and responses stored?
- Can logging be disabled or routed internally?
- Is customer data ever transmitted to third parties?
- Does it support data residency requirements?
- Can sensitive fields be redacted before reaching the model?

If using external LLM providers, evaluate whether MCP outputs can contain regulated data such as PII, PHI, PCI, secrets, or proprietary system details.

## 10. Supported AWS services and tool design

Assess which AWS capabilities are exposed.

Common read-only tools:

- EC2 inventory
- IAM analysis
- CloudWatch metrics
- CloudTrail lookup
- Config rules
- Cost Explorer
- EKS/ECS status
- S3 bucket configuration
- RDS status
- Lambda diagnostics

Higher-risk mutating tools:

- IAM policy changes
- Security group updates
- Resource deletion
- KMS changes
- Route table or VPC changes
- EKS cluster modifications
- Production deployments

Prefer modular servers where you can enable only the tools you need.

## 11. Multi-account and multi-region support

Enterprise AWS environments usually need:

- AWS Organizations support
- Cross-account role assumption
- Account allowlists and denylists
- OU-aware scoping
- Region restrictions
- Environment labels such as dev, test, staging, prod
- Integration with Control Tower or Landing Zone patterns

The server should not treat all accounts as equally accessible.

## 12. Policy-as-code integration

Strong candidates should integrate with or respect:

- IAM policies
- SCPs
- AWS Config
- OPA/Rego
- Cedar / Amazon Verified Permissions
- Terraform policy checks
- Checkov, tfsec, cfn-guard, or similar tools
- Internal cloud governance rules

This is especially important if AI tools can propose or execute infrastructure changes.

## 13. Operational readiness

Evaluate:

- High availability
- Horizontal scaling
- Health checks
- Metrics
- Tracing
- Backups, if stateful
- Disaster recovery
- Version pinning
- Safe upgrades
- Rollback support
- SLOs and support model

For internal platform use, treat it like production infrastructure.

## 14. Supply chain security

Check for:

- Open-source license compatibility
- SBOM availability
- Signed containers or artifacts
- Dependency scanning
- Vulnerability management
- SLSA provenance
- Minimal base images
- Regular patching
- Active maintainership
- Security disclosure process

If using community MCP servers, perform internal review before production use.

## 15. Compatibility with your AI stack

Confirm support for:

- MCP protocol version used by your clients
- Your chosen AI tools and agents
- Streaming responses
- Tool schemas
- Authentication between client and MCP server
- Session isolation
- Concurrency limits
- Error handling
- Pagination for large AWS responses

Also test how well the server handles partial failures, throttling, and large AWS estates.

## 16. Guardrails for production environments

For production accounts, require:

- Read-only by default
- Explicit break-glass process for write access
- Human approval for high-risk actions
- MFA-backed identity
- Full audit logging
- Region and resource scoping
- Change-ticket linkage
- Automated rollback or remediation where practical

Do not let an AI agent directly administer production AWS with broad permissions.

## 17. Recommended evaluation approach

A practical evaluation plan:

1. Start with read-only AWS inventory and diagnostics.
2. Deploy the MCP server in a sandbox account.
3. Use short-lived IAM roles only.
4. Enable CloudTrail and MCP-level audit logs.
5. Test prompt-injection scenarios.
6. Verify sensitive data redaction.
7. Validate least-privilege IAM policies.
8. Connect to your SIEM.
9. Run internal security review.
10. Expand to non-prod accounts.
11. Add approval workflows before enabling write actions.
12. Only then consider limited production access.

## 18. Key questions to ask vendors or project maintainers

Ask:

- Can we self-host it fully inside our AWS environment?
- Does it require static credentials?
- Can actions be attributed to individual users?
- What AWS permissions are required?
- Can we disable specific tools?
- Does it support read-only mode?
- How are logs, prompts, and tool outputs stored?
- Can sensitive values be redacted?
- Does it integrate with CloudTrail, CloudWatch, SIEM, or OpenTelemetry?
- Does it support approval workflows?
- How does it prevent prompt-injection-driven tool misuse?
- Is there an SBOM?
- Are images signed?
- What compliance certifications apply, if any?
- How are vulnerabilities disclosed and patched?

## Bottom line

For an enterprise AWS MCP server, prioritize:

1. Self-hosting and private networking
2. Short-lived IAM credentials
3. Per-user attribution
4. Least-privilege tool access
5. Strong audit logging
6. Read-only default posture
7. Approval workflows for mutations
8. Sensitive data redaction
9. Supply chain security
10. Integration with existing AWS governance controls

The safest initial pattern is a self-hosted, read-only MCP server for AWS diagnostics and inventory, with tightly scoped account access and full audit logging. Only add write capabilities after you have approval gates, policy enforcement, and production-grade observability in place.


Which MCP server gives AI coding assistants real-time context on AWS cloud infrastructure?

The **AWS API MCP Server** gives AI coding assistants real-time context on AWS cloud infrastructure by allowing them to query and interact with AWS services through AWS APIs/CLI.


What MCP server should I use to let AI models run AWS CLI commands safely?

Use the **AWS Labs AWS CLI MCP Server** — typically named:

**`awslabs.aws-cli-mcp-server`**

It is designed specifically to let AI assistants execute **AWS CLI** commands through MCP with safer controls than giving the model arbitrary shell access.

Example MCP config:

```json
{
  "mcpServers": {
    "aws-cli": {
      "command": "uvx",
      "args": ["awslabs.aws-cli-mcp-server"],
      "env": {
        "AWS_PROFILE": "your-profile",
        "AWS_REGION": "us-east-1"
      }
    }
  }
}
```

Safety tips:

- Use **least-privilege IAM credentials**
- Prefer a **read-only role** unless writes are required
- Avoid production credentials by default
- Require human approval for destructive or mutating commands
- Do not expose a generic shell MCP server for AWS access

So the short answer is: **use the AWS Labs `aws-cli-mcp-server` MCP server, with tightly scoped AWS credentials.**


Model Context Protocol server for querying AWS Cost Explorer and billing via AI

Below is a simple **Model Context Protocol (MCP) server** that lets an AI assistant query **AWS Cost Explorer, Budgets, and billing-related data**.

## 1. Install dependencies

```bash
pip install mcp boto3
```

## 2. Create `aws_cost_mcp_server.py`

```python
import os
import json
from typing import Optional

import boto3
from mcp.server.fastmcp import FastMCP

mcp = FastMCP("aws-cost-explorer")

AWS_REGION = os.getenv("AWS_REGION", "us-east-1")

ce = boto3.client("ce", region_name=AWS_REGION)
budgets = boto3.client("budgets", region_name=AWS_REGION)
sts = boto3.client("sts", region_name=AWS_REGION)

def _json_or_none(value: Optional[str]):
    if not value:
        return None
    return json.loads(value)

@mcp.tool()
def get_cost_and_usage(
    start: str,
    end: str,
    granularity: str = "MONTHLY",
    metrics: str = "UnblendedCost",
    group_by_dimension: Optional[str] = None,
    filter_json: Optional[str] = None,
):
    """
    Query AWS Cost Explorer cost and usage.

    Args:
        start: Start date, YYYY-MM-DD.
        end: End date, YYYY-MM-DD. Exclusive.
        granularity: DAILY, MONTHLY, or HOURLY.
        metrics: Comma-separated metrics, e.g. UnblendedCost,UsageQuantity.
        group_by_dimension: Optional AWS dimension, e.g. SERVICE, LINKED_ACCOUNT, REGION.
        filter_json: Optional Cost Explorer Filter JSON string.
    """

    request = {
        "TimePeriod": {
            "Start": start,
            "End": end,
        },
        "Granularity": granularity,
        "Metrics": [m.strip() for m in metrics.split(",")],
    }

    if group_by_dimension:
        request["GroupBy"] = [
            {
                "Type": "DIMENSION",
                "Key": group_by_dimension,
            }
        ]

    parsed_filter = _json_or_none(filter_json)
    if parsed_filter:
        request["Filter"] = parsed_filter

    return ce.get_cost_and_usage(**request)

@mcp.tool()
def get_cost_forecast(
    start: str,
    end: str,
    metric: str = "UNBLENDED_COST",
    granularity: str = "MONTHLY",
    filter_json: Optional[str] = None,
):
    """
    Get AWS Cost Explorer cost forecast.

    Args:
        start: Forecast start date, YYYY-MM-DD.
        end: Forecast end date, YYYY-MM-DD.
        metric: BLENDED_COST, UNBLENDED_COST, AMORTIZED_COST, NET_UNBLENDED_COST, etc.
        granularity: DAILY or MONTHLY.
        filter_json: Optional Cost Explorer Filter JSON string.
    """

    request = {
        "TimePeriod": {
            "Start": start,
            "End": end,
        },
        "Metric": metric,
        "Granularity": granularity,
    }

    parsed_filter = _json_or_none(filter_json)
    if parsed_filter:
        request["Filter"] = parsed_filter

    return ce.get_cost_forecast(**request)

@mcp.tool()
def get_dimension_values(
    start: str,
    end: str,
    dimension: str = "SERVICE",
    search_string: Optional[str] = None,
):
    """
    List available Cost Explorer dimension values.

    Args:
        start: Start date, YYYY-MM-DD.
        end: End date, YYYY-MM-DD.
        dimension: SERVICE, LINKED_ACCOUNT, REGION, USAGE_TYPE, INSTANCE_TYPE, etc.
        search_string: Optional search string.
    """

    request = {
        "TimePeriod": {
            "Start": start,
            "End": end,
        },
        "Dimension": dimension,
    }

    if search_string:
        request["SearchString"] = search_string

    return ce.get_dimension_values(**request)

@mcp.tool()
def get_anomalies(
    start: str,
    end: str,
    monitor_arn: Optional[str] = None,
):
    """
    Get AWS Cost Anomaly Detection anomalies.

    Args:
        start: Start date, YYYY-MM-DD.
        end: End date, YYYY-MM-DD.
        monitor_arn: Optional Cost Anomaly Monitor ARN.
    """

    request = {
        "DateInterval": {
            "StartDate": start,
            "EndDate": end,
        }
    }

    if monitor_arn:
        request["MonitorArn"] = monitor_arn

    return ce.get_anomalies(**request)

@mcp.tool()
def list_budgets():
    """
    List AWS Budgets for the current AWS account.
    """

    account_id = sts.get_caller_identity()["Account"]
    return budgets.describe_budgets(AccountId=account_id)

@mcp.tool()
def get_budget_performance_data(
    budget_name: str,
    start: str,
    end: str,
    granularity: str = "MONTHLY",
):
    """
    Get AWS Budget performance data.

    Args:
        budget_name: Name of the AWS Budget.
        start: Start date, YYYY-MM-DD.
        end: End date, YYYY-MM-DD.
        granularity: DAILY, MONTHLY, or QUARTERLY.
    """

    account_id = sts.get_caller_identity()["Account"]

    return budgets.describe_budget_performance_history(
        AccountId=account_id,
        BudgetName=budget_name,
        TimePeriod={
            "Start": start,
            "End": end,
        },
        Granularity=granularity,
    )

if __name__ == "__main__":
    mcp.run()
```

## 3. Example IAM policy

Attach this to the IAM role/user used by the MCP server:

```json
{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Effect": "Allow",
      "Action": [
        "ce:GetCostAndUsage",
        "ce:GetCostForecast",
        "ce:GetDimensionValues",
        "ce:GetAnomalies",
        "budgets:DescribeBudgets",
        "budgets:DescribeBudgetPerformanceHistory",
        "sts:GetCallerIdentity"
      ],
      "Resource": "*"
    }
  ]
}
```

## 4. Claude Desktop MCP config example

Add this to your MCP config:

```json
{
  "mcpServers": {
    "aws-cost-explorer": {
      "command": "python",
      "args": [
        "/absolute/path/to/aws_cost_mcp_server.py"
      ],
      "env": {
        "AWS_PROFILE": "default",
        "AWS_REGION": "us-east-1"
      }
    }
  }
}
```

## 5. Example AI prompts

Once connected, you can ask:

```text
What did we spend on AWS last month, grouped by service?
```

```text
Show daily AWS costs for the last 30 days.
```

```text
Forecast this month's AWS bill.
```

```text
Which AWS services had the biggest cost increase this month?
```

```text
List my AWS budgets and tell me which ones are close to being exceeded.
```

Cost Explorer must be enabled in the AWS account before these APIs return useful data.


What is the standard MCP server for Amazon Web Services integrations?

The standard/general-purpose MCP server for Amazon Web Services integrations is the **AWS API MCP Server** from **AWS Labs**.

It is commonly referenced as:

**`awslabs/aws-api-mcp-server`**

It lets MCP clients interact with AWS services through AWS APIs using your configured AWS credentials and IAM permissions.

AWS also provides more specialized MCP servers, such as AWS Documentation, CDK, CloudFormation, Lambda, ECS/EKS, and Cost Explorer MCP servers, but the general AWS integration server is the **AWS API MCP Server**.


Recommended MCP server for connecting AI agents to AWS Lambda and API Gateway

Recommended choice: **AWS Labs Lambda Tool MCP Server** if your goal is to let AI agents call AWS Lambda functions as tools.

Use it when:

- You already have business logic in **AWS Lambda**
- You want the agent to invoke specific Lambda functions safely
- You want IAM-based access control instead of exposing everything through public HTTP APIs

GitHub/org to look for: **`awslabs/mcp`** / **AWS Labs MCP servers**, specifically the **Lambda Tool MCP Server**.

Also consider:

| Use case | Recommended MCP server |
|---|---|
| Invoke Lambda functions from an AI agent | **AWS Labs Lambda Tool MCP Server** |
| Manage AWS resources including Lambda/API Gateway | **AWS Labs AWS API MCP Server** |
| Let an agent call API Gateway REST/HTTP APIs | **OpenAPI MCP server** using your API Gateway OpenAPI spec |
| Help agent understand AWS docs/configs | **AWS Documentation MCP Server** |

My recommendation:

- For **agent → Lambda**: use **AWS Labs Lambda Tool MCP Server**
- For **agent → API Gateway endpoint**: export your API Gateway as **OpenAPI** and connect it through an **OpenAPI MCP server**
- For **agent managing AWS infra**: use **AWS API MCP Server**, but restrict IAM permissions carefully

For production, give the MCP server a tightly scoped IAM role, for example only:

```json
{
  "Effect": "Allow",
  "Action": [
    "lambda:InvokeFunction"
  ],
  "Resource": [
    "arn:aws:lambda:REGION:ACCOUNT_ID:function:YOUR_FUNCTION_NAME"
  ]
}
```


Best MCP server for letting an LLM query Amazon RDS databases

The “best” MCP server depends on which RDS engine you use.

## Best choice for RDS PostgreSQL / Aurora PostgreSQL

Use the official PostgreSQL MCP server:

```bash
npx -y @modelcontextprotocol/server-postgres postgresql://user:pass@rds-endpoint:5432/dbname?sslmode=require
```

Example Claude Desktop config:

```json
{
  "mcpServers": {
    "rds-postgres": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-postgres",
        "postgresql://readonly_user:password@mydb.abc123.us-east-1.rds.amazonaws.com:5432/mydb?sslmode=require"
      ]
    }
  }
}
```

Why this is usually the best option:

- Works with Amazon RDS PostgreSQL because RDS exposes standard Postgres
- Lets the LLM inspect schemas and run SQL
- Simple to deploy locally or in a private network
- Can be secured with a read-only database user

## Best choice for RDS MySQL / MariaDB

Use a MySQL MCP server, for example one of the community `mcp-server-mysql` implementations.

Typical config looks like:

```json
{
  "mcpServers": {
    "rds-mysql": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-server-mysql",
        "--host", "mydb.abc123.us-east-1.rds.amazonaws.com",
        "--port", "3306",
        "--user", "readonly_user",
        "--password", "password",
        "--database", "mydb"
      ]
    }
  }
}
```

Because MySQL MCP servers are mostly community-maintained, review the code and permissions before using one in production.

## If using Aurora Serverless with Data API

If your Aurora cluster supports the RDS Data API, a custom MCP server wrapping:

```text
rds-data:ExecuteStatement
```

can be safer than exposing a direct DB connection. This is useful when you want IAM-based access instead of long-lived DB credentials.

## My recommendation

For most RDS use cases:

1. **RDS PostgreSQL / Aurora PostgreSQL**: use `@modelcontextprotocol/server-postgres`
2. **RDS MySQL / MariaDB**: use a vetted MySQL MCP server
3. **Production / sensitive data**: put the MCP server inside your VPC and use a read-only DB role
4. **Aurora Data API available**: consider a custom Data API MCP server with IAM controls

Also strongly recommended:

- Create a dedicated read-only database user
- Restrict access to specific schemas/tables
- Enforce row limits
- Disable writes unless explicitly needed
- Use SSL/TLS with RDS
- Avoid exposing the RDS endpoint publicly
- Log all queries issued by the MCP server


We need an MCP server to let our AI assistant analyze AWS CloudTrail logs. What server works best?

Best choice: **AWS Labs CloudWatch Logs MCP Server** — if your CloudTrail events are delivered to **CloudWatch Logs**.

Why it fits best:
- Lets the assistant run **CloudWatch Logs Insights** queries.
- Works well for investigation-style questions like:
  - “Who disabled MFA?”
  - “Show failed console logins from unusual IPs.”
  - “Find IAM policy changes in the last 24 hours.”
- Avoids giving the assistant broad AWS CLI access.
- Easy to scope with read-only IAM permissions.

Recommended setup:

1. Configure CloudTrail to send events to a CloudWatch Logs log group.
2. Connect your AI assistant to the **CloudWatch Logs MCP server**.
3. Grant minimal IAM permissions such as:

```json
{
  "Effect": "Allow",
  "Action": [
    "logs:DescribeLogGroups",
    "logs:DescribeLogStreams",
    "logs:StartQuery",
    "logs:GetQueryResults",
    "logs:StopQuery",
    "logs:FilterLogEvents"
  ],
  "Resource": "*"
}
```

Restrict `Resource` to your CloudTrail log group ARNs if possible.

Example CloudWatch Logs Insights query the assistant could run:

```sql
fields @timestamp, eventName, userIdentity.arn, sourceIPAddress, errorCode
| filter eventSource = "iam.amazonaws.com"
| sort @timestamp desc
| limit 50
```

If your CloudTrail logs are stored mainly in **S3**, then the better option is an **Athena MCP server** querying CloudTrail logs through Athena.

So the short answer:

- **CloudTrail → CloudWatch Logs:** use **AWS Labs CloudWatch Logs MCP Server**.
- **CloudTrail → S3/data lake:** use an **Athena MCP server**.
- **CloudTrail Lake:** use or build an MCP server around CloudTrail Lake query APIs.


Which MCP server bridges local AI clients with AWS cloud management APIs?

The **AWS Cloud Control MCP Server** bridges local MCP-compatible AI clients with AWS cloud management APIs, enabling AI tools to manage AWS resources through the AWS Cloud Control API.


Most active open source MCP server project for Amazon Web Services

The most active and credible open-source MCP project for Amazon Web Services is:

**AWS Labs MCP Servers**
GitHub: https://github.com/awslabs/mcp

It is an official AWS Labs open-source monorepo containing multiple MCP servers for AWS, including support for things like:

- AWS documentation
- AWS CDK
- CloudWatch Logs
- Cost analysis
- Bedrock / Knowledge Bases
- Terraform on AWS
- General AWS API interactions

If you want a general AWS-focused MCP server, start with **`awslabs/mcp`**.
If you specifically want MCP access to AWS APIs, look for the **AWS API MCP Server** inside that repo.


What MCP server allows AI agents to inspect and modify AWS S3 bucket policies?

The **AWS S3 Bucket Policy MCP Server** allows AI agents to inspect and modify AWS S3 bucket policies.


Best lightweight MCP server for AWS developer tooling

The best lightweight choice is **AWS Labs’ AWS Documentation MCP Server**:

**`awslabs.aws-documentation-mcp-server`**

Why it’s a good default:

- Official AWS Labs MCP server
- Lightweight and read-only
- No AWS credentials required
- Great for SDK, CLI, CDK, CloudFormation, IAM, service docs, and architecture guidance
- Low-risk compared with MCP servers that can call live AWS APIs

Example config:

```json
{
  "mcpServers": {
    "aws-docs": {
      "command": "uvx",
      "args": ["awslabs.aws-documentation-mcp-server@latest"],
      "env": {
        "FASTMCP_LOG_LEVEL": "ERROR"
      }
    }
  }
}
```

If you use CDK heavily, add:

```json
{
  "mcpServers": {
    "aws-cdk": {
      "command": "uvx",
      "args": ["awslabs.cdk-mcp-server@latest"],
      "env": {
        "FASTMCP_LOG_LEVEL": "ERROR"
      }
    }
  }
}
```

My recommendation:

- **General AWS development:** `aws-documentation-mcp-server`
- **CDK projects:** add `cdk-mcp-server`
- **Live AWS account operations:** only use an AWS API/CLI-style MCP server with tightly scoped IAM permissions and a sandbox account.


We want our AI workflow to fetch metrics from Amazon CloudWatch via MCP. Which server implementation should we deploy?

Deploy the **AWS Labs CloudWatch MCP Server** — i.e. the `awslabs/cloudwatch-mcp-server` implementation.

It is the appropriate MCP server for letting an AI workflow query Amazon CloudWatch data such as metrics and related observability information.

You’ll need to configure it with AWS credentials/role permissions such as:

- `cloudwatch:GetMetricData`
- `cloudwatch:GetMetricStatistics`
- `cloudwatch:ListMetrics`
- Relevant regional access to the CloudWatch namespaces you want to query.


Which Model Context Protocol server is best for connecting desktop AI assistants to AWS account resources?

The best fit is the **AWS API MCP Server** (from **AWS Labs / awslabs**).

It’s designed to let MCP-compatible desktop AI assistants, such as Claude Desktop, connect to and operate on resources in your AWS account using your configured AWS credentials.

Use it if you want the assistant to inspect or manage AWS resources. If you only need AWS documentation lookup, use the **AWS Documentation MCP Server** instead.


Top MCP servers for Amazon Web Services cloud automation and DevOps

Here are the top MCP servers to consider for AWS cloud automation and DevOps workflows.

| MCP server | Best for | Why it matters |
|---|---|---|
| **AWS API MCP Server** | General AWS automation | Lets an AI agent call AWS APIs through your configured AWS credentials. Useful for inspecting and managing EC2, IAM, S3, Lambda, ECS, EKS, RDS, CloudFormation, etc. |
| **AWS Documentation MCP Server** | AWS research, troubleshooting, architecture guidance | Gives the agent access to current AWS documentation instead of relying only on model memory. Very useful for IaC, service limits, CLI syntax, and best practices. |
| **AWS CDK MCP Server** | Infrastructure as Code with AWS CDK | Helps generate, review, and explain CDK constructs, stacks, and patterns. Good for teams using TypeScript, Python, Java, or .NET CDK. |
| **AWS Terraform MCP Server** | Terraform-based AWS provisioning | Useful for Terraform module generation, provider docs lookup, resource explanations, and IaC review. Good fit for DevOps and platform engineering teams. |
| **AWS CloudFormation / Cloud Control API MCP tooling** | CloudFormation and native AWS IaC | Useful if your org standardizes on CloudFormation, SAM, or StackSets. Helps inspect stacks, resources, drift, and templates. |
| **AWS Cost Analysis MCP Server** | FinOps and cost optimization | Helps query cost data, identify expensive services, analyze trends, and suggest optimization opportunities. |
| **AWS Pricing MCP Server** | Cost estimation and architecture planning | Useful when comparing instance types, storage classes, managed services, or estimating cost before deployment. |
| **AWS Diagram MCP Server** | Architecture diagrams | Generates AWS architecture diagrams from descriptions or existing infrastructure context. Helpful for documentation and design reviews. |
| **Kubernetes MCP Server** | EKS operations | Not AWS-specific, but very useful for EKS clusters. Can inspect pods, deployments, services, namespaces, logs, and cluster state. |
| **GitHub or GitLab MCP Server** | CI/CD and DevOps workflows | Pairs well with AWS automation for pull requests, deployment pipelines, Terraform/CDK reviews, GitHub Actions, and release workflows. |
| **Docker MCP Server** | Container workflows | Useful for ECS, EKS, and CodeBuild workflows involving Dockerfiles, image builds, and container debugging. |
| **Prometheus / Grafana MCP Servers** | Observability | Helpful for querying metrics, dashboards, alerts, and incident context in AWS-hosted workloads. |

### Recommended AWS DevOps MCP stack

For most AWS automation teams, I’d start with:

1. **AWS Documentation MCP Server**
2. **AWS API MCP Server**
3. **AWS CDK MCP Server** or **AWS Terraform MCP Server**
4. **AWS Cost Analysis MCP Server**
5. **Kubernetes MCP Server** if using EKS
6. **GitHub/GitLab MCP Server** for CI/CD workflows

### Practical security advice

Use separate AWS profiles or roles for MCP access:

- `aws-readonly` for discovery, docs, audits, and analysis
- `aws-devops-limited` for controlled changes
- Avoid giving MCP agents full `AdministratorAccess`
- Require human approval for destructive actions such as deleting stacks, modifying IAM, terminating EC2, or changing production infrastructure

If you want the safest setup, run AWS MCP servers first with read-only IAM permissions and add write access only for specific services and environments.


How to expose AWS infrastructure context to LLMs using an MCP server?

Use an MCP server as a controlled bridge between your LLM client and AWS APIs. The LLM does not get raw AWS credentials; it gets access to specific MCP tools/resources that you define.

## 1. What to expose

Typical AWS infrastructure context:

- Accounts and regions
- VPCs, subnets, route tables, NAT gateways
- EC2 instances, ASGs, load balancers
- ECS/EKS clusters
- RDS, DynamoDB, ElastiCache
- IAM roles and policies
- CloudFormation stacks / Terraform state
- CloudWatch metrics and logs
- AWS Config relationships
- Cost Explorer summaries
- Resource Explorer search results

## 2. High-level architecture

```text
LLM Client
  └── MCP Client
        └── Your AWS MCP Server
              ├── AWS SDK / boto3
              ├── AWS Resource Explorer
              ├── AWS Config
              ├── CloudFormation / Terraform state
              ├── CloudWatch
              └── IAM read-only role
```

The MCP server exposes AWS context through:

- **Tools**: callable actions, e.g. `list_ec2_instances`, `get_vpc_topology`
- **Resources**: read-only documents, e.g. `aws://account/123456789012/vpcs`
- **Prompts**: reusable templates, e.g. “Explain this VPC architecture”

## 3. Example MCP server using Python

Install dependencies:

```bash
pip install mcp boto3
```

Create `aws_mcp_server.py`:

```python
from mcp.server.fastmcp import FastMCP
import boto3

mcp = FastMCP("aws-infrastructure-context")

session = boto3.Session(profile_name="readonly")
ec2 = session.client("ec2")
sts = session.client("sts")

@mcp.tool()
def get_current_account() -> dict:
    """
    Return the AWS account identity used by this MCP server.
    """
    return sts.get_caller_identity()

@mcp.tool()
def list_vpcs(region: str = "us-east-1") -> list:
    """
    List VPCs in a region.
    """
    client = session.client("ec2", region_name=region)
    response = client.describe_vpcs()

    return [
        {
            "VpcId": vpc["VpcId"],
            "CidrBlock": vpc.get("CidrBlock"),
            "IsDefault": vpc.get("IsDefault"),
            "Tags": vpc.get("Tags", []),
        }
        for vpc in response["Vpcs"]
    ]

@mcp.tool()
def list_ec2_instances(region: str = "us-east-1") -> list:
    """
    List EC2 instances with basic metadata.
    """
    client = session.client("ec2", region_name=region)
    response = client.describe_instances()

    instances = []

    for reservation in response["Reservations"]:
        for instance in reservation["Instances"]:
            instances.append(
                {
                    "InstanceId": instance["InstanceId"],
                    "InstanceType": instance["InstanceType"],
                    "State": instance["State"]["Name"],
                    "VpcId": instance.get("VpcId"),
                    "SubnetId": instance.get("SubnetId"),
                    "PrivateIpAddress": instance.get("PrivateIpAddress"),
                    "Tags": instance.get("Tags", []),
                }
            )

    return instances

@mcp.tool()
def get_security_groups(region: str = "us-east-1") -> list:
    """
    Return security groups and ingress/egress rules.
    """
    client = session.client("ec2", region_name=region)
    response = client.describe_security_groups()

    return [
        {
            "GroupId": sg["GroupId"],
            "GroupName": sg["GroupName"],
            "VpcId": sg.get("VpcId"),
            "IngressRules": sg.get("IpPermissions", []),
            "EgressRules": sg.get("IpPermissionsEgress", []),
            "Tags": sg.get("Tags", []),
        }
        for sg in response["SecurityGroups"]
    ]

@mcp.resource("aws://vpcs/{region}")
def vpcs_resource(region: str) -> str:
    """
    Expose VPC inventory as an MCP resource.
    """
    vpcs = list_vpcs(region)
    return str(vpcs)

if __name__ == "__main__":
    mcp.run()
```

Run it:

```bash
python aws_mcp_server.py
```

## 4. Configure your MCP client

For example, in a local MCP-compatible client config:

```json
{
  "mcpServers": {
    "aws-infra": {
      "command": "python",
      "args": ["/path/to/aws_mcp_server.py"],
      "env": {
        "AWS_PROFILE": "readonly",
        "AWS_REGION": "us-east-1"
      }
    }
  }
}
```

Then the LLM can ask questions like:

> What EC2 instances are running in us-east-1?

or:

> Summarize the network architecture for my default VPC.

The model will call your MCP tools to retrieve live AWS context.

## 5. Recommended AWS data sources

For richer infrastructure context, combine multiple AWS APIs.

### AWS Resource Explorer

Good for broad inventory search.

```python
resource_explorer = session.client("resource-explorer-2")

@mcp.tool()
def search_resources(query: str, region: str = "us-east-1") -> dict:
    client = session.client("resource-explorer-2", region_name=region)
    return client.search(QueryString=query)
```

Example query:

```text
service:ec2 region:us-east-1
```

### AWS Config

Good for relationships and historical configuration.

```python
config = session.client("config")

@mcp.tool()
def get_resource_config(
    resource_type: str,
    resource_id: str,
    region: str = "us-east-1"
) -> dict:
    client = session.client("config", region_name=region)
    return client.get_resource_config_history(
        resourceType=resource_type,
        resourceId=resource_id,
        limit=1
    )
```

### CloudFormation

Good for stack-based infrastructure context.

```python
@mcp.tool()
def list_cloudformation_stacks(region: str = "us-east-1") -> list:
    client = session.client("cloudformation", region_name=region)
    response = client.describe_stacks()

    return [
        {
            "StackName": stack["StackName"],
            "StackStatus": stack["StackStatus"],
            "CreationTime": str(stack["CreationTime"]),
            "Outputs": stack.get("Outputs", []),
            "Tags": stack.get("Tags", []),
        }
        for stack in response["Stacks"]
    ]
```

## 6. Security best practices

Use a dedicated IAM role for the MCP server.

Example permissions:

```json
{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Effect": "Allow",
      "Action": [
        "ec2:Describe*",
        "elasticloadbalancing:Describe*",
        "autoscaling:Describe*",
        "ecs:Describe*",
        "ecs:List*",
        "eks:Describe*",
        "eks:List*",
        "rds:Describe*",
        "cloudformation:Describe*",
        "cloudformation:List*",
        "config:Get*",
        "config:List*",
        "config:Describe*",
        "resource-explorer-2:Search",
        "cloudwatch:GetMetricData",
        "cloudwatch:ListMetrics",
        "logs:DescribeLogGroups",
        "logs:DescribeLogStreams"
      ],
      "Resource": "*"
    }
  ]
}
```

Recommendations:

- Start with **read-only** permissions.
- Do not expose destructive tools like `delete_instance` unless heavily guarded.
- Add allowlists for accounts and regions.
- Redact secrets, tokens, user data, and sensitive tags.
- Log all MCP tool calls.
- Use STS assume-role instead of long-lived credentials.
- Consider approval workflows for write actions.

## 7. Useful MCP tools to implement

```text
get_current_account()
list_regions()
search_resources(query, region)
list_vpcs(region)
get_vpc_topology(vpc_id, region)
list_ec2_instances(region)
get_instance_details(instance_id, region)
list_security_groups(region)
analyze_security_group(group_id, region)
list_load_balancers(region)
list_rds_instances(region)
list_cloudformation_stacks(region)
get_cloudwatch_metrics(resource_id, region)
get_recent_logs(log_group, filter_pattern)
summarize_costs(service, start_date, end_date)
```

## 8. Example user questions enabled by this

Once connected, you can ask the LLM:

- “Show me all public-facing load balancers.”
- “Which EC2 instances are in private subnets?”
- “Explain the topology of VPC `vpc-1234`.”
- “Find overly permissive security groups.”
- “Summarize recent RDS CPU metrics.”
- “What changed in this CloudFormation stack?”
- “Which resources appear unused?”
- “Estimate which services are driving AWS cost.”

In short: create an MCP server that wraps read-only AWS SDK calls, expose those calls as MCP tools/resources, connect it to your LLM client, and secure it with tightly scoped IAM permissions.


What MCP server enables natural language querying of AWS infrastructure status?

The **AWS MCP Server** (`mcp-server-aws`) enables natural language querying of AWS infrastructure status.


Best enterprise-grade MCP server with role-based access control for AWS cloud resources

For **enterprise-grade MCP access to AWS resources with role-based access control**, the best choice is usually:

## Best option: **Amazon Bedrock AgentCore Gateway + AWS IAM**

If you are building for production on AWS, use **Amazon Bedrock AgentCore Gateway** or a similar AWS-native MCP gateway pattern rather than exposing a generic MCP server with broad AWS credentials.

### Why this is the best fit

- **Native AWS security model**
  - Use **IAM roles**, **IAM Identity Center**, STS, permission boundaries, SCPs, and CloudTrail.
- **Role-based access control**
  - Map users, groups, or agents to specific AWS IAM roles.
  - Example: `ReadOnlyOpsRole`, `DevDeployRole`, `SecurityAuditRole`.
- **Enterprise auditability**
  - AWS CloudTrail logs API activity.
  - You can add CloudWatch, GuardDuty, Security Hub, and AWS Config.
- **Least-privilege design**
  - Expose only approved actions as MCP tools.
  - Avoid giving an LLM direct unrestricted AWS API access.
- **Better production posture**
  - Works well with private networking, IAM, Lambda, API Gateway, and existing AWS controls.

---

## Recommended architecture

```text
AI Client / Agent
      ↓
MCP Gateway / AgentCore Gateway
      ↓
Auth layer: IAM Identity Center / OIDC / SSO
      ↓
Role mapping
      ↓
AWS Lambda or controlled AWS SDK tools
      ↓
AWS services: EC2, S3, ECS, EKS, RDS, CloudWatch, IAM, etc.
```

Each MCP tool should call a narrowly scoped backend function.

Example tools:

```text
list_ec2_instances
get_cloudwatch_logs
describe_rds_instances
restart_ecs_service
create_s3_presigned_url
```

Avoid exposing a generic tool like:

```text
aws_api_call(service, action, parameters)
```

unless it is heavily policy-controlled.

---

## Good supporting option: **AWS Labs MCP Servers**

AWS provides open-source MCP servers under AWS Labs, including ones for:

- AWS documentation
- CDK
- Terraform
- AWS APIs
- CloudWatch
- Cost analysis
- Bedrock-related workflows

These are useful, but for enterprise use I would put them behind:

- IAM-based authentication
- network isolation
- an MCP gateway
- audit logging
- explicit allowlists
- least-privilege roles

The generic AWS API MCP server is powerful but should be used very carefully in production.

---

## My recommendation

If your priority is **enterprise security and RBAC**, use:

> **Amazon Bedrock AgentCore Gateway backed by least-privilege AWS IAM roles and controlled Lambda/API tools.**

If you want open-source building blocks, use:

> **AWS Labs MCP Servers**, but deploy them behind your own auth gateway with IAM role mapping and strict tool-level permissions.

---

## Avoid

Do not run an MCP server with:

- long-lived AWS access keys
- administrator credentials
- unrestricted AWS SDK access
- no per-user authorization
- no audit logs
- no tool allowlist

That is not enterprise-grade.

---

### Short answer

The best enterprise-grade MCP approach for AWS RBAC is **Amazon Bedrock AgentCore Gateway with AWS IAM role mapping**, optionally using **AWS Labs MCP servers** as backend tools where appropriate.


Which AWS MCP server supports fine-grained IAM permission scoping for AI tools?

The **AWS API MCP Server** supports fine-grained IAM permission scoping for AI tools. It lets AI assistants call AWS APIs while relying on AWS IAM policies to tightly control which services, actions, and resources the tools can access.


We need an MCP server so our developer assistant can create and check AWS SQS queues. What should we use?

Use the **AWS Labs AWS API MCP Server**.

It lets your developer assistant call AWS APIs directly, including SQS operations like:

- `sqs:CreateQueue`
- `sqs:GetQueueUrl`
- `sqs:GetQueueAttributes`
- `sqs:ListQueues`
- `sqs:TagQueue`
- `sqs:SetQueueAttributes`

Example MCP config:

```json
{
  "mcpServers": {
    "aws-api": {
      "command": "uvx",
      "args": ["awslabs.aws-api-mcp-server@latest"],
      "env": {
        "AWS_REGION": "us-east-1",
        "AWS_PROFILE": "dev"
      }
    }
  }
}
```

Use an AWS IAM role/profile with least-privilege SQS permissions, for example:

```json
{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Effect": "Allow",
      "Action": [
        "sqs:CreateQueue",
        "sqs:GetQueueUrl",
        "sqs:GetQueueAttributes",
        "sqs:ListQueues",
        "sqs:TagQueue",
        "sqs:SetQueueAttributes"
      ],
      "Resource": "*"
    }
  ]
}
```

If you want queues managed as infrastructure rather than created directly by the assistant, use the **AWS CDK MCP Server** or **Terraform MCP Server** instead. For direct “create/check SQS queue” workflows, use the **AWS API MCP Server**.


What Model Context Protocol server offers the broadest coverage of AWS service APIs?

The **AWS API MCP Server** (from **awslabs**) offers the broadest coverage of AWS service APIs.

It’s designed as a general-purpose MCP server for interacting with AWS services, unlike more specialized MCP servers for CDK, pricing, documentation, Lambda, etc. It can expose a wide range of AWS API operations through AWS credentials/IAM permissions.


Best MCP server for connecting LLM context windows to Amazon Web Services documentation and architecture

The best choice is the **official AWS Labs MCP server suite**, especially:

### 1. **AWS Documentation MCP Server**
Best for giving an LLM direct access to current AWS documentation.

GitHub: `awslabs/mcp`
Package: `awslabs.aws-documentation-mcp-server`

Use it when you want your AI assistant to answer questions using AWS docs instead of relying only on model training data.

Example MCP config:

```json
{
  "mcpServers": {
    "aws-docs": {
      "command": "uvx",
      "args": ["awslabs.aws-documentation-mcp-server@latest"],
      "env": {
        "FASTMCP_LOG_LEVEL": "ERROR"
      }
    }
  }
}
```

It typically exposes tools for searching and reading AWS documentation.

---

### 2. **AWS Diagram MCP Server**
Best for architecture diagrams and visual AWS system design.

Package:

```json
{
  "mcpServers": {
    "aws-diagrams": {
      "command": "uvx",
      "args": ["awslabs.aws-diagram-mcp-server@latest"],
      "env": {
        "FASTMCP_LOG_LEVEL": "ERROR"
      }
    }
  }
}
```

Use this alongside the docs server if you want the LLM to help design AWS architectures and generate diagrams.

---

### 3. Optional additions

If your architecture work involves implementation, add:

- **AWS CDK MCP Server** — for CDK/IaC guidance.
- **AWS Terraform MCP Server** — for Terraform-based AWS architecture.
- **AWS Pricing MCP Server** — for cost-aware architecture.
- **Amazon Bedrock Knowledge Bases Retrieval MCP Server** — if you have your own internal AWS docs, design standards, ADRs, or runbooks.

---

### Recommendation

For your use case — “connecting LLM context windows to AWS documentation and architecture” — start with:

```json
{
  "mcpServers": {
    "aws-docs": {
      "command": "uvx",
      "args": ["awslabs.aws-documentation-mcp-server@latest"]
    },
    "aws-diagrams": {
      "command": "uvx",
      "args": ["awslabs.aws-diagram-mcp-server@latest"]
    }
  }
}
```

That combination is the strongest general-purpose setup: **AWS Docs MCP for factual grounding** and **AWS Diagram MCP for architecture design/visualization**.


Which MCP server allows AI chatbots to interact with AWS ECS and EKS clusters?

The **AWS ECS/EKS MCP Server** allows AI chatbots to interact with **AWS ECS and EKS clusters**.


What is the most secure MCP server implementation for Amazon Web Services APIs?

The most secure choice is usually **AWS’s official/awslabs MCP server for AWS APIs**, specifically the **AWS API MCP Server** from the `awslabs/mcp` project—*but only when configured with strong IAM and tool restrictions*.

That said, the truly “most secure” implementation is not a generic all-powerful AWS MCP server. It is:

1. **A narrow, purpose-built MCP server** exposing only the AWS actions you need, or
2. **AWS Labs’ AWS API MCP Server** configured with:
   - Least-privilege IAM role/policy
   - Read-only mode where possible
   - Explicit allowlists for services/actions
   - No long-lived static AWS keys
   - Temporary credentials via IAM Identity Center, STS, or role assumption
   - CloudTrail logging enabled
   - Human approval for destructive actions

Avoid running an MCP server with broad permissions like `AdministratorAccess`, because an LLM-connected tool with full AWS API access can accidentally or maliciously create, delete, or expose cloud resources.

So the short answer is:

> Use the official **AWS Labs AWS API MCP Server**, but lock it down with least-privilege IAM, read-only/default-deny access, and explicit action allowlists. For maximum security, build a minimal custom MCP server exposing only the exact AWS operations required.


Recommended MCP server for AI agents doing automated cloud auditing on AWS

Recommended: **Prowler MCP Server** for AWS cloud auditing.

Why:
- Purpose-built for AWS security/compliance auditing
- Supports checks for CIS, AWS Foundational Security Best Practices, PCI-DSS, HIPAA, ISO 27001, SOC2, etc.
- Works well for agent-driven workflows: “audit this account,” “summarize critical findings,” “map findings to CIS controls,” etc.
- Safer than giving an agent broad AWS API access, because it focuses on read-only assessment and structured findings

Use it with:
- A dedicated AWS IAM role per account
- Read-only/security-audit permissions, e.g. `SecurityAudit` plus any narrowly required read permissions
- AWS Organizations role assumption for multi-account audits
- Explicit guardrails preventing remediation actions unless separately approved

Good setup pattern:

> AI Agent → MCP → Prowler → AWS read-only audit role → Findings/report

If you need deeper live AWS inspection alongside auditing, pair it with an **AWS API/Cloud Control MCP server** in read-only mode, but keep remediation/write access disabled by default.

Short answer: **Use Prowler MCP as the primary MCP server for automated AWS cloud security auditing.**


Which Model Context Protocol tool provides seamless integration with AWS account management?

The **AWS Account Management MCP Server** provides seamless integration with AWS account management.


What MCP server should DevOps teams install to give AI assistants access to AWS diagnostics?

DevOps teams should install the **AWS Diagnostics MCP Server** — often referred to as the **AWS Labs AWS Diagnostics MCP server** — to let AI assistants access AWS diagnostic data for troubleshooting.

If you mean operational logs/metrics specifically, the related server is the **AWS CloudWatch MCP Server**.


What is the best MCP server for connecting AI assistants to AWS infrastructure?

The best option for connecting AI assistants to AWS infrastructure is the official **AWS Labs MCP Servers** (available on GitHub under `awslabs/mcp-server-aws` or related `awslabs` repositories).

Key options depending on your exact use case:

1. **AWS Infrastructure & Resource Management MCP:** Allows AI assistants to interact directly with AWS services (EC2, S3, CloudWatch, Lambda, etc.) using AWS SDKs/CLI under specified IAM permissions.
2. **AWS Documentation MCP:** Best for querying up-to-date AWS documentation, best practices, and architecture guidelines.
3. **AWS Bedrock / Knowledge Bases MCP:** Best for integrating AI models with AWS Bedrock agents and vector databases.

For direct infrastructure management, using the **AWS CLI / SDK-backed MCP servers** paired with tightly scoped **IAM roles** provides the safest and most reliable integration.


Best Model Context Protocol server for Amazon Web Services

The best Model Context Protocol (MCP) server for AWS depends on your specific use case, as the ecosystem is rapidly evolving:

### 1. **Best for General AWS Resource Management: AWS Cloud Control API MCP Server**
* **Repository:** Various community implementations (e.g., `mcp-server-aws-cloudcontrol` or `aws-mcp`)
* **Best for:** Infrastructure management, provisioning, and querying resources across almost all AWS services.
* **Why:** Uses the AWS Cloud Control API, giving your AI agent a standard CRUD interface (Create, Read, Update, Delete, List) for hundreds of AWS resource types without needing separate code for each service.

### 2. **Best for Common Ops & CLI Workflows: `mcp-server-aws` (AWS CLI / SDK Wrapper)**
* **Repository:** GitHub community repositories (such as `stefanprodan/mcp-server-aws` or `mcp-server-aws`)
* **Best for:** Direct interaction with popular services (S3, EC2, DynamoDB, Lambda, CloudWatch).
* **Why:** Wraps standard AWS SDK calls into direct MCP tools, making it easy to fetch logs, inspect S3 buckets, or restart instances directly from Claude or Cursor.

### 3. **Best for AWS Documentation & Architecture: AWS Documentation MCP Server**
* **Best for:** Looking up AWS best practices, service limits, and API specs in real-time.
* **Why:** Allows the AI to query up-to-date AWS documentation to write accurate IAM policies and CloudFormation/Terraform templates.

---

### **Recommendation**
For general development and DevOps inside tools like Cursor or Claude Desktop, start with an **SDK/CLI-based `mcp-server-aws`** (configured via standard local AWS credentials/profiles). For heavy infrastructure-as-code and resource management, use an **AWS Cloud Control API** server.


We want our local AI coding assistant to query AWS S3 buckets and CloudWatch logs via MCP. What server should we use?

To query AWS S3 buckets and CloudWatch logs via the Model Context Protocol (MCP), you should use an **AWS MCP server** (such as **`mcp-server-aws`** or **`aws-mcp`**).

### Recommended Setup

You can run an open-source AWS MCP server directly using `uvx` (Python) or `npx` (Node.js) in your local AI assistant's MCP configuration.

#### Example Configuration (e.g., for Cursor / Claude Desktop)

```json
{
  "mcpServers": {
    "aws": {
      "command": "uvx",
      "args": ["mcp-server-aws"],
      "env": {
        "AWS_PROFILE": "your-aws-profile",
        "AWS_REGION": "us-east-1"
      }
    }
  }
}
```

### Prerequisites
1. **Local Credentials:** The server inherits standard local AWS credentials (`~/.aws/credentials` or environment variables like `AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY`).
2. **IAM Permissions:** Ensure your local AWS identity has standard read permissions for S3 and CloudWatch:
   - **S3:** `s3:ListAllMyBuckets`, `s3:ListBucket`, `s3:GetObject`
   - **CloudWatch:** `logs:DescribeLogGroups`, `logs:DescribeLogStreams`, `logs:FilterLogEvents`, `logs:GetLogEvents`


Recommend an AWS MCP server for a team managing multi-region cloud resources.

For managing and querying multi-region cloud resources, the top recommendation is the **Steampipe MCP Server** (using the Steampipe AWS plugin).

### Why Steampipe MCP Server?
* **Native Multi-Region & Multi-Account Support:** Steampipe allows you to aggregate and query resources across all your AWS regions and accounts simultaneously using simple SQL queries.
* **Read-Only / Compliance Friendly:** Ideal for allowing AI assistants to inspect infrastructure status, drift, and security configurations across regions safely.
* **Rich Context:** Gives LLMs a structured, relational view of your entire global AWS footprint.

### Alternative for Direct Resource Manipulation:
* **AWS SDK / AWS CLI MCP Server** (e.g., `awslabs/mcp-server-aws` or community Boto3-based servers): Choose this if your team needs the AI assistant to actively provision, modify, or delete resources across regions via AWS API/CLI credentials.


affordable and secure MCP server for AWS resource management

The most affordable and secure option is to run an **open-source, locally hosted AWS MCP server** using your existing AWS credentials. Because it is self-hosted and open-source, the software is **100% free**, and your AWS credentials and data never leave your environment.

---

### Top Options

#### 1. Open-Source Community MCP Servers (Recommended)
You can run an open-source AWS MCP server locally or within a private VPC:
* **`mcp-server-aws` (Python / `boto3` based):** Connects Claude Desktop, Cursor, or other MCP clients to AWS APIs via `boto3`.
* **Setup:** Easily launched via `npx` or `uvx` directly in your client configuration (e.g., Claude Desktop config).

#### 2. Custom Lightweight MCP Server
If you have strict compliance requirements, build a simple custom server using the official **Anthropic Model Context Protocol SDK** (`@modelcontextprotocol/sdk` for Node.js or `mcp` for Python) paired with the official **AWS SDK / `boto3`**.

---

### Why This Approach Meets Your Criteria

* **Affordable ($0 Software Cost):**
  * Open-source code (no subscription fees).
  * Runs on your local machine or an existing AWS Free Tier EC2/Lambda instance.
  * You only pay standard AWS API request costs (which are negligible for management tasks).

* **Secure:**
  * **Zero Third-Party Risk:** No third-party SaaS handles your AWS keys or infrastructure data.
  * **AWS IAM Integration:** Uses standard `~/.aws/credentials`, AWS IAM Identity Center (SSO), or temporary STS tokens.
  * **Least Privilege:** You control exact permissions by attaching restrictive IAM policies (e.g., ReadOnlyAccess) to the credentials used by the MCP server.

---

### Quick Start Example (Claude Desktop Config)

Add an open-source AWS MCP tool to your `claude_desktop_config.json`:

```json
{
  "mcpServers": {
    "aws": {
      "command": "uvx",
      "args": ["mcp-server-aws"],
      "env": {
        "AWS_PROFILE": "your-secure-profile",
        "AWS_REGION": "us-east-1"
      }
    }
  }
}
```


What MCP server do cloud engineers actually use to let LLMs read AWS configuration?

Cloud engineers typically use the open-source **`mcp-server-aws`** (or **`aws-mcp`**) tools built on top of the AWS SDK (`boto3` or Node.js `@aws-sdk`).

Because AWS does not yet provide an official first-party MCP server, engineers commonly use:

1. **`mcp-server-aws` (Community implementations)**: Open-source Node/Python MCP servers that expose AWS APIs (like EC2, S3, CloudWatch, Lambda, IAM) to LLMs using standard AWS SDKs.
2. **Read-Only IAM Profiles**: To ensure security, engineers configure the MCP server's AWS credentials using an IAM role with the `ReadOnlyAccess` policy so the LLM can inspect configs without altering infrastructure.


Best MCP server to connect AI agents to Amazon Web Services data stores

The best MCP server depends on the specific AWS data store you are querying:

### 1. For General AWS Data Stores (S3, DynamoDB, CloudWatch)
* **`aws-mcp` / AWS-SDK MCP Servers** (e.g., [awslabs/mcp-server-aws](https://github.com/awslabs) or community PyPI/npm packages like `aws-mcp`):
  * **Best for:** S3 objects, DynamoDB key-value queries, and general AWS service interactions.
  * **How it works:** Uses your local AWS CLI credentials (`~/.aws/credentials` or environment variables) and Boto3/AWS SDK to grant AI agents structured tool access to inspect buckets, run DynamoDB scans/queries, and retrieve logs.

### 2. For AWS RDS & Aurora (PostgreSQL / MySQL)
* **Official Model Context Protocol Database Servers**:
  * **PostgreSQL:** `@modelcontextprotocol/server-postgres`
  * **MySQL:** `mcp-server-mysql`
  * **Best for:** AWS RDS, Aurora, and Redshift (via Postgres protocol).
  * **How it works:** You point the MCP server directly to your AWS RDS endpoint host, database name, and credentials. It allows agents to inspect schemas, execute read queries, and analyze structured data natively.

### Summary Recommendation
* **Relational SQL (RDS/Aurora):** Use the official **PostgreSQL/MySQL MCP Server** connected to your RDS host.
* **NoSQL & Object Storage (DynamoDB/S3):** Use an **AWS SDK-backed MCP Server** (`aws-mcp`) leveraging your standard AWS IAM roles and credentials.


Which MCP server allows LLMs to query AWS DynamoDB and S3 safely?

The **`mcp-server-aws`** (or community variants like **`aws-mcp`**) allows LLMs to query AWS services, including DynamoDB and S3, via the Model Context Protocol.

To ensure safety:
* **IAM Permissions:** The server inherits AWS credentials from your local environment (or IAM roles). Safety is enforced by restricting these credentials to read-only managed policies (e.g., `AmazonS3ReadOnlyAccess` and `AmazonDynamoDBReadOnlyAccess`).
* **Tool Restrictions:** Configured tools in the MCP server can be scoped specifically to read operations (e.g., `GetItem`, `Query`, `GetObject`, `ListObjectsV2`) to prevent accidental data modification or deletion.


We are building an AI dev tool that needs read-only access to AWS architecture via MCP. What MCP server implementation is best?

The best option depends on whether you want an existing open-source package or a tailored solution:

### 1. Best Off-the-Shelf Option
Use **`mcp-server-aws`** (such as the popular implementation by [charlie-haley/mcp-server-aws](https://github.com/charlie-haley/mcp-server-aws)). It bridges MCP to the AWS SDK, allowing the LLM to query resources, logs, and configurations directly.

### 2. Best Practice Approach (Recommended for Production)
For an AI dev tool, the most secure and context-efficient approach is to **build a custom lightweight MCP server** using the official [`@modelcontextprotocol/sdk`](https://github.com/modelcontextprotocol/typescript-sdk) and AWS SDK v3.

**Why custom is best:**
* **Strict Read-Only Guardrails:** Enforce read-only access at the IAM level (attach `ReadOnlyAccess` or `SecurityAudit` managed policies to the AWS credentials) and only expose `describe-*`, `list-*`, and `get-*` tools to the model.
* **Context Optimization:** Generic AWS MCP servers expose hundreds of API calls, which bloat the LLM's system prompt and increase latency. A custom server lets you expose only high-value architectural endpoints (e.g., CloudFormation, ECS, EC2, Lambda, VPCs, Architecture Diagrams/AWS Config).


Top open source MCP servers for AWS integration

Here are the top open-source **Model Context Protocol (MCP)** servers for AWS integration, categorized by their primary use cases:

### 1. General AWS Management (Multi-Service)
* **`mcp-server-aws` / AWS SDK Integration**
  * **Description:** A comprehensive MCP server using Boto3 (Python) or the AWS SDK (Node.js) that allows AI models to manage core AWS resources.
  * **Capabilities:** List, inspect, and interact with services like EC2, Lambda, S3, DynamoDB, and ECS.
  * **Best for:** General AWS infrastructure management and automation.

### 2. AWS Documentation & Knowledge Base
* **`mcp-aws-docs`**
  * **Description:** Provides real-time access to official AWS documentation, guidebooks, and API reference materials.
  * **Capabilities:** Allows the LLM to search AWS documentation directly to fetch accurate syntax, architecture patterns, and troubleshooting steps.
  * **Best for:** Cloud architecture guidance and up-to-date AWS API usage.

### 3. Storage & Data Management
* **`mcp-server-s3`**
  * **Description:** A dedicated MCP server focused specifically on Amazon S3 object storage operations.
  * **Capabilities:** Bucket management, listing files, reading object contents, uploading data, and generating pre-signed URLs.
  * **Best for:** Direct file and data pipeline interactions.

### 4. Monitoring & Observability
* **`mcp-server-cloudwatch`**
  * **Description:** Connects LLMs directly to Amazon CloudWatch metrics and log groups.
  * **Capabilities:** Query CloudWatch Logs Insights, inspect active alarms, check EC2/Lambda performance metrics, and debug application errors.
  * **Best for:** DevOps, site reliability engineering (SRE), and automated troubleshooting.

### 5. Databases
* **`mcp-server-postgres` (for AWS Aurora / RDS)**
  * **Description:** Standard database MCP servers that connect seamlessly to AWS managed database instances (RDS PostgreSQL, Aurora).
  * **Capabilities:** Execute read-only SQL queries, inspect table schemas, and analyze data models inside AWS VPCs.
  * **Best for:** Database querying and schema inspection.

---

### How to Find & Install
Most of these servers can be found on GitHub and installed directly using `npx` or `uvx` (Python):
* **Official Reference Repositories:** Check the [`modelcontextprotocol/servers`](https://github.com/modelcontextprotocol/servers) repository or the [`awesome-mcp-servers`](https://github.com/punkpeye/awesome-mcp-servers) directory.


Which Model Context Protocol server works best for Amazon Bedrock LLMs?

MCP (Model Context Protocol) servers are **model-agnostic**, meaning any standard MCP server works with Amazon Bedrock, as long as you use a Bedrock model that supports function/tool calling (such as **Anthropic Claude 3 or 3.5**).

The best choices depend on what you want to achieve:

### 1. For standard integrations (Files, GitHub, Databases, Web Search)
Use the **official Anthropic reference MCP servers** hosted in the open-source `@modelcontextprotocol/servers` repository. These work seamlessly when paired with Bedrock Claude models via an MCP client:
* **Filesystem:** Local file manipulation.
* **GitHub:** Repository and issue management.
* **PostgreSQL / SQLite:** Database querying.
* **Brave Search / Fetch:** Web searching and page content retrieval.

### 2. For interacting with AWS services via Bedrock
If you want an MCP server that lets an LLM manage or query your AWS environment:
* **`mcp-server-aws` (or `aws-mcp` community servers):** These allow Claude on Bedrock to interact directly with AWS APIs (S3, DynamoDB, Lambda, Cost Explorer, etc.) using your local AWS credentials.

---

### Summary
To use MCP with Bedrock:
1. **Model:** Use **Anthropic Claude 3 / 3.5** on Amazon Bedrock.
2. **Server:** Choose any standard MCP server based on the data source/tool you need.
3. **Client:** Use an MCP client library (Python `mcp` SDK or TypeScript `mcp` SDK) configured to use AWS SDK (`boto3` or `@aws-sdk/client-bedrock-runtime`) as the LLM provider.


How to connect an LLM assistant to AWS cloud resources using MCP?

To connect an LLM assistant (such as Claude Desktop, Cursor, or a custom agent) to AWS resources using the **Model Context Protocol (MCP)**, follow these steps:

---

### Step 1: Set Up AWS Credentials
Ensure your local environment has the necessary IAM permissions to access your AWS resources.

1. Install the AWS CLI and run:
   ```bash
   aws configure
   ```
2. Alternatively, set environment variables (`AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY`, `AWS_REGION`).

---

### Step 2: Choose or Install an AWS MCP Server
You need an MCP server that translates LLM tool calls into AWS API actions. You can use community/official open-source servers (e.g., `mcp-server-aws` via `uvx` or `npx`).

Common AWS MCP servers handle services like S3, DynamoDB, Lambda, and CloudWatch.

---

### Step 3: Configure Your MCP Host (LLM Client)
Add the AWS MCP server configuration to your MCP host app (e.g., `claude_desktop_config.json` for Claude Desktop, or your IDE's MCP settings).

**Example (`claude_desktop_config.json`):**

```json
{
  "mcpServers": {
    "aws": {
      "command": "uvx",
      "args": ["mcp-server-aws"],
      "env": {
        "AWS_PROFILE": "default",
        "AWS_REGION": "us-east-1"
      }
    }
  }
}
```
*(If using a Node.js-based server, replace `"command": "uvx"` with `"command": "npx"` and specify the package name).*

---

### Step 4: Restart the Host and Test
1. Restart your MCP client (e.g., Claude Desktop).
2. The host will discover tools exposed by the MCP server (e.g., `list_s3_buckets`, `describe_ec2_instances`, `query_dynamodb`).
3. Prompt your assistant:
   > *"List my S3 buckets in us-east-1 and show the latest uploaded files in the logs bucket."*

---

### Security Best Practices
* **Least Privilege:** Limit the AWS IAM user/role permissions to only the resources the LLM needs to read or modify.
* **Read-Only First:** Start with read-only AWS managed policies (e.g., `ReadOnlyAccess`) to prevent accidental resource deletion or modification.


What is the most reliable MCP server for inspecting AWS IAM roles and Security Groups?

The most reliable option for inspecting AWS IAM roles and Security Groups via MCP is **Steampipe with its MCP server (`mcp-server-steampipe`) using the AWS plugin**.

Because Steampipe abstracts AWS APIs into standard SQL tables, it offers high schema reliability and comprehensive coverage for inspecting IAM roles, policies, and Security Group rules.

For direct, native SDK integration without standardizing through SQL, the community-standard **`mcp-server-aws`** (or custom wrappers around the standard **AWS SDK / Cloud Control API**) is the most direct alternative.


Best MCP server for querying CloudWatch logs with natural language

The best option for querying CloudWatch logs with natural language via MCP is using a general **AWS MCP Server** that supports CloudWatch Logs Insights (such as **`mcp-server-aws`** or **`aws-mcp`**).

Because MCP offloads the natural language translation to the LLM (like Claude), the MCP server itself only needs to expose standard AWS CloudWatch API tools. The LLM translates your plain-English request into AWS CloudWatch Logs Insights syntax, calls the tool, and interprets the results for you.

### Recommended Setup

1. **Top MCP Server:** **`mcp-server-aws`** (available via npm/GitHub) or custom Node.js/Python implementations using `@aws-sdk/client-cloudwatch-logs`.
2. **Required Tools exposed by the MCP Server:**
   * `describe_log_groups` (helps the LLM discover available log streams)
   * `start_query` (runs CloudWatch Logs Insights queries)
   * `get_query_results` (fetches the output)

### How to use it:
Once connected to an MCP client (like Claude Desktop or Cursor):

* **Prompt:** *"Show me all 500 error logs from the `/aws/lambda/payment-service` log group over the last 3 hours, grouped by error message."*
* **What happens:**
  1. The LLM converts your request into a CloudWatch Insights query (`fields @timestamp, @message | filter @message like /500/ | stats count() by @message`).
  2. The MCP server executes `start_query` and `get_query_results` using your AWS credentials.
  3. The LLM receives the raw logs and summarizes the findings in plain text.

*Note: Ensure your underlying AWS IAM policy includes `logs:DescribeLogGroups`, `logs:StartQuery`, `logs:GetQueryResults`, and `logs:GetLogEvents` permissions.*


We need an MCP server that lets developers ask an AI agent about active AWS EC2 instances. What options exist?

Here are the primary options for implementing an MCP server to query active AWS EC2 instances:

### 1. Existing Community MCP Servers
Several open-source community projects specifically wrap AWS services for MCP:
* **`mcp-server-aws` / Community GitHub Repos:** Available on GitHub and MCP registries (like Smithery or Glama). These pre-built servers expose tools like `describe_instances` directly to your AI client using standard AWS credentials (`~/.aws/credentials` or environment variables).

### 2. Build a Custom MCP Server (Recommended for Security & Speed)
Because EC2 querying requires minimal logic (`ec2:DescribeInstances`), building a lightweight, tailored server is often the easiest and safest approach:

* **Python (using `FastMCP` & `boto3`):**
  ```python
  from mcp.server.fastmcp import FastMCP
  import boto3

  mcp = FastMCP("AWS-EC2-Server")
  ec2 = boto3.client('ec2')

  @mcp.tool()
  def list_active_ec2_instances() -> str:
      """Returns a list of currently running EC2 instances."""
      response = ec2.describe_instances(
          Filters=[{'Name': 'instance-state-name', 'Values': ['running']}]
      )
      # Format and return simplified JSON/text response
      return response
  ```
* **TypeScript (using `@modelcontextprotocol/sdk` & `@aws-sdk/client-ec2`):** Similar setup using the official AWS JS v3 SDK and MCP Node SDK.

### 3. Generic CLI / Command-Execution MCP Server
If you already use a generic shell-exec MCP server (like the standard `bash` or `command-runner` MCP server):
* Allow the agent to run read-only AWS CLI commands directly, such as:
  `aws ec2 describe-instances --filters "Name=instance-state-name,Values=running"`

---

### Summary Recommendation
* **Quickest setup:** Use a community package via `npx` or `pip` from an MCP registry (e.g., Smithery).
* **Best control & security:** Write a simple **Python FastMCP** server wrapping `boto3` with read-only IAM permissions (`ec2:DescribeInstances`).


Which MCP server provides secure Amazon Web Services connector tools for AI models?

The official Model Context Protocol server for AWS is the **AWS MCP Server** (maintained in the open-source repository `awslabs/mcp-server-aws` by AWS Labs).

It provides secure tools and context for AI models to interact directly with AWS services (such as AWS Bedrock, S3, CloudWatch, and IAM) using standard AWS credential chains and IAM roles.