Provides structured access to AWS Security Lake data, enabling search for IP addresses, GuardDuty findings, and exploration of security data sources across AWS services like Athena, S3, and IAM.
Amazon Security Lake MCP Server
An MCP (Model Context Protocol) server for querying Amazon Security Lake data using AWS Athena. This server provides structured access to OCSF-normalized security data stored in Security Lake, enabling AI assistants and applications to search for IP addresses, GuardDuty findings, and explore available data sources.
Features
IP Address Search: Search for IP addresses across Security Lake data sources (source and destination)
GuardDuty Findings: Query GuardDuty security findings with filtering by ID, severity, and type
Data Source Discovery: List and analyze available Security Lake data sources and tables
OCSF Compliance: Built-in OCSF (Open Cybersecurity Schema Framework) schema validation
AWS Integration: Seamless integration with AWS Athena, S3, and IAM
Security-First: Input validation, query sanitization, and least-privilege access
Requirements
Python 3.10 or higher
AWS account with Amazon Security Lake configured
AWS credentials configured (IAM role, profile, or environment variables)
Access to AWS Athena and the Security Lake database
Installation
Option 1: Using pip (recommended)
Option 2: From source
Option 3: Using Docker
Configuration
Automatic Resource Discovery (Recommended)
The MCP server can automatically discover your Security Lake resources! Simply configure your AWS credentials and the server will find:
Security Lake S3 buckets for Athena query results
Security Lake Glue database names
Appropriate IAM permissions and configurations
Minimal Configuration:
Test Discovery:
Manual Configuration
If you prefer manual configuration or auto-discovery fails:
Configuration File
Create a .env
file in your project directory:
AWS Permissions
The MCP server requires the following AWS permissions:
Usage
Integrating with Claude Desktop
To use this MCP server with Claude Desktop, you need to configure it in Claude Desktop's settings.
Step 1: Install the MCP Server
Option A: Using pipx (Recommended for Claude Desktop)
Option B: Using pip with virtual environment
Find the installed command path:
Step 2: Configure Claude Desktop
Add the MCP server to your Claude Desktop configuration. The configuration file location depends on your operating system:
macOS:
~/Library/Application Support/Claude/claude_desktop_config.json
Windows:
%APPDATA%\Claude\claude_desktop_config.json
Linux:
~/.config/Claude/claude_desktop_config.json
Option A: Using Full Path to Command (Recommended)
Replace
Option B: Using Python Module (Most Reliable)
Option C: Using Python Path (if not installed globally)
Step 3: Restart Claude Desktop
After saving the configuration file, restart Claude Desktop completely (quit and relaunch the application).
Step 4: Verify Connection
In Claude Desktop, you can now ask questions like:
"Can you discover my Security Lake resources?"
"Search for IP address 192.168.1.100 in my security data"
"Show me recent high-severity GuardDuty findings"
"What data sources are available in my Security Lake?"
Example Claude Desktop Conversation
Advanced Claude Desktop Configuration
For production use, consider these additional configurations:
Environment-Specific Configuration:
Starting the MCP Server (Standalone)
You can also run the server standalone for testing:
Available Tools
1. Search IP Addresses
Search for IP addresses in Security Lake data:
Parameters:
ip_address
(required): IP address to search for (IPv4 or IPv6)start_time
(optional): Start time in ISO format (default: 7 days ago)end_time
(optional): End time in ISO format (default: now)sources
(optional): Data sources to search (guardduty, cloudtrail, vpcflow, etc.)limit
(optional): Maximum results to return (default: 100, max: 1000)
2. Search GuardDuty Findings
Query GuardDuty security findings:
Parameters:
finding_id
(optional): Specific GuardDuty finding IDseverity
(optional): Severity level (Critical, High, Medium, Low, Informational)finding_type
(optional): Type of finding to search forstart_time
(optional): Start time in ISO format (default: 7 days ago)end_time
(optional): End time in ISO format (default: now)limit
(optional): Maximum results to return (default: 100, max: 1000)
3. List Data Sources
Discover available Security Lake data sources:
Parameters:
include_schema
(optional): Include detailed table schema information (default: false)
4. Discover AWS Resources
Automatically discover Security Lake resources in your AWS account:
This tool scans your AWS account to find:
Security Lake S3 buckets and databases
Athena output locations
Configuration recommendations
Setup validation
5. Universal Security Search
Intelligent search across all available Security Lake data sources:
Query Types:
findings
: Search security findings (GuardDuty, Security Hub)network
: Search network activity (VPC Flow, DNS, Route53)api_calls
: Search API activity (CloudTrail)ip_search
: Search by IP address across all sources
Key Features:
Automatically adapts to available data sources
Supports both OCSF 1.0 and 2.0 schemas
Intelligent fallback (e.g., Security Hub for GuardDuty data)
Unified result format across different sources
6. Test Connection
Verify connectivity to AWS services:
Response Format
All tools return responses in a consistent format:
Example Response - IP Search
Development
Setting up Development Environment
Running Tests
Code Quality
Security Considerations
Input Validation
All IP addresses are validated before querying
Query parameters are sanitized to prevent injection attacks
Time ranges are validated for reasonableness
Access Control
Uses AWS IAM for authentication and authorization
Supports least-privilege access patterns
Query results are limited to prevent resource exhaustion
Data Protection
No sensitive data is logged
Query results can be filtered to remove sensitive information
Supports encryption in transit and at rest through AWS services
Troubleshooting
Common Issues
1. Command Not Found (ENOENT Error)
Solution: Claude Desktop cannot find the asl-mcp-server
command. Use one of these fixes:
Fix A: Use Full Command Path
Fix B: Use Python Module (Most Reliable)
2. AWS Credentials Not Found
Solution: Configure AWS credentials using one of these methods:
Set
AWS_PROFILE
environment variableConfigure
~/.aws/credentials
fileUse IAM roles (recommended for EC2/Lambda)
Set
AWS_ACCESS_KEY_ID
andAWS_SECRET_ACCESS_KEY
environment variables
2. Auto-Discovery Failed
Solution: Either enable manual configuration or create required resources:
Option A: Use Manual Configuration
Option B: Create Athena Results Bucket
Option C: Run Discovery Tool
Use the discover_aws_resources
tool to see what's missing and get specific recommendations.
3. Security Lake Database Not Found
Solution:
Verify Security Lake is enabled in your AWS account
Check that the database name is correct
Ensure you have permissions to access the Glue catalog
4. Query Timeout
Solution:
Increase
ASL_MCP_QUERY_TIMEOUT_SECONDS
Use more specific time ranges to reduce data scanned
Add appropriate WHERE clauses to filter results
Performance Optimization
Use specific time ranges: Always specify
start_time
andend_time
to leverage partitioningLimit results: Use appropriate
limit
values to avoid large result setsFilter by source: Specify
sources
parameter to query only relevant tablesMonitor costs: Large queries can incur significant Athena charges
Debugging
Enable debug logging:
This will provide detailed information about:
Query construction and execution
AWS API calls
Result processing
Error details
Contributing
Fork the repository
Create a feature branch (
git checkout -b feature/amazing-feature
)Make your changes
Add tests for new functionality
Ensure all tests pass (
pytest
)Commit your changes (
git commit -m 'Add amazing feature'
)Push to the branch (
git push origin feature/amazing-feature
)Open a Pull Request
License
This project is licensed under the MIT License - see the LICENSE file for details.
Support
For issues and questions:
Open an issue on GitHub
Check the troubleshooting section above
Review AWS Security Lake documentation
Consult the OCSF specification
Related Projects
Changelog
v0.1.0 (Initial Release)
IP address search functionality
GuardDuty findings search
Data source discovery
OCSF schema validation
Comprehensive test suite
AWS integration with proper error handling
This server cannot be installed
remote-capable server
The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.
Provides structured access to OCSF-normalized security data stored in Amazon Security Lake, enabling AI assistants to search for IP addresses, GuardDuty findings, and explore available data sources.
Related MCP Servers
- -securityFlicense-qualityAn open standard server implementation that enables AI assistants to directly access APIs and services through Model Context Protocol, built using Cloudflare Workers for scalability.Last updated -
- -securityFlicense-qualityProvides secure access to AWS S3 buckets through pre-signed URLs, enabling listing, downloading, uploading, and deleting objects.Last updated -2
- AsecurityAlicenseAqualityA Model Context Protocol server that connects AI assistants like Claude to AWS security services, allowing them to autonomously query, inspect, and analyze AWS infrastructure for security issues and misconfigurations.Last updated -75Apache 2.0
- -securityFlicense-qualityProvides AI assistants with full-text search access to your Obsidian vault, allowing them to query, retrieve, and analyze notes through the Model Context Protocol.Last updated -3