AWS CloudTrail audit logging and monitoring.
10K+
AWS CloudTrail audit logging and monitoring.
| Attribute | Details |
|---|---|
| Docker Image | mcp/cloudtrail-mcp-server |
| Author | awslabs |
| Repository | https://github.com/awslabs/mcp |
| Attribute | Details |
|---|---|
| Dockerfile | https://github.com/awslabs/mcp/blob/636aca8e109b5559006044f035bb89c16e9e5410/src/cloudtrail-mcp-server/Dockerfile |
| Commit | 636aca8e109b5559006044f035bb89c16e9e5410 |
| Docker Image built by | Docker Inc. |
| Docker Scout Health Score | |
| Verify Signature | COSIGN_REPOSITORY=mcp/signatures cosign verify mcp/cloudtrail-mcp-server --key https://raw.githubusercontent.com/docker/keyring/refs/heads/main/public/mcp/latest.pub |
| Licence | Apache License 2.0 |
| Tools provided by this Server | Short Description |
|---|---|
get_query_results | Get the results of a completed CloudTrail Lake query with pagination support. |
get_query_status | Get the status of a CloudTrail Lake query. |
lake_query | Execute a SQL query against CloudTrail Lake for complex analytics and filtering. |
list_event_data_stores | List available CloudTrail Lake Event Data Stores with their capabilities and event selectors. |
lookup_events | Look up CloudTrail events based on various criteria. |
get_query_resultsGet the results of a completed CloudTrail Lake query with pagination support.
This tool retrieves the results of a previously executed CloudTrail Lake query. It supports pagination for large result sets, allowing you to fetch results in chunks.
Usage: Use this tool to get the results of a query that has completed (status = 'FINISHED'). For large result sets, use the next_token to fetch subsequent pages of results.
Pagination workflow:
QueryResult containing: - query_id: The query identifier - query_status: Current status of the query - query_result_rows: Results for this page - next_token: Token for next page (null if no more pages) - query_statistics: Performance statistics for the query
| Parameters | Type | Description |
|---|---|---|
query_id | string | The ID of the query to get results for |
max_results | string optional | Maximum number of results to return per page (1-50, default: 50) |
next_token | string optional | Token for pagination to fetch the next page of results. Use the next_token returned from a previous call to get successive pages. |
region | string optional | AWS region to query. Defaults to us-east-1. |
get_query_statusGet the status of a CloudTrail Lake query.
This tool checks the status of a previously started CloudTrail Lake query. Use this when you need to check if a long-running query has completed or if you want to get details about query execution.
Usage: Use this tool to monitor the progress of CloudTrail Lake queries, especially long-running ones that may take time to complete.
QueryStatus containing: - query_id: The query identifier - query_status: Current status (QUEUED, RUNNING, FINISHED, FAILED, CANCELLED, TIMED_OUT) - query_statistics: Performance and execution statistics - error_message: Error details if the query failed
| Parameters | Type | Description |
|---|---|---|
query_id | string | The ID of the query to check status for |
region | string optional | AWS region to query. Defaults to us-east-1. |
lake_queryExecute a SQL query against CloudTrail Lake for complex analytics and filtering.
CloudTrail Lake allows you to run SQL queries against your CloudTrail events for advanced analysis. This is more powerful than the basic lookup functions and allows for complex filtering, aggregation, and analysis.
PAGINATION WORKFLOW: For large result sets, you have two options:
IMPORTANT LIMITATIONS:
CLOUDTRAIL EVENT SCHEMA: All CloudTrail events contain these key fields that you can query:
Core Fields (Always Present):
UserIdentity Object (Always Present):
Optional Fields (Conditionally Present):
Example SQL queries:
QueryResult containing: - query_id: Unique identifier for the query - query_status: Current status of the query - query_result_rows: Results if query completed successfully (only when wait_for_completion=True) - next_token: Token for pagination (only when wait_for_completion=True and results are paginated) - query_statistics: Performance statistics for the query
| Parameters | Type | Description |
|---|---|---|
sql | string | SQL query to execute against CloudTrail Lake. IMPORTANT: You must include a valid Event Data Store (EDS) ID in the FROM clause of your SQL query. Use list_event_data_stores tool to get available EDS IDs first. CloudTrail Lake only supports SELECT statements using Trino-compatible SQL syntax. Example: SELECT * FROM 0233062b-51c6-4d18-8dec-a8c90da840d9 WHERE eventname = 'ConsoleLogin' |
region | string optional | AWS region to query. Defaults to us-east-1. |
wait_for_completion | boolean optional | Whether to wait for query completion and return results. If False, returns immediately with query_id for manual result fetching using get_query_results. Default: True |
list_event_data_storesList available CloudTrail Lake Event Data Stores with their capabilities and event selectors.
Event Data Stores are the storage and query engines for CloudTrail Lake. This tool helps you understand which Event Data Stores are available and their configurations.
Usage: Use this tool to understand which Event Data Stores are available and their configurations. This information is needed when executing CloudTrail Lake queries.
List of available Event Data Stores with their configurations
| Parameters | Type | Description |
|---|---|---|
include_details | boolean optional | Whether to include detailed event selector information (default: true) |
region | string optional | AWS region to query. Defaults to us-east-1. |
lookup_eventsLook up CloudTrail events based on various criteria.
This tool searches CloudTrail events using the LookupEvents API, which provides access to the last 90 days of management events. You can filter by time range and search for specific attribute values.
Usage: Use this tool to find CloudTrail events by various attributes like username, event name, resource name, etc. This is useful for security investigations, troubleshooting, and audit trails.
IMPORTANT PAGINATION REQUIREMENTS:
Dictionary containing: - events: List of CloudTrail events matching the criteria with exact CloudTrail schema - next_token: Token for pagination if more results available - query_params: Parameters used for the query (includes pagination parameters when next_token is present)
| Parameters | Type | Description |
|---|---|---|
attribute_key | string optional | Attribute to search by |
attribute_value | string optional | Value to search for in the specified attribute |
end_time | string optional | End time for event lookup (ISO format or relative like "1 hour ago"). IMPORTANT: When using pagination (next_token), you must provide the exact same end_time as the original request. |
max_results | string optional | Maximum number of events to return (1-50, default: 10) |
next_token | string optional | Token for pagination to fetch the next page of events. IMPORTANT: When using this token, all other parameters (start_time, end_time, attribute_key, attribute_value) must match exactly the original request that generated this token. |
region | string optional | AWS region to query. Defaults to us-east-1. |
start_time | string optional | Start time for event lookup (ISO format or relative like "1 day ago"). IMPORTANT: When using pagination (next_token), you must provide the exact same start_time as the original request. |
{
"mcpServers": {
"awslabs-cloudtrail": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"AWS_PROFILE",
"mcp/cloudtrail-mcp-server"
],
"env": {
"AWS_PROFILE": "default"
}
}
}
}
Content type
Image
Digest
sha256:7952825f4…
Size
120.6 MB
Last updated
2 months ago
docker pull mcp/cloudtrail-mcp-serverPulls:
77
Last week