Intelligent Snowflake MCP Agent specialized in DataOps and Administration.
Icebreaker is an advanced Model Context Protocol (MCP) server that provides intelligent Snowflake database management capabilities. It combines the reliability of the official Snowflake Labs MCP implementation with community best practices and intelligent automation features.
- Robust Connection Management: Singleton pattern with health monitoring and background refresh
- Multi-Format Configuration: Support for both YAML and TOML configuration files
- Advanced SQL Validation: Multi-pattern injection detection and comprehensive write operation analysis
- Production-Ready Testing: Explicit marker-based separation between unit and integration tests
- Multi-Layer Safety Validation: Business rule enforcement and pre-operation impact assessment
- Comprehensive Audit Logging: Immutable audit trails with detailed operation context
- Approval Workflows: Configurable approval chains for high-risk administrative operations
- Rollback Capabilities: Automatic rollback plan generation for destructive operations
- Warehouse Management: Intelligent suspension, resizing, and load optimization
- User Administration: Safe user lifecycle management with role hierarchy analysis
- Query Management: Advanced query diagnostics and performance optimization
- Pipeline Orchestration: Automated data pipeline monitoring and self-healing
- Performance Diagnostics: Comprehensive query performance analysis with bottleneck identification
- Cost Optimization: Financial operations analysis with cost-saving recommendations
- Security Intelligence: Advanced access pattern analysis and threat detection
- Predictive Analytics: Resource usage forecasting and capacity planning
- Python: 3.12 or higher
- Package Manager:
uv(recommended) or pip - Snowflake Account: With appropriate permissions for intended operations
# Clone the repository
git clone <repository-url>
cd icebreaker-mcp
# Install dependencies with uv
uv sync
# Or with pip
pip install -e .-
Copy environment template:
cp .env.example .env
-
Configure Snowflake credentials in
.env:# Required SNOWFLAKE_ACCOUNT=your_account_identifier SNOWFLAKE_USER=your_username SNOWFLAKE_ROLE=your_default_role SNOWFLAKE_WAREHOUSE=your_default_warehouse # Choose authentication method SNOWFLAKE_PASSWORD=your_password # OR SNOWFLAKE_PRIVATE_KEY_PATH=/path/to/private_key.pem # OR SNOWFLAKE_AUTHENTICATOR=externalbrowser
# Run with stdio transport (default)
icebreaker-mcp
# Run with HTTP transport
icebreaker-mcp --transport http --host 0.0.0.0 --port 9000
# Run with custom configuration
icebreaker-mcp --config config/production.yaml
# Run with safe mode disabled (full administrative access)
icebreaker-mcp --no-safe-modeicebreaker-mcp/
βββ src/icebreaker/ # Main package
β βββ core/ # Core infrastructure
β β βββ config.py # Configuration management
β β βββ errors.py # Custom error classes
β β βββ ... # Connection, logging, safety
β βββ services/ # Business logic layer
β β βββ discovery_service.py # Tier 1: Data discovery
β β βββ operational_service.py # Tier 2: DataOps operations
β β βββ intelligence_service.py # Tier 4: AI-powered insights
β β βββ ...
β βββ tools/ # MCP tool implementations
β βββ server.py # FastMCP server entry point
βββ tests/ # Test suite
β βββ unit/ # Unit tests (fast)
β βββ integration/ # Integration tests (requires Snowflake)
β βββ conftest.py # Test configuration
βββ docs/ # Documentation
βββ pyproject.toml # Project configuration
βββ .env.example # Environment template
# Run unit tests only (default - fast)
pytest
# Run integration tests (requires Snowflake credentials)
pytest -m integration
# Run specific test categories
pytest -m "unit or contract"
pytest -m "safety"
# Run all tests
pytest -m "unit or integration or contract or safety"
# Run with coverage
pytest --cov=icebreaker# Format code
uv run black .
# Lint code
uv run ruff check .
# Type checking
uv run mypy .
# Run all quality checks
uv run black . && uv run ruff check . && uv run mypy . && pytest -m unitKey configuration options:
- ICEBREAKER_SAFE_MODE: Enable safety checks for administrative operations (default: true)
- ICEBREAKER_QUERY_TIMEOUT: Query timeout in seconds (default: 300)
- ICEBREAKER_MAX_QUERY_RESULTS: Maximum results per query (default: 10000)
- ICEBREAKER_AUDIT_LOGGING: Enable comprehensive audit logging (default: true)
- ICEBREAKER_DEBUG: Enable debug mode for detailed logging (default: false)
You can also use YAML configuration files:
# config/production.yaml
snowflake:
account: "your_account"
user: "your_user"
role: "your_role"
warehouse: "your_warehouse"
auth_type: "private_key"
private_key_path: "/path/to/key.pem"
safe_mode: true
query_timeout: 300
max_query_results: 10000
audit_logging: true
environment: "production"Icebreaker follows a layered architecture:
- Foundation Layer: Reuses official Snowflake MCP core components
- Community Enhancement Layer: Integrates best practices from community implementations
- Safety Layer: Multi-layer validation and governance
- Intelligence Layer: AI-powered analytics and automation
- SQL Injection Protection: Multi-pattern detection beyond basic keyword matching
- Write Operation Detection: Comprehensive analysis including CTE write detection
- Connection Security: Support for multiple authentication methods including private key
- Audit Logging: Complete audit trail for all operations
- Safe Mode: Configurable safety restrictions for administrative operations
- Phase 1 (Current): Foundation & Tier 1 - Data discovery and basic queries
- Phase 2: Tier 2 - Operational Management (DataOps)
- Phase 3: Tier 3 - Data Engineering & Movement
- Phase 4: Tier 4 - High-Level Intelligent Actions
See docs/DEVELOPMENT_PLAN.md for detailed implementation roadmap.
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Make your changes following the coding standards
- Run tests and quality checks
- Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Snowflake Labs: For the official MCP implementation providing the foundation
- Community Contributors: For the excellent reference implementations that informed best practices
- diasv_mcp: For exemplary code structure and testing patterns
- snowflake-mcp-server: For advanced connection management patterns
- mcp-snowflake-server3: For sophisticated SQL analysis capabilities
For questions, issues, or contributions:
- π Documentation
- π Issues
- π¬ Discussions