GuardrailAI
An MCP server that evaluates file write requests for sensitive data and compliance using deterministic policies and Google Gemini reasoning, providing auditable governance and risk scoring.
README
GuardrailAI
Autonomous Regulatory Guardrail Agent using MCP and Google Gemini
GuardrailAI is an AI-powered compliance agent that evaluates file write requests before execution. By combining deterministic policy validation with Google Gemini reasoning, it detects sensitive information, explains compliance decisions, and prevents insecure data storage through an auditable governance workflow.
Dashboard Preview
<table align="center"> <tr> <td align="center"> <img src="images/dashboard.png" width="450"><br> <b>AI Governance Dashboard</b> </td> <td align="center"> <img src="images/timeline.png" width="450"><br> <b>Live Audit Timeline</b> </td> </tr>
<tr> <td align="center"> <img src="images/analytics.png" width="450"><br> <b>Risk Analytics</b> </td> <td align="center"> <img src="images/auditor.png" width="450"><br> <b>Gemini Compliance Auditor</b> </td> </tr> </table>
AI Governance Dashboard

Live Audit Timeline
| Risk Analytics | AI Compliance Auditor |
|---|---|
![]() |
![]() |
Problem
AI-powered applications frequently generate and write sensitive information such as passwords, API keys, personally identifiable information (PII), and confidential business data. Traditional rule-based validation lacks contextual reasoning and explainability, making governance and compliance difficult.
GuardrailAI ensures every file write request is evaluated before execution, reducing security risks while providing transparent, explainable decisions.
Solution
GuardrailAI processes every request through an AI-driven compliance pipeline:
- Policy-based security validation
- Sensitive data detection
- Google Gemini compliance reasoning
- Risk score calculation
- Automated approval or rejection
- Immutable audit logging
- Live governance dashboard
System Architecture
<p align="center"> <img src="images/architecture.png" alt="GuardrailAI System Architecture" width="100%"> </p>
<p align="center"> <b>Figure 1.</b> High-level architecture of GuardrailAI illustrating the MCP server, policy engine, Gemini auditor, decision engine, audit logging, and governance dashboard workflow. </p>
Technology Stack
| Layer | Technologies |
|---|---|
| Frontend | HTML, CSS, JavaScript, Chart.js |
| Backend | Node.js, Express.js |
| AI | Google Gemini 2.5 Flash |
| Protocol | Model Context Protocol (MCP) |
Key Features
- MCP-based agent workflow
- Google Gemini compliance reasoning
- Multi-agent architecture
- Policy-driven validation
- API key and secret detection
- PII detection
- Password detection
- Risk scoring
- Explainable AI decisions
- Interactive governance dashboard
- Audit log generation
- Compliance report export
Note : The MCP server communicates via the Model Context Protocol (STDIO transport) and is intended to be run locally with an MCP-compatible client. The deployed web application hosts the dashboard interface and visualization layer.
Project Structure
compliance-nexus/
│
├── agents/
├── api/
├── config/
├── dashboard/
├── logs/
├── output/
├── tools/
├── utils/
├── server.js
├── dashboardServer.js
└── package.json
Setup
Clone the repository
git clone https://github.com/<username>/GuardrailAI.git
Navigate into the project
cd GuardrailAI
Install dependencies
npm install
Create a .env file
GEMINI_API_KEY=YOUR_API_KEY
Run the application
npm start
Open
http://localhost:3000
Competition Concepts Demonstrated
- Model Context Protocol (MCP)
- Multi-Agent System
- Google Gemini Integration
- Security-Focused AI Agent
- Explainable AI
- Deployable Web Application
Future Enhancements
- Policy Management Interface
- Role-Based Access Control
- PDF Compliance Reports
- Historical Compliance Analytics
- Multi-user Support
License
MIT License
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

