Preloop MCP Server

$git clone https://github.com/spacecode/preloop.git && cd preloop && python -m venv .venv && source .venv/bin/activate && pip install -e "[dev]" && cp .env.example .env
README.md

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:

  1. Preloop (./backend/preloop): The main RESTful HTTP API server that provides access to issue tracking systems and vector search capabilities.
  2. 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.
  3. 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.
  4. 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 string
SECRET_KEYrequiredSecret key for JWT tokens
ENVIRONMENTEnvironment (development, production)
LOG_LEVELLog level (DEBUG, INFO, WARNING, ERROR)

Configuration

claude_desktop_config.json
{"mcpServers":{"preloop":{"command":"preloop","env":{"DATABASE_URL":"postgresql+psycopg://postgres:postgres@localhost/preloop","SECRET_KEY":"your-secret-key"}}}}

Try it

Get issue #123 from GitHub.
Create a new issue in Jira about the bug.
Search for duplicate issues using vector search.
Estimate compliance for the current issue.
Improve compliance recommendations for issue #456.

Frequently Asked Questions

How do I install Preloop?

Install Preloop by running: git clone https://github.com/spacecode/preloop.git && cd preloop && python -m venv .venv && source .venv/bin/activate && pip install -e "[dev]" && cp .env.example .env

What MCP clients work with Preloop?

Preloop works with any MCP-compatible client including Claude Desktop, Claude Code, Cursor, and other editors with MCP support.

Use Preloop with Conare

Manage MCP servers visually, upload persistent context, and never start from zero with Claude Code & Codex.

Try Free