# Liso CLI & MCP Server — Scoped, Approval-Gated Secrets for AI Agents

> Last updated: 2026-12-03 | Canonical URL: https://lisovault.com/cli-mcp | License: Apache-2.0

`liso mcp` is a Model Context Protocol server built into the open-source `liso` CLI (`dart/cli`). It gives AI coding assistants (Claude Code, Claude Desktop, Cursor, VS Code, Windsurf, OpenAI Codex) scoped, human-approved access to your end-to-end encrypted Liso vault across **36 MCP tools**, over stdio or Streamable HTTP on `127.0.0.1`.

## Quick Install & One-Command Client Setup

```bash
# Install signed release binary (macOS / Linux)
curl -fsSLO https://raw.githubusercontent.com/Liso-Vault/liso/main/dart/cli/install/install.sh
bash install.sh --require-cosign

# Sign in via QR pairing and unlock a human session
liso login --qr
export LISO_SESSION="$(liso unlock --raw)"

# Configure your AI client in one command (creates profile, mints la1 token, merges config with 0600 perms)
liso mcp setup --client claude-code --create-token --write
liso mcp doctor
```

## Supported MCP Clients

| Client | Config Path | Setup Command |
| --- | --- | --- |
| Claude Code | `~/.claude.json` | `liso mcp setup --client claude-code --create-token --write` |
| Claude Desktop | `claude_desktop_config.json` | `liso mcp setup --client claude-desktop --create-token --write` |
| Cursor | `~/.cursor/mcp.json` | `liso mcp setup --client cursor --create-token --write` |
| VS Code | `User/mcp.json (servers key)` | `liso mcp setup --client vscode --create-token --write` |
| Windsurf | `~/.codeium/windsurf/mcp_config.json` | `liso mcp setup --client windsurf --create-token --write` |
| OpenAI Codex CLI | `~/.codex/config.toml` | `liso mcp setup --client codex --create-token --write` |

## Security Isolation & Approvers

- **Scoped Agent Tokens (`la1.<id>.<key>`):** Each token wraps the AMK with XChaCha20-Poly1305 whose authenticated `kid` binds token ID, expiry, and profile policy hash. Modifying a profile invalidates its tokens. Normal CLI commands (`liso get`, `liso export`, `liso run`) reject agent tokens with exit code 8. `liso lock` revokes every session and agent token immediately.
- **Approver Chain:** (1) Liso Desktop App over HMAC-SHA256 authenticated local IPC (0600 Unix socket on macOS/Linux; private loopback endpoint + key-proof hello on Windows) with biometric/password check; (2) Native OS dialog (`osascript`, `zenity`/`kdialog`, Windows `MessageBoxTimeoutW`, default Deny after 60s); (3) MCP elicitation only when explicitly opted in with `--elicitation`. Denies by default if no approver is available.
- **Approval Modes:**
  - `first-use (default)`: First read of each item per session, first modification of each item, first health report; creates, destructive actions, sharing, and breach checks ask every time. Best for: Day-to-day coding with Claude Code, Cursor, or Codex.
  - `each`: Every single secret read, write, create, delete, file access, share, and command execution. Best for: High-security production environments and strict per-access review.
  - `writes`: Mutations only (create, update, delete, share, external breach lookups); scoped reads run without prompts. Best for: Read-heavy local automation on a narrow dev/staging vault or tag.
  - `none`: No interactive prompts (prints warning). Vault/folder/tag scope, permission flags, audit logs, and cryptographic hard blocks still apply. Best for: Trusted, sandboxed CI pipelines with narrowly scoped non-production vaults.
- **Zero-Exposure Command Execution (`run_with_secrets`):** Runs `command` (argv, no shell) with `liso://` env values and replaces every secret—plus its base64, URL, JSON, and hex encodings—with `[redacted]` in stdout and stderr.
- **Cryptographic Hard Blocks:** Even in `--approval none`, `liso mcp` never returns your recovery phrase, master password, AMK, Account Keyset, vault keys, or session keys (checked via argument screening, BIP-39 checksum + Recovery Auth derivation, Argon2id slot matching, and key encoding scan).
- **Local Audit Trail:** Every call is logged locally in a hash-chained audit file (`liso mcp audit tail`) and never uploaded.

## CLI & MCP FAQ

### How many MCP tools does liso mcp expose?

liso mcp exposes 36 MCP tools covering status and sync, item listing/search/secrets/TOTP/templates/CRUD/trash/restore/move, folders, vaults, encrypted files, shared-vault members, device listing, Password Health reports, k-anonymity HIBP breach checks, run_with_secrets command execution with output redaction, password generation, and pack inspection.

### How does run_with_secrets prevent an AI agent from reading raw API keys?

With --exec enabled on a profile, the agent invokes run_with_secrets with liso:// secret references mapped to environment variables. Liso injects the decrypted values directly into the child process (argv, no shell), never exposes LISO_* variables, and scrubs every secret—along with its base64, URL-encoded, JSON-escaped, and hex encodings—from stdout and stderr before returning output to the agent.

### Can a prompt-injected AI agent steal my recovery phrase or master password?

No. Regardless of profile flags or approval mode (even --approval none), liso mcp enforces multi-layer hard blocks: tool arguments naming recovery phrases or keys are rejected, field labels and titles are screened, and candidate output values are folded, BIP-39 checksum-checked against your account's Recovery Auth key, tested against your Argon2id password slot, and scanned for hex/base64 encodings of in-memory keys.

### Does liso mcp work over Streamable HTTP as well as stdio?

Yes. liso mcp runs over standard MCP stdio by default and also supports Streamable HTTP bound to 127.0.0.1 (--http) with bearer agent-token authentication and strict Host and Origin verification.
