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.
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
- Scope
- Source repo
- Estimated setup
- 10 minutes
- Difficulty
- intermediate
- 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
- Install Python 3.10+ and
uv. - Configure an AWS profile with CloudTrail read permissions.
- Add the server with the stdio configuration above (command
uvx, packageawslabs.cloudtrail-mcp-server@latest, envAWS_PROFILE). - 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
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 risk | Review first | Review first | Review first | Review first |
| Notes | Safety ✓ Privacy ✓ | Safety ✓ Privacy ✓ | Safety ✓ Privacy ✓ | Safety ✓ Privacy ✓ |
| Brand | ||||
| Category | mcp | mcp | mcp | mcp |
| Source | source-backed | source-backed | source-backed | source-backed |
| Author | AWS Labs | AWS Labs | AWS Labs | AWS Labs |
| Added | 2026-06-21 | 2026-06-21 | 2026-06-21 | 2026-06-21 |
| Platforms | Claude CodeCodexCursorClaude Desktop | Claude CodeClaude Desktop | Claude CodeClaude Desktop | Claude CodeClaude Desktop |
| Source repo | — | — | — | — |
| 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. | ✓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 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. | ✓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 |
|
|
|
|
| Install | | | | |
| Config | | | | |
| Citations | ||||
| Claim | Unclaimed | Unclaimed | Unclaimed | Unclaimed |
Related guides
Source-backed guides for putting this to work.
Featured in
Signals
Loading live community signals…
A short, calm digest of reviewed Claude resources. Unsubscribe any time.