> ## Documentation Index
> Fetch the complete documentation index at: https://latch.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Latch - Security Guardrails for AI Agents

> Open-source guard proxy for MCP servers. Stop your AI agent before it does something you'll regret.

## Introduction

AI agents are incredibly powerful. They can read your files, execute shell commands, send emails, query databases, and make API calls on your behalf.

But what happens when your agent decides to:

* Search for passwords in your home directory?
* Delete files it thinks are "temporary"?
* Send confidential data to the wrong recipient?
* Run a shell command that nukes your database?

**You need a human in the loop. You need Latch.**

<div style={{ position: 'relative', paddingBottom: '56.25%', height: 0 }}>
  <iframe src="https://www.loom.com/embed/8afb303827984c4e97453c5ed04608b3" frameBorder="0" allowFullScreen style={{ position: 'absolute', top: 0, left: 0, width: '100%', height: '100%' }} />
</div>

## What is Latch?

Latch is an open-source guard proxy that sits between your AI agent and its tools. Every tool call passes through Latch, which evaluates it against your security policies:

| Action                          | What Happens                                               |
| ------------------------------- | ---------------------------------------------------------- |
| ✅ Allowed operations            | Proceed automatically when allowed by rule (or by default) |
| ⚠️ Approval-required operations | Pause until you approve (when a rule requires approval)    |
| 🛑 Denied operations            | Blocked entirely (when a rule denies)                      |
| 🤖 LLM policies                 | Natural language conditions evaluated in real-time         |

## Quick Example

```bash theme={null}
# Without Latch
Agent: "Search for API keys in ~/"
→ 💥 Agent finds and potentially leaks your secrets

# With Latch
Agent: "Search for API keys in ~/"  
→ ⚠️ Requires approval (or 🛑 denied), depending on your rules
→ You see it in the audit log (with redacted arguments)
→ You decide what happens
```

## Key Features

<CardGroup cols={2}>
  <Card title="Policy Engine" icon="shield">
    Rules based on tool name, action class, domain, and recipient. Most-specific rule wins.
  </Card>

  <Card title="LLM-Evaluated Policies" icon="sparkles">
    Write policy conditions in plain English. An LLM evaluates each tool call against them.
  </Card>

  <Card title="Approval Workflow" icon="check">
    Risky actions pause for your approval. Single-use tokens or time-limited leases.
  </Card>

  <Card title="Telegram Notifications" icon="bell">
    Get notified on your phone. Approve or deny with one tap.
  </Card>

  <Card title="Audit Log" icon="scroll">
    Full history of every tool call, decision, and redacted arguments.
  </Card>

  <Card title="Self-Hosted" icon="server">
    Run on your infrastructure. Your data never leaves your control.
  </Card>
</CardGroup>

## Works With

Latch works with any MCP (Model Context Protocol) compatible client and server:

**Clients:**

* Claude Desktop
* Cursor
* Any MCP-compatible agent

**Servers (examples):**

* Filesystem access
* GitHub operations
* Database queries
* Shell commands
* Email/Slack
* Any custom MCP server

## See It In Action

### The Dashboard

Create workspaces, manage upstreams, and monitor everything in one place.

<img src="https://mintcdn.com/latch/2pDIF1fLOWtW41Q3/docs/assets/dashboard.png?fit=max&auto=format&n=2pDIF1fLOWtW41Q3&q=85&s=aa8d56ab4676bd4071c5528d5676a771" alt="Latch dashboard" width="2690" height="1826" data-path="docs/assets/dashboard.png" />

### Policy Rules

Define what's allowed, what's blocked, and what needs approval.

<img src="https://mintcdn.com/latch/2pDIF1fLOWtW41Q3/docs/assets/policies.png?fit=max&auto=format&n=2pDIF1fLOWtW41Q3&q=85&s=236e2451e8a3070dc2b6374778355f4c" alt="Latch policies" width="2696" height="1822" data-path="docs/assets/policies.png" />

### Audit Log

Every request logged with the decision and redacted arguments.

<img src="https://mintcdn.com/latch/2pDIF1fLOWtW41Q3/docs/assets/audit-logs.png?fit=max&auto=format&n=2pDIF1fLOWtW41Q3&q=85&s=298f3e117cde782230a24c3059be430d" alt="Latch audit log" width="2688" height="1828" data-path="docs/assets/audit-logs.png" />

## Get Started in 5 Minutes

<CardGroup cols={2}>
  <Card title="Quickstart" icon="rocket" href="./quickstart">
    Run Latch locally with Docker and wrap your first MCP server.
  </Card>

  <Card title="Claude Desktop Setup" icon="message-bot" href="./claude-desktop">
    Step-by-step guide to integrate Latch with Claude Desktop.
  </Card>
</CardGroup>

## Open Source

Latch is fully open source under the MIT license.

* [GitHub Repository](https://github.com/latchagent/latch)
* [Report Issues](https://github.com/latchagent/latch/issues)
* [Contributing Guide](https://github.com/latchagent/latch/blob/main/CONTRIBUTING.md)

***

*Built for developers who want AI agents they can actually trust.*
