AWS Data Discovery & PII Detection Agent
A comprehensive MCP server for automated AWS data discovery, PII detection, and data governance using Lake Formation.
README
AWS Data Discovery & PII Detection Agent
A comprehensive MCP (Model Context Protocol) server for automated AWS data discovery, PII detection, and data governance using Lake Formation. This comprehensive server provides automated data discovery, PII classification, and governance workflows, featuring 14+ operational tools for discovering AWS data sources, creating and running Glue crawlers, applying Lake Formation tags, cataloging data, detecting sensitive data, launching interactive dashboards, and generating compliance documentation.
Available MCP Tools
Data Discovery & Orchestration
orchestrate_data_discovery- Complete data discovery workflow with S3, DynamoDB, Glue cataloging, and PII detectiondiscover_aws_data_sources- Discover S3 buckets and DynamoDB tables across AWS regionsget_dashboard_data- Run data discovery workflow and prepare data for dashboard displaylaunch_data_discovery_dashboard- Launch interactive Streamlit dashboard at http://localhost:8501
Data Cataloging & Classification
catalog_with_glue- Create and run Glue crawlers to catalog S3 and DynamoDB data sourcesclassify_and_tag_data- Classify data and apply Lake Formation tags for governancegenerate_architecture_diagram- Generate AWS architecture diagrams for discovered infrastructure
AWS Labs MCP Integration
list_s3_buckets- List S3 buckets using s3-tables-mcp-servermanage_aws_glue_databases- Create Glue databases using aws-dataprocessing-mcp-serverlist_dynamodb_tables- List DynamoDB tables using dynamodb-mcp-server
Glue Crawler Operations
create_glue_crawler- Create Glue crawlers for S3 and DynamoDB targetsstart_glue_crawler- Start/run Glue crawlers to catalog dataget_glue_crawler_status- Monitor crawler execution status (RUNNING, SUCCEEDED, FAILED)
Lake Formation Integration
create_lf_tags- Create Lake Formation tag definitions for data governanceregister_s3_with_lakeformation- Register S3 locations with Lake Formationregister_table_with_lakeformation- Register Glue tables with Lake Formationapply_lf_tags- Apply Lake Formation tags to resources based on PII detection
Available MCP Resources
discovery://s3/buckets- List of discovered S3 bucketsdiscovery://dynamodb/tables- List of discovered DynamoDB tablescatalog://glue/databases- Cataloged databases in Glueclassification://pii/results- Data classification and PII detection resultslakeformation://tags/definitions- Lake Formation tag definitions for governancelakeformation://resources/registered- S3 locations and tables registered with Lake Formationlakeformation://tags/applied- Applied Lake Formation tags by resource
Available MCP Prompts
classify_data_sensitivity- Classify data sensitivity based on content analysisgenerate_compliance_tags- Generate Lake Formation tags for compliance requirementscreate_data_governance_policy- Create data governance policy based on discovered datasetup_lakeformation_governance- Setup complete Lake Formation governance for discovered resources
Instructions
The MCP Server for AWS data discovery and classification provides a comprehensive set of tools for discovering, cataloging, and classifying sensitive data across AWS environments.
To use these tools, ensure you have proper AWS credentials configured with appropriate permissions for S3, DynamoDB, Glue, and Comprehend operations. The server will automatically use credentials from environment variables or other standard AWS credential sources.
All tools support an optional region parameter to specify which AWS region to operate in. If not provided, it will use the AWS_REGION environment variable or default to 'us-west-2'.
🚀 Features
- Automated Data Discovery: Discover S3 buckets and DynamoDB tables across AWS regions
- PII Detection: Identify sensitive data using AWS Comprehend and pattern matching
- Data Cataloging: Create and manage AWS Glue databases and tables
- Lake Formation Integration: Complete governance with automated tagging and permissions
- Interactive Dashboard: Real-time visualization with Streamlit
- Architecture Diagrams: Auto-generate AWS architecture documentation
- MCP Integration: Leverages official AWS Labs MCP servers
🏗️ Architecture
┌─────────────────────────────────────┐
│ FastMCP Orchestrator Server │
│ (data-discovery-orchestrator) │
└─────────────┬───────────────────────┘
│
▼
┌─────────────────────────────────────┐
│ AWS Labs MCP Servers │
│ • aws-dataprocessing-mcp-server │
│ • dynamodb-mcp-server │
│ • s3-tables-mcp-server │
│ • aws-diagram-mcp-server │
└─────────────┬───────────────────────┘
│
▼
┌─────────────────────────────────────┐
│ AWS Services │
│ • Amazon S3 │
│ • Amazon DynamoDB │
│ • AWS Glue │
│ • AWS Lake Formation │
│ • Amazon Comprehend │
└─────────────────────────────────────┘
📋 Prerequisites
- Python 3.8+
- Node.js 18+ (required for AWS Labs MCP servers)
- AWS CLI configured with appropriate permissions:
- S3: ListBucket, GetObject
- DynamoDB: ListTables, DescribeTable, Scan
- Glue: CreateDatabase, CreateTable, GetDatabase, GetTable
- Lake Formation: RegisterResource, AddLFTagsToResource
- Comprehend: DetectPiiEntities
🛠️ Installation
1. Install AWS Labs MCP Servers
npm install -g @awslabs/aws-dataprocessing-mcp-server
npm install -g @awslabs/dynamodb-mcp-server
npm install -g @awslabs/s3-tables-mcp-server
npm install -g @awslabs/aws-diagram-mcp-server
2. Install Python Dependencies
git clone <repository-url>
cd aws-data-discovery-agent
pip install -r requirements.txt
3. Configure AWS Credentials
aws configure
export AWS_REGION=us-west-2
🚀 Quick Start
Run Complete Data Discovery Workflow
python servers/run_data_discovery_agent.py
This will:
- Discover S3 buckets and DynamoDB tables
- Create Glue databases for cataloging
- Run Glue crawlers to catalog data
- Detect PII in cataloged data
- Register resources with Lake Formation
- Apply governance tags based on PII detection
- Generate architecture diagrams
Launch Interactive Dashboard
streamlit run servers/pii_dashboard.py
Access at http://localhost:8501 to view:
- Real-time data discovery metrics
- PII classification results
- Lake Formation governance status
- Risk assessments and compliance tracking
🔧 MCP Server Configuration
Add to your MCP client configuration (e.g., ~/.aws/amazonq/mcp.json):
{
"mcpServers": {
"aws-data-discovery-agent": {
"command": "python",
"args": ["~/aws-data-discovery-agent/servers/mcp_server_orchestrator.py", "--allow-write"],
"env": {
"AWS_REGION": "us-west-2",
"AWS_PROFILE": "default"
},
"disabled": false,
"autoApprove": []
}
}
}
🛠️ Available MCP Tools
Data Discovery & Orchestration
orchestrate_data_discovery- Complete workflow with S3, DynamoDB, Glue, and PII detectiondiscover_aws_data_sources- Discover data sources across AWS regionsget_dashboard_data- Prepare data for dashboard displaylaunch_data_discovery_dashboard- Launch Streamlit dashboard
Data Cataloging & Classification
catalog_with_glue- Create and run Glue crawlersclassify_and_tag_data- Classify data and apply Lake Formation tagsgenerate_architecture_diagram- Generate AWS architecture diagrams
Lake Formation Integration
create_lf_tags- Create Lake Formation tag definitionsregister_s3_with_lakeformation- Register S3 locationsregister_table_with_lakeformation- Register Glue tablesapply_lf_tags- Apply tags based on PII detection
AWS Labs MCP Integration
list_s3_buckets- List S3 buckets via s3-tables-mcp-servermanage_aws_glue_databases- Manage Glue databases via aws-dataprocessing-mcp-serverlist_dynamodb_tables- List DynamoDB tables via dynamodb-mcp-server
🏷️ Lake Formation Governance
Automated Tag Definitions
- PIIType: EMAIL, SSN, PHONE, NAME, ADDRESS, CREDIT_CARD, DATE_OF_BIRTH, SALARY, AGE, NONE
- DataClassification: NO_RISK, LOW_RISK, MEDIUM_RISK, HIGH_RISK, CRITICAL_RISK
- AccessLevel: PUBLIC, INTERNAL, CONFIDENTIAL, RESTRICTED, TOP_SECRET
- DataGovernance: PII_DETECTED, REQUIRES_MASKING, ACCESS_RESTRICTED, PUBLIC
- PIIClassification: SENSITIVE, HIGHLY_SENSITIVE, CONFIDENTIAL
Resource Registration
- S3 locations automatically registered with Lake Formation
- Glue tables registered with Lake Formation
- Handles existing registrations gracefully
Risk-Based Tagging
- Tags applied based on actual PII detection results
- Column-level and table-level tagging
- Automated access control classification
🤝 Contributing
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests for new functionality
- Run the test suite
- Submit a pull request
📄 License
This project is licensed under the MIT License - see the LICENSE file for details.
🆘 Support
- Issues: Report bugs and feature requests via GitHub Issues
- Documentation: See the
docs/directory for detailed documentation
🎯 Roadmap
- [ ] Support for additional AWS data sources (RDS, Redshift)
- [ ] Enhanced PII detection with custom models
- [ ] Integration with AWS Config for compliance monitoring
- [ ] Multi-account support
- [ ] Advanced data lineage tracking
- [ ] Custom governance policies
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。