{"id":20982,"library":"awslabs-cloudtrail-mcp-server","title":"AWS CloudTrail MCP Server","description":"An AWS Labs MCP (Model Context Protocol) server that provides AI agents with access to AWS CloudTrail logs for security investigation and troubleshooting. Current version 0.0.13, under active development with frequent releases.","status":"active","version":"0.0.13","language":"python","source_language":"en","source_url":"https://github.com/awslabs/cloudtrail-mcp-server","tags":["aws","cloudtrail","mcp","ai","security"],"install":[{"cmd":"pip install awslabs-cloudtrail-mcp-server","lang":"bash","label":"Official install"}],"dependencies":[],"imports":[{"note":"Correct import pattern as per library's main module.","wrong":"","symbol":"CloudTrailMCPServer","correct":"from cloudtrail_mcp_server import CloudTrailMCPServer"}],"quickstart":{"code":"import os\nfrom cloudtrail_mcp_server import CloudTrailMCPServer\n\n# Configure AWS credentials (ensure proper IAM permissions)\naws_access_key_id = os.environ.get('AWS_ACCESS_KEY_ID', '')\naws_secret_access_key = os.environ.get('AWS_SECRET_ACCESS_KEY', '')\nregion = os.environ.get('AWS_DEFAULT_REGION', 'us-east-1')\n\n# Initialize and run the server\nserver = CloudTrailMCPServer(\n    aws_access_key_id=aws_access_key_id,\n    aws_secret_access_key=aws_secret_access_key,\n    region=region\n)\nserver.run()","lang":"python","description":"Start the CloudTrail MCP server with AWS credentials."},"warnings":[{"fix":"Upgrade to Python 3.10+ or use an older version (none exist).","message":"Python 3.10 or higher required. The library uses match/case and other 3.10 features.","severity":"breaking","affected_versions":"<0.0.1"},{"fix":"Attach a policy like AWSCloudTrailReadOnlyAccess to the IAM user/role.","message":"Requires AWS credentials with cloudtrail:LookupEvents permission. Without proper IAM, the server starts but returns empty results.","severity":"gotcha","affected_versions":"all"},{"fix":"Use a proper process supervisor or call server.stop() on shutdown.","message":"The server runs as a subprocess; ensure that the parent process manages its lifecycle to avoid zombie processes.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","problems":[{"fix":"Run 'pip install awslabs-cloudtrail-mcp-server' and verify with 'pip show awslabs-cloudtrail-mcp-server'.","cause":"Package not installed or installed under a different name.","error":"ModuleNotFoundError: No module named 'cloudtrail_mcp_server'"},{"fix":"Set the environment variables or use a credentials file. For example: 'export AWS_ACCESS_KEY_ID=your_key'.","cause":"Missing or invalid AWS credentials in environment variables (AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY).","error":"RuntimeError: AWS credentials not found"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}