# Preloop

Sits between your agent and its tools, allowing, denying or holding each call for approval. Adds budgets and per-model spend tracking.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 79
- Author: preloop
- License: Apache-2.0 · policy=link-only · description only; the file stays with the author
- Source: https://github.com/preloop/preloop
- Updated: 2026-10-24
- HTML: https://affpapa.org/en/nevibecode/mcp/preloop

## What it does

Preloop is a self-hostable service with two halves. The control plane is an MCP firewall: it lets a tool call through, blocks it, or parks it until a human approves, and a model gateway counts tokens and money against the agent, session and API key. Policies are written as code in YAML and CEL. The software factory half starts agents on its own — a flow fires on a tracker event, webhook or CI job, runs in a hosted container or on your runner, and lands the work as a pull request.

Local agents come under governance through the CLI. `preloop agents discover` finds their configs and reports what each adapter supports; `preloop agents onboard` routes calls through the managed MCP entry. Steering a running agent needs the runtime plugin, installed with `preloop agents install-plugin`, or `preloop claude` for Claude.

The MCP server itself lives at `https://preloop.ai/mcp/v1`, and Claude needs one add command. What happens next depends on where you point it: Preloop Cloud or your own instance on `localhost`. Without a reachable control plane there is nothing to enforce, because policies and budgets are stored there.

## Requirements
- Remote server: `https://preloop.ai/mcp/v1`

## Install

### Claude Code (native platform)

**Platform CLI: remote server**
```bash
claude mcp add --transport http preloop https://preloop.ai/mcp/v1
```

### Codex

**Platform CLI: remote server**
```bash
codex mcp add preloop --url https://preloop.ai/mcp/v1
```

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "preloop": {
            "url": "https://preloop.ai/mcp/v1"
        }
    }
}
```

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "preloop": {
            "type": "http",
            "url": "https://preloop.ai/mcp/v1"
        }
    }
}
```

### Gemini CLI

**Platform CLI: remote server**
```bash
gemini mcp add -t http preloop https://preloop.ai/mcp/v1
```

## When to use it
- block a dangerous tool call before the agent runs it
- send a call to a human for approval over Slack or phone
- break down spend by model and session
- start an agent from a Jira or GitHub event
- get one timeline of tool calls, policies and cost

## Example prompts
- Add the Preloop MCP server and show me which local agents it finds
- Set a policy so `Bash` calls need approval
- How much did this session spend, and on which models

## Similar
- [REA](https://affpapa.org/en/nevibecode/mcp/rea.md) — MCP server · ★ 386989
- [GitHub](https://affpapa.org/en/nevibecode/mcp/github.md) — MCP server · ★ 33918
- [Netdata](https://affpapa.org/en/nevibecode/mcp/netdata.md) — MCP server · ★ 81115
- [browser-use](https://affpapa.org/en/nevibecode/mcp/browser-use.md) — MCP server · ★ 119160
- [Codebase Memory](https://affpapa.org/en/nevibecode/mcp/codebase-memory.md) — MCP server · ★ 47392
- [mcp-server](https://affpapa.org/en/nevibecode/mcp/mcp-server.md) — MCP server · ★ 43872

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
