Skip to main content
mcpSource-backedReview first Safety Privacy
AWS Labs logo

AWS CloudTrail MCP Server

Official AWS Labs MCP server for AWS CloudTrail that lets AI assistants query account activity for security investigations, compliance auditing, and operational troubleshooting via Event History and CloudTrail Lake SQL.

by AWS Labs·added 2026-06-21·
HarnessClaude CodeCodexCursorClaude Desktop
Review first review before installing

Open the source and read safety notes before installing.

Citation facts

Source-backed facts for citing this resource, derived directly from the registry — also available as plain text for AI assistants.

Source URLs
https://github.com/awslabs/mcp/blob/main/src/cloudtrail-mcp-server/README.md, https://github.com/awslabs/mcp, https://awslabs.github.io/mcp/
Brand
AWS Labs
Brand domain
aws.amazon.com
Brand asset source
brandfetch
Safety notes
The provided tools are read-only — they look up CloudTrail events and run Lake queries, and do not modify infrastructure. Grant only the CloudTrail read permissions listed in the documentation (least privilege)., This server reads audit data with your AWS credentials; scope the profile to the intended account and run it only on a trusted host., CloudTrail Lake SQL queries against large event data stores can incur AWS query/scan costs; review query scope before running broad analyses.
Privacy notes
CloudTrail events expose account activity: usernames, access key IDs, source IPs, ARNs, and API call details can be returned to the model., Keep account identifiers, credentials, and returned event contents out of public prompts, issues, and screenshots, since audit data is sensitive.
Author
AWS Labs
Submitted by
jaso0n0818
Claim status
unclaimed
Last verified
2026-06-21

Safety notes

  • The provided tools are read-only — they look up CloudTrail events and run Lake queries, and do not modify infrastructure. Grant only the CloudTrail read permissions listed in the documentation (least privilege).
  • This server reads audit data with your AWS credentials; scope the profile to the intended account and run it only on a trusted host.
  • CloudTrail Lake SQL queries against large event data stores can incur AWS query/scan costs; review query scope before running broad analyses.

Privacy notes

  • CloudTrail events expose account activity: usernames, access key IDs, source IPs, ARNs, and API call details can be returned to the model.
  • Keep account identifiers, credentials, and returned event contents out of public prompts, issues, and screenshots, since audit data is sensitive.

Prerequisites

  • An AWS account with CloudTrail enabled (Event History is on by default; CloudTrail Lake is needed for SQL queries).
  • Python 3.10 or newer and `uv` / `uvx` installed (Astral) to run the package.
  • AWS credentials configured locally (for example via `aws configure` or `AWS_PROFILE`) with CloudTrail read permissions (`cloudtrail:LookupEvents`, `cloudtrail:StartQuery`, `cloudtrail:GetQueryResults`, and related).
  • An MCP client that supports stdio servers; the server runs locally on the same host as the client.

Schema details

Install type
cli
Troubleshooting
No
Source repository stats
Scope
Source repo
Collection metadata
Estimated setup
10 minutes
Difficulty
intermediate
Tool listing metadata
Pricing
open-source
Disclosure
editorial
Application category
DeveloperApplication
Operating system
Cross-platform
Full copyable content
{
  "awslabs.cloudtrail-mcp-server": {
    "command": "uvx",
    "args": ["awslabs.cloudtrail-mcp-server@latest"],
    "env": {
      "AWS_PROFILE": "${AWS_PROFILE}",
      "FASTMCP_LOG_LEVEL": "ERROR"
    }
  }
}

About this resource

Overview

AWS CloudTrail MCP Server is an official AWS Labs Model Context Protocol server that lets AI assistants query AWS account activity for security investigations, compliance auditing, and operational troubleshooting. It provides access to CloudTrail Event History and CloudTrail Lake analytics so agents can track API calls and analyze user activity through standardized MCP tools.

It runs locally over stdio via uvx from the published awslabs.cloudtrail-mcp-server Python package and uses your local AWS credentials. The provided tools are read-only.

Features

  • Event lookup — search CloudTrail events by username, event name, resource name, and more, across the last 90 days of management events.
  • CloudTrail Lake analytics — run Trino-compatible SQL queries against CloudTrail Lake for complex filtering and aggregation.
  • User activity analysis — track activity by username, access key, or other user attributes.
  • API call tracking — monitor specific API calls and their patterns for security and compliance.
  • Event data store management — list and explore CloudTrail Lake event data stores and their capabilities.

Use Cases

  • Investigate a security incident by tracing who called which API and when.
  • Audit user activity across AWS services for compliance.
  • Run an ad hoc CloudTrail Lake SQL query for deeper analysis.
  • Troubleshoot an operational change by finding the API calls that caused it.

Installation

Claude Code

  1. Install Python 3.10+ and uv.
  2. Configure an AWS profile with CloudTrail read permissions.
  3. Add the server with the stdio configuration above (command uvx, package awslabs.cloudtrail-mcp-server@latest, env AWS_PROFILE).
  4. Verify it is connected with claude mcp list.

Claude Desktop / Cursor / Kiro / VS Code

Add the configSnippet above to your client's MCP configuration and set AWS_PROFILE. The first run downloads the package via uvx.

Source And Trust

This entry is based on the official AWS Labs awslabs/mcp repository and the published PyPI package (Apache-2.0). The server is read-only over CloudTrail, but it uses your AWS credentials and returns sensitive audit data, so scope permissions to CloudTrail reads, keep results private, and verify the configuration against the linked source before using it in automated workflows.

Source citations

Add this badge to your README

Show that AWS CloudTrail MCP Server is listed on HeyClaude. Paste this Markdown into your README — it renders the badge and links back to this page.

Listed on HeyClaude
[![Listed on HeyClaude](https://heyclau.de/badge/mcp/aws-cloudtrail-mcp-server.svg)](https://heyclau.de/entry/mcp/aws-cloudtrail-mcp-server)

How it compares

AWS CloudTrail MCP Server side by side with 3 alternatives on trust, install, platform support, and disclosed safety notes — all from reviewed registry metadata.

Field

Official AWS Labs MCP server for AWS CloudTrail that lets AI assistants query account activity for security investigations, compliance auditing, and operational troubleshooting via Event History and CloudTrail Lake SQL.

Open dossier

Official AWS Labs MCP server for AWS Identity and Access Management that lets AI assistants inspect and manage IAM users, roles, groups, policies, and access keys, with policy simulation and an opt-in read-only mode.

Open dossier

Official AWS Labs MCP server for AWS S3 Tables that lets AI assistants create and query S3-based tables, run read-only SQL for analysis, generate tables from CSV files in S3, and explore table metadata — read-only by default.

Open dossier

Official AWS Labs MCP server for Amazon ECS that helps AI assistants containerize applications, deploy them to ECS, troubleshoot deployments, and explore ECS and ECR resources across the container application lifecycle.

Open dossier
Trust
Install riskReview firstReview firstReview firstReview first
Notes Safety Privacy Safety Privacy Safety Privacy Safety Privacy
BrandAWS Labs logoAWS LabsAWS Labs logoAWS LabsAWS Labs logoAWS LabsAWS Labs logoAWS Labs
Categorymcpmcpmcpmcp
Sourcesource-backedsource-backedsource-backedsource-backed
AuthorAWS LabsAWS LabsAWS LabsAWS Labs
Added2026-06-212026-06-212026-06-212026-06-21
Platforms
Claude CodeCodexCursorClaude Desktop
Claude CodeClaude Desktop
Claude CodeClaude Desktop
Claude CodeClaude Desktop
Source repo
Safety notesThe provided tools are read-only — they look up CloudTrail events and run Lake queries, and do not modify infrastructure. Grant only the CloudTrail read permissions listed in the documentation (least privilege). This server reads audit data with your AWS credentials; scope the profile to the intended account and run it only on a trusted host. CloudTrail Lake SQL queries against large event data stores can incur AWS query/scan costs; review query scope before running broad analyses.Run with the `--readonly` flag (shown above) to block all mutating operations. Without it the server can create and delete IAM users, roles, groups, policies, and access keys — high-impact identity changes — so enable write access only deliberately and with scoped permissions. IAM controls account-wide access; a misused write operation can grant or revoke permissions broadly. Prefer non-production accounts while evaluating, and use policy simulation to test changes before applying them. This server acts on real IAM with your AWS credentials; scope the profile tightly and run it only on a trusted host.The server is read-only by default. Adding the `--allow-write` flag (with the matching IAM permissions) enables create and append operations on S3 Tables; there is no delete or general update. Enable write only deliberately. AWS advises that you are responsible for your agents: if you enable write, back up your data first and validate LLM-generated instructions before execution, since misconfigured permissions can cause data loss. This server acts on real S3 Tables data with your AWS credentials; scope the profile least-privilege and run it only on a trusted host.The configuration above is read-only. Setting `ALLOW_WRITE=true` lets the server create and modify infrastructure (ECR repos, CloudFormation stacks, ECS services) and `ALLOW_SENSITIVE_DATA=true` exposes logs; enable these only deliberately. AWS documents this server as primarily for development, testing, and non-critical environments; keep write/sensitive-data disabled for production accounts and prefer non-production targets while evaluating it. This server acts on real infrastructure with your AWS credentials; scope the profile to the intended account, region, and resources, and run it only on a trusted host.
Privacy notesCloudTrail events expose account activity: usernames, access key IDs, source IPs, ARNs, and API call details can be returned to the model. Keep account identifiers, credentials, and returned event contents out of public prompts, issues, and screenshots, since audit data is sensitive.IAM user/role/group names, ARNs, policy documents, and account metadata can be returned through tool calls and exposed to the model. Access key IDs and other identity material may appear in responses; never expose secret access keys, and keep account identifiers and policy contents out of public prompts, issues, and screenshots.Table schemas, metadata, query results, and bucket/namespace identifiers can be returned through tool calls and exposed to the model. Keep account identifiers, credentials, and any sensitive table data out of public prompts, issues, and screenshots.Cluster, service, task, task-definition, and ECR metadata plus account/region identifiers can be returned through tool calls and exposed to the model. With sensitive-data access enabled, logs and deployment details may be returned; keep account identifiers, credentials, and log contents out of public prompts, issues, and screenshots.
Prerequisites
  • An AWS account with CloudTrail enabled (Event History is on by default; CloudTrail Lake is needed for SQL queries).
  • Python 3.10 or newer and `uv` / `uvx` installed (Astral) to run the package.
  • AWS credentials configured locally (for example via `aws configure` or `AWS_PROFILE`) with CloudTrail read permissions (`cloudtrail:LookupEvents`, `cloudtrail:StartQuery`, `cloudtrail:GetQueryResults`, and related).
  • An MCP client that supports stdio servers; the server runs locally on the same host as the client.
  • An AWS account with IAM access and permissions for the IAM read (and, if write is enabled, manage) operations you intend to use.
  • Python 3.10 or newer and `uv` / `uvx` installed (Astral) to run the package.
  • AWS credentials configured locally (for example via `aws configure` or `AWS_PROFILE`) scoped least-privilege; read-only IAM permissions are enough for the recommended `--readonly` mode.
  • An MCP client that supports stdio servers; the server runs locally on the same host as the client.
  • An AWS account with S3 Tables and permissions for the table buckets you intend to read (and, if enabled, write).
  • Python 3.10 or newer and `uv` / `uvx` installed (Astral) to run the package.
  • AWS credentials configured locally (for example via `aws configure` or `AWS_PROFILE`) scoped least-privilege to the intended S3 Tables resources.
  • An MCP client that supports stdio servers; the server runs locally on the same host as the client.
  • An AWS account with Amazon ECS/ECR and permissions to view (and, if enabled, deploy) the target resources.
  • Docker or Finch for containerization and local image builds.
  • Python 3.10 or newer and `uv` / `uvx` installed (Astral) to run the package.
  • AWS credentials configured locally (for example via `aws configure` or `AWS_PROFILE`) scoped to the intended account, region, and resources.
Install
uvx awslabs.cloudtrail-mcp-server@latest
uvx awslabs.iam-mcp-server@latest --readonly
uvx awslabs.s3-tables-mcp-server@latest
uvx --from awslabs-ecs-mcp-server ecs-mcp-server
Config
{
  "mcpServers": {
    "awslabs.cloudtrail-mcp-server": {
      "command": "uvx",
      "args": ["awslabs.cloudtrail-mcp-server@latest"],
      "env": {
        "AWS_PROFILE": "${AWS_PROFILE}",
        "FASTMCP_LOG_LEVEL": "ERROR"
      },
      "type": "stdio"
    }
  }
}
{
  "mcpServers": {
    "awslabs.iam-mcp-server": {
      "command": "uvx",
      "args": ["awslabs.iam-mcp-server@latest", "--readonly"],
      "env": {
        "AWS_PROFILE": "${AWS_PROFILE}",
        "AWS_REGION": "us-east-1",
        "FASTMCP_LOG_LEVEL": "ERROR"
      },
      "type": "stdio"
    }
  }
}
{
  "mcpServers": {
    "awslabs.s3-tables-mcp-server": {
      "command": "uvx",
      "args": ["awslabs.s3-tables-mcp-server@latest"],
      "env": {
        "AWS_PROFILE": "${AWS_PROFILE}",
        "AWS_REGION": "us-east-1",
        "FASTMCP_LOG_LEVEL": "ERROR"
      },
      "type": "stdio"
    }
  }
}
{
  "mcpServers": {
    "awslabs.ecs-mcp-server": {
      "command": "uvx",
      "args": ["--from", "awslabs-ecs-mcp-server", "ecs-mcp-server"],
      "env": {
        "AWS_PROFILE": "${AWS_PROFILE}",
        "AWS_REGION": "us-east-1",
        "FASTMCP_LOG_LEVEL": "ERROR",
        "ALLOW_WRITE": "false",
        "ALLOW_SENSITIVE_DATA": "false"
      },
      "type": "stdio"
    }
  }
}
Citations
ClaimUnclaimedUnclaimedUnclaimedUnclaimed

Related guides

Signals

Loading live community signals…

More like this, weekly

A short, calm digest of reviewed Claude resources. Unsubscribe any time.