🌐 Live Dashboard · ▶ Watch Demo
ShieldDB is an enterprise-grade Model Context Protocol (MCP) gateway, security sidecar, and interactive workstation that enables Google Gemini to securely administer databases. Powered by gemini-2.5-flash, the workstation translates plain English instructions into complex database operations. To ensure enterprise compliance and prevent malicious exploits, all Gemini database interactions are intercepted and audited by DuoGuard-0.5B — a state-of-the-art multilingual safety classifier that blocks inbound prompt injections and automatically redacts outbound customer PII.
-
Autonomous Gemini Database Workstation 🤖
- Employs Google Gemini (
gemini-2.5-flash) as the primary cognitive engine. - Translates complex natural language prompts (e.g., "Give me a summary of active users in NY and update their status to active") into safe, structured database commands via Model Context Protocol (MCP) tool bindings.
- Employs Google Gemini (
-
Inbound Guardrails (Safety Shielding) 🛡️
- Intercepts Gemini's incoming instructions to protect database collections against prompt injections, bypass attempts, and destructive command injections.
- Detects risks across 12 distinct safety categories (Jailbreak prompts, Non-violent crimes, Violent crimes, Suicide, etc.) in milliseconds.
-
Outbound Guardrails (PII & Privacy Redaction) 🔒
- Automatically sanitizes retrieved query results before sending them to Gemini or rendering them in the chat workspace.
- Intelligently redacts Emails, Credit Cards, Social Security Numbers, Phone Numbers, Passwords, and API Keys.
- Enables full compliance with strict privacy standards like GDPR, HIPAA, and PCI-DSS.
-
Smart Hybrid Database Engine ⚙️
- Automatically detects live MongoDB Atlas credentials in the environment.
- Falls back to an In-Memory Sandbox (MongoMock) if offline, pre-seeding it with rich customer records so judges can run and evaluate the system instantly.
-
Premium Security & Chat Dashboard 💎
- Includes the Gemini Secure Brain workspace — a clean, real-time interactive chat dashboard to instruct Gemini in plain English.
- Features a Live Security Console & Playground to test benign vs. malicious prompts and visualize DuoGuard risk profiles and query redactors in real-time.
flowchart TD
A[User Prompt] --> B[Google Gemini\ngemini-2.5-flash]
B -->|Secure MCP Tool Call| C[ShieldDB MCP Gateway]
C --> D[Inbound Screening\nDuoGuard-0.5B]
C --> E[Database Adapter\nMongoDB / MongoMock]
D -->|Block injections / jailbreaks| C
E --> F[Outbound Redaction\nScrub Emails / CC / PII]
F --> G[Sanitized Query Results]
G --> B
B --> H[Safe Natural Response]
Ensure you have Python 3.10+ and the uv package manager installed.
To enable the interactive Gemini chat agent workspace, set your Google Gemini API key as an environment variable (or create a .env file in the root directory):
export GEMINI_API_KEY="your_gemini_api_key_here"To ensure instant startup, pre-cache the DuoGuard weights and tokenizers locally:
uv run python -m duogaurd_mcp.main downloadLaunch the FastAPI REST API serving telemetry and playgrounds:
uv run python -m duogaurd_mcp.main dashboardThe API will be available at http://localhost:8000.
To connect ShieldDB to Claude Desktop or Cursor IDE, run:
uv run python -m duogaurd_mcp.main runduogaurd_mcp/
├── pyproject.toml # UV dependency metadata
├── README.md # System documentation
├── duogaurd_mcp/
│ ├── __init__.py
│ ├── moderator.py # Safety classification & PII regex redactor
│ ├── database.py # MongoDB connection & sandbox seed generator
│ ├── server.py # Secure FastMCP tools
│ ├── api.py # FastAPI REST endpoints
│ ├── main.py # CLI controller (run, dashboard, download)
│ └── test.py # Diagnostic test suite
└── dashboard/ # React + TypeScript + Vite frontend
Open-Source under the MIT License. Built for the Google Cloud Rapid Agent Hackathon.