MCP proxy & AI automation platform with a human approval layer
Preloop - The MCP Governance Layer
Overview
Preloop is an open-source, event-driven automation platform with built-in human-in-the-loop safety. AI agents respond to events across your tools automatically. When agents call sensitive operations, Preloop intercepts the request and routes it for human approval.
Preloop acts as an MCP proxy and can be integrated in existing workflows without any infrastructure changes.
Key Features
Core Platform (Open Source)
- Event-Driven Automation: AI agents respond to events across your tools automatically
- Human-in-the-Loop Safety: Intercept sensitive operations and route for human approval
- MCP Server: Standards-based Model Context Protocol (MCP) server
- 6 built-in tools: get_issue, create_issue, update_issue, search, estimate_compliance, improve_compliance
- JWT authentication with per-user tool visibility
- StreamableHTTP transport for Claude Code and other MCP clients
- Tool Management: Configure and manage tool access
- Support for external MCP servers and tool proxying
- Basic approval workflows (single-user) with email + mobile app notifications
- Agentic Flows: Event-driven workflows triggered by issue tracker events
- Issue Tracker Integration: Jira, GitHub, GitLab support with continuous sync
- Vector Search: Intelligent similarity search using embeddings
- Duplicate Detection: Automated detection of duplicate and overlapping issues
- Compliance Metrics: Evaluate issue compliance and get improvement recommendations
- Web UI: Modern interface built with Lit, Vite, and Shoelace Web Components
Looking for Enterprise features? Preloop Enterprise Edition adds RBAC, team-based approvals, advanced audit logging, and more. See Enterprise Features below.
Open Source vs Enterprise (important)
- Open Source: single-user approvals with email + mobile app notifications.
- Enterprise: adds advanced conditions (CEL), team-based approvals (quorum), escalation, and Slack & Mattermost notifications.
- Mobile & Watch apps: the iOS/Watch and Android apps can be used with self-hosted / open-source Preloop deployments.
Supported Issue Trackers
- Jira Cloud and Server
- GitHub Issues
- GitLab Issues
- (More to be added in future releases, including Azure DevOps and Linear)
Architecture
Preloop is designed with a modular architecture:
- Preloop (
./backend/preloop): The main RESTful HTTP API server that provides access to issue tracking systems and vector search capabilities. - Preloop Models (
./backend/preloop/models): Contains the database models (using SQLAlchemy and Pydantic) and CRUD operations for interacting with the PostgreSQL database, including vector embeddings via PGVector. - Preloop Sync (
./backend/preloop/sync): A service responsible for polling configured issue trackers, indexing issues, projects, and organizations in the database, and updating issue embeddings. - Preloop Console (
./frontend): A web application built using Lit, Vite, TypeScript, and Shoelace Web Components.
This structure allows:
- Clear separation of concerns between the API layer, data models, and synchronization logic.
- Independent development and versioning of the core components.
Preloop Console
The Preloop Console is in the frontend directory. It is built using modern web technologies to provide a fast, responsive, and feature-rich user experience.
- Technology Stack: Lit, Vite, TypeScript, and Material Web Components.
Installation
Prerequisites
- Python 3.11+
- PostgreSQL 14+
- PGVector extension for PostgreSQL (for vector search capabilities)
Local Setup
# Clone the repository
git clone https://github.com/spacecode/preloop.git
cd preloop
# Create and activate a virtual environment
python -m venv .venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate
# Install dependencies
pip install -e ".[dev]"
# Set up the database
# Configure your environment
cp .env.example .env
# Edit .env with your settings
Configuration
Environment Variables
Preloop is configured via environment variables. Copy .env.example to .env and customize as needed.
Core Settings
| Variable | Default | Description |
|---|---|---|
DATABASE_URL |
postgresql+psycopg://postgres:postgres@localhost/preloop |
PostgreSQL connection string |
SECRET_KEY |
(required) | Secret key for JWT tokens |
ENVIRONMENT |
development |
Environment (development, production) |
LOG_LEVEL |
INFO |
Log level (DEBUG, INFO, WARNING, ERROR) |
Feature
Tools (6)
get_issueRetrieve an issue from supported issue trackers.create_issueCreate a new issue in supported issue trackers.update_issueUpdate an existing issue in supported issue trackers.searchPerform intelligent similarity search using embeddings.estimate_complianceEvaluate issue compliance and get metrics.improve_complianceGet improvement recommendations for issue compliance.Environment Variables
DATABASE_URLPostgreSQL connection stringSECRET_KEYrequiredSecret key for JWT tokensENVIRONMENTEnvironment (development, production)LOG_LEVELLog level (DEBUG, INFO, WARNING, ERROR)Configuration
{"mcpServers":{"preloop":{"command":"preloop","env":{"DATABASE_URL":"postgresql+psycopg://postgres:postgres@localhost/preloop","SECRET_KEY":"your-secret-key"}}}}