Skip to content

Quick Start: AI Agent Control in 5 Minutes

Welcome! This guide walks you through setting up Preloop end-to-end — from signup to testing layered access rules with Claude Code.

Already running an agent locally?

The fastest path is the one‑line CLI install. It detects your existing agents (Claude Code, Codex CLI, Gemini CLI, OpenClaw, OpenCode, …), creates an account if needed, and onboards them in under a minute. See Onboard local agents with the CLI before continuing here.

curl -fsSL https://preloop.ai/install/cli | sh

Watch the full demo

See the complete flow in action: Watch on YouTube

What You'll Accomplish

  • Create your account with a 14-day free trial
  • Connect an MCP server and scan its tools
  • Create approval workflows and layered access rules
  • Connect Claude Code and the mobile app
  • Test three payment scenarios: auto-allow, deny, and async approval

Ready to build agentic workflows? Continue to Part 2: Agentic Flows


Step 1: Create Your Account

  1. Go to https://preloop.ai and click Sign Up
  2. Complete the Stripe checkout to start your 14-day free trial
  3. Enter your username and organization name
  4. Set your password on the welcome page
From landing page to logged in

Step 2: Add an MCP Server

We host an example MCP server with a pay tool for testing.

  1. Navigate to Tools & MCP in the sidebar
  2. Click + Add SourceMCP Server
  3. Fill in:
    • Name: Example MCP Server
    • URL: https://example-mcp.preloop.ai/mcp
    • Transport: http-streaming
    • Auth Type: none
  4. Click Add, then Scan Tools
Adding the example MCP server and scanning for tools

Step 3: Create Approval Workflows & Access Rules

Preloop lets you layer multiple rules on each tool. In this demo we create two approval workflows and four rules that together implement a tiered payment policy.

Create Approval Workflows

  1. Go to Approval Workflows and click Create Workflow
  2. Create a Support workflow — approvers: your support team, quorum: 1
  3. Create a CFO workflow — approvers: your CFO / finance team, quorum: 1
Creating the Support and CFO approval workflows

Configure Layered Access Rules

Back on the pay tool card, add four rules (evaluated top to bottom):

Priority Condition Action Workflow
1 amount <= 100 Allow
2 amount <= 200 Require Approval Support
3 amount <= 1000 Require Approval CFO
4 (default) Deny

Enable Require Justification so agents must explain why they need to call the tool.

Layered access rules: allow → approval → deny based on amount

What Just Happened?

You prelooped the pay tool! The Preloop logo badge now appears on the tool card, indicating that access rules are enforced before execution.


Step 4: Connect Claude Code

Create an API Key

  1. Click Setup Instructions on any tool card
  2. Click Create New API Key, name it, and copy the key
Creating an API key from the setup instructions panel

Save Your API Key

You won't see it again! Store it somewhere safe.

Configure Claude Code

Copy the claude mcp add command shown in the setup instructions and paste it in your terminal (replace YOUR_API_KEY):

claude mcp add \
  --transport http \
  --header "Authorization: Bearer YOUR_API_KEY" \
  preloop \
  https://preloop.ai/mcp/v1

One‑command alternative

You can skip the manual claude mcp add step entirely by running preloop agents discover (or curl -fsSL https://preloop.ai/install/cli | sh on a fresh machine). The CLI auto‑detects Claude Code (and Codex / Gemini / OpenClaw / OpenCode / …), wires the MCP server through Preloop with the correct token, and lets you confirm each change. See Onboard local agents with the CLI.

Configuring Claude Code in the terminal

Install the Mobile App (Optional)

Download the Preloop mobile app on your iPhone, iPad, or Android device to approve requests on the go.

Logging into the Preloop iOS app

Step 5: Test the Approval Flow

With the layered rules in place, try three payment scenarios:

Scenario A: Auto-Allow ($50 payment)

$ claude -p 'Pay $50 to Marvin for lunch' --allowedTools mcp__preloop__pay
The payment of $50 to Marvin has been completed successfully.

The payment is under $100, so it's automatically allowed — no approval needed.

$50 payment auto-allowed by the first rule

Scenario B: Denied ($5,000 payment)

$ claude -p 'Pay $5000 to Marvin for a yacht' --allowedTools mcp__preloop__pay
The payment was denied. Amount $5000 exceeds the maximum allowed threshold.

The payment exceeds $1,000, hitting the deny rule. Claude receives the denial immediately.

$5,000 payment denied by the default deny rule

Scenario C: Async Approval ($150 payment)

$ claude -p 'Pay $150 to Marvin for office supplies' --allowedTools mcp__preloop__pay
Waiting for approval...

The payment is between $100 and $200, triggering the Support approval workflow. Approve it from your phone or the web dashboard:

$150 payment requires Support approval — approved via the mobile app

Review the Audit Trail

Every tool call — allowed, denied, or approved — is logged in the Audit Trail:

Full audit trail showing all three payment scenarios

Success!

You've just:

  • Created your Preloop account and API key
  • Connected an MCP server and scanned its tools
  • Built layered access rules with two approval workflows
  • Tested auto-allow, deny, and async approval scenarios
  • Reviewed the full audit trail

What's Next?

  • Build Agentic Flows


    Create event-driven workflows that use your protected tools with AI agents.

    Continue to Part 2

  • Mobile Apps


    Approve requests from your iPhone, iPad, Apple Watch, or Android device.

    Setup Mobile Apps

  • Advanced Conditions


    Write complex approval conditions using CEL expressions.

    Learn CEL

  • Team Approvals


    Configure quorum, escalation, and team-based approval workflows.

    Team Approvals


Need Help?