Verified 2026-12-03 · AI IDE Security Guide · Cursor + MCP
How to Use Liso MCP in Cursor Without Plaintext .env Files
AI IDEs like Cursor index workspace files and invoke terminal tools constantly—making plaintext .env files a high-risk target for accidental prompt inclusion or git commits. Liso's built-in Apache-2.0 liso mcp server connects directly to ~/.cursor/mcp.json in one command, confining Cursor to scoped vaults or folders, prompting you via biometric/OS dialog before sensitive reads, and injecting secrets into test or deploy commands with automatic output redaction.
Step-by-step setup (4 steps)
Install liso CLI and authenticate your machine
Install the signed liso binary and link your device via QR code pairing or your 12-word recovery phrase.
curl -fsSLO https://raw.githubusercontent.com/Liso-Vault/liso/main/dart/cli/install/install.sh
bash install.sh --require-cosign
liso login --qr
export LISO_SESSION="$(liso unlock --raw)"Create a scoped Cursor MCP profile
Create a dedicated profile limited to your development folder or tag so Cursor can never touch personal logins, banking cards, or production keys.
liso mcp profile add cursor-dev \
--vault Work \
--folder Development \
--tag agent \
--exec \
--approval first-use \
--ttl 8hConfigure ~/.cursor/mcp.json automatically
Run liso mcp setup --client cursor to mint the profile-bound la1.<id>.<key> token, back up your existing Cursor MCP config, and write the entry with 0600 permissions.
liso mcp setup \
--client cursor \
--profile cursor-dev \
--create-token \
--writeVerify with liso mcp doctor and reload Cursor
Run liso mcp doctor to verify your token, profile scope, and approver path (Liso desktop IPC or native OS dialog), then reload Cursor's MCP servers.
liso mcp link-app # optional: biometric approval in Liso desktop app
liso mcp doctor
liso mcp audit tailSecurity model & threat defenses
| Threat / Scenario | How Liso 2 mitigates it |
|---|---|
| Workspace indexing sweeps up plaintext .env secrets | Store dev/staging secrets in your encrypted Liso vault instead of on-disk .env files, and run build/test commands via liso run or MCP run_with_secrets. |
| Cursor calls a secret tool unexpectedly during Composer / Agent mode | Default --approval first-use (or --approval each for strict mode) triggers a Liso desktop biometric prompt or native OS dialog before releasing any secret. |
| Need to connect VS Code or Windsurf alongside Cursor | Create separate profiles per editor (--client vscode writes User/mcp.json; --client windsurf writes ~/.codeium/windsurf/mcp_config.json) so you can revoke one without affecting the others. |
| End-of-day security hygiene on a shared laptop | Run liso lock to wipe the local session key and immediately revoke every active agent token across Cursor, Claude Code, and VS Code. |