Optional integration for server-side natural language processing to transform natural language security requirements into Cerbos YAML policies using OpenAI GPT models.
π§© GlassTape Policy Builder MCP Server
Transform natural language into production-ready AI governance policies.
GlassTape Policy Builder is an open-source MCP server that converts natural-language security requirements into Cerbos YAML policies with automated validation, testing, and red-teaming.
It enables security and engineering teams to integrate AI agents and applications with policy-as-code frameworksβbringing zero-trust guardrails to tool-call interception, data access, and model workflows.
π Features
βοΈ Natural-Language to Policy β Generate Cerbos policies from plain English using Claude or AWS Q
π§ Automated Validation β Uses the Cerbos CLI (
cerbos compile,cerbos test) for syntax and logic checksπ§ͺ Red-Team Analysis β 6-point security analysis with automatic improvement suggestions
π§© MCP Integration β Works natively in IDEs like Cursor, Zed, and Claude Desktop
π Air-Gapped Operation β Local-first design with no external dependencies
π·οΈ Topic-Based Governance β 40+ content topics with safety categorization
π§Ύ Compliance Templates β Built-in templates for SOX, HIPAA, PCI-DSS, and EU AI Act
π Quick Start
1. Prerequisites
Install Cerbos CLI (required for policy validation):
2. Install from Source
3. Configure Your MCP Client
Claude Desktop (~/Library/Application Support/Claude/claude_desktop_config.json):
Cursor/Zed: Add similar configuration in your IDE's MCP settings.
Optional: Server-side LLM (for natural language processing):
4. Usage Examples
Generate a Policy (in Claude Desktop or MCP-enabled IDE):
List Available Templates:
Validate a Policy:
5. Troubleshooting
Cerbos CLI not found:
Ensure Cerbos CLI is installed and in your PATH
Run
cerbos --versionto verify installation (note:--versionnotversion)
MCP server not connecting:
Check your MCP client configuration
Restart your IDE after configuration changes
Verify the command path is correct:
which glasstape-policy-builder-mcp
Installation fails with "Unable to determine which files to ship":
This is a known hatch build issue - ensure you're in the correct directory
The pyproject.toml should include
[tool.hatch.build.targets.wheel]configuration
Import errors with MCP:
Ensure you have the correct MCP imports:
from mcp.server import ServerTry reinstalling:
pip install -e . --force-reinstall
Policy validation fails:
Check YAML syntax in generated policy
Ensure Cerbos CLI is working:
cerbos compile --helpReview error messages for specific issues
Command not found after installation:
Ensure you have Python 3.10 or higher
Check that the entry point is correctly configured in pyproject.toml
π¦ Available Tools
When connected via MCP, you can use these tools in Claude or your IDE:
Tool | What it does |
| Transform natural language β validated Cerbos YAML with topic governance |
| Check policy syntax with
|
| Run test suites against policies with
|
| 6-point security analysis with automatic improvement suggestions |
| Browse built-in templates (finance, healthcare, AI safety) |
Example workflow:
π§ͺ Example Output
Input:
Generated Policy with Topic Governance:
Plus:
β Topic-based governance (payment, pii detection)
β Safety categorization (G/PG/PG_13/R/adult_content)
β 15+ automated test cases
β Validated by
cerbos compileβ 6-point security analysis
β Ready-to-deploy bundle
π Complete Examples
Category | Example | Description |
Finance | Payment execution with limits | |
Healthcare | HIPAA-compliant PHI access | |
AI Safety | Model invocation with guardrails | |
Data Access | GDPR-compliant PII export control | |
System | Admin access with MFA |
See examples/README.md for complete examples.
π§± Architecture
Key Innovation: ICP (Intermediate Canonical Policy) serves as a language-agnostic intermediate representation, enabling deterministic generation, policy portability, and formal verification.
π§ͺ Development
π€ Contributing
We welcome contributions! See CONTRIBUTING.md for guidelines.
Quick Links:
πͺ License
Released under the Apache 2.0 License. Β© 2025 GlassTape, Inc.
π‘ Links
π GlassTape Website
π Documentation
π§± Cerbos Documentation
π Report Issues
Built with β€οΈ by β Making AI agents secure by default.
This server cannot be installed