PlugWiki
cloudtrail-mcp-server logo

AWS CloudTrail MCP Server: Setup for Claude, Cursor and Other Apps

Official · by Amazon Web ServicesLocal
GetPyPIawslabs.cloudtrail-mcp-serverawslabs/mcp/tree/HEAD/src/cloudtrail-mcp-server

Lets your AI assistant search AWS CloudTrail to see who did what in your account, and run SQL over CloudTrail Lake.

This is an AWS Labs server that runs on your own computer. It uses your AWS credentials to look up CloudTrail events and, if you have turned on CloudTrail Lake, to run SQL queries over them.

You need an AWS account with CloudTrail on, which Event History is by default. All five tools only read, and the README says the server can run only on the same machine as your AI app.

Good for

  • Security teams investigating suspicious sign-ins or API calls in an AWS account
  • Auditors and compliance staff checking who changed which resource
  • Engineers tracing what changed before an outage

Works in

12 should work

Tap an app to see how to set it up and any known problems.

Install cloudtrail-mcp-server

Claude Code

  1. 1

    Copy this prompt.

    Add the cloudtrail-mcp-server server to Claude Code. Run this command:
    
    claude mcp add cloudtrail -- uvx awslabs.cloudtrail-mcp-server
    
    Then check that it loaded and tell me if I need to sign in or restart.
  2. 2

    Paste it into Claude Code. It shows the change and asks before running it.

Requires uv (Python).

Built from the package data we hold. Not yet tested by us.

Tools

  • Finds recent AWS activity by user, event name or resource

    Searches the last 90 days of CloudTrail management events in one region. You filter by an attribute such as user name, event name or resource name, and get up to 50 events per call with paging.

    Try: “Show me every ConsoleLogin event for the user alice in the last week.”

    Network · lookup_events

  • Lists your CloudTrail Lake event data stores

    Lists the CloudTrail Lake event data stores in a region, with what each one captures. You need a store ID before you can run a Lake query.

    Try: “Which CloudTrail Lake event data stores do I have in us-east-1?”

    Network · list_event_data_stores

  • Runs a SQL query on CloudTrail Lake

    Starts a SQL query against a CloudTrail Lake event data store. Only SELECT statements in Trino-style SQL are supported, and the store ID goes in the FROM clause.

    Try: “In CloudTrail Lake, count events by event name for the last 24 hours and show the top 10.”

    Network · lake_query

  • Checks whether a Lake query has finished

    Reports the state of a CloudTrail Lake query you started earlier. Use it for long queries before asking for results.

    Try: “Is my CloudTrail Lake query still running?”

    Network · get_query_status

  • Fetches the rows of a finished Lake query

    Returns the results of a completed Lake query, in pages of up to 50 rows, so large result sets can be read in parts.

    Try: “Get the results of that CloudTrail Lake query.”

    Network · get_query_results

Read from the source code

Permissions

low risk · 2 things to watch

Low risk

The assistant can read your account's audit trail, and nothing in the tool list changes anything. Use an AWS profile that only has the CloudTrail read permissions.

What it can do

  • Read your data
  • Create and change things
  • Delete things
  • Read-only mode

Watch out for

  • Audit logs hold names, IPs and resource IDs

    Results go to your assistant and its provider. Point it at accounts where that is acceptable, and use a profile limited to CloudTrail read access. github.com

  • Lake queries can scan a lot of data

    The assistant writes the SQL. Ask for a narrow time range and a LIMIT so queries stay small. github.com

Security advisories

No published security advisories as of Nov 1, 2026.

Technical details
Turning on read-onlyNot needed: every tool only reads. Give the AWS identity only the six CloudTrail permissions the README lists.
Talks toAWS CloudTrail in the region you query
Sign-in and keysUses your AWS credentials from a named AWS profile (AWS_PROFILE) or the standard AWS credential chain. The server keeps no separate account.
Scopes
  • cloudtrail:LookupEvents

  • cloudtrail:ListEventDataStores

  • cloudtrail:GetEventDataStore

  • cloudtrail:StartQuery

  • cloudtrail:DescribeQuery

  • cloudtrail:GetQueryResults

Questions

Does it need CloudTrail Lake?

No. Event lookup works with the 90 days of management events that CloudTrail keeps by default. Lake queries need CloudTrail Lake turned on.

Can it change or delete anything in my AWS account?

No. All five tools only read, and Lake accepts only SELECT queries. The README lists six read permissions.

Which AWS permissions does it need?

The six CloudTrail actions in the README: LookupEvents, ListEventDataStores, GetEventDataStore, StartQuery, DescribeQuery and GetQueryResults.

Does it run in the cloud or on my computer?

On your computer. The README says it can only run on the same machine as your AI app, using your own AWS credentials.

Which region does it search?

Each tool takes a region and defaults to us-east-1. Name another region in your prompt to search there.

Information

updated Nov 2, 2026

Publisher
Amazon Web Services (official)
Package
awslabs.cloudtrail-mcp-server
Registry
PyPI
Transport
stdio
License
Apache-2.0
Last commit
Oct 30, 2026
Open issues
143
Listed in
Docker MCP Catalog

GitHubDockerDocker MCP Catalog

Other AWS MCP servers

Sources

Docs, issue trackers and discussions this page is built from. Issues, quotes and findings above link to their own source.

Show all 2
  1. CloudTrail MCP Server README · github.com
  2. CloudTrail tools source · github.com

Facts from the official MCP registry, GitHub, npm, PyPI and the Docker catalog. Updated Nov 2, 2026.