Skip to content

keypaste setup

Connects this computer’s AI tools to your vault, or takes keypaste out of them.

Terminal window
keypaste setup [--vault <path>] [--client <a,b>] [--label <name>] [--expose <globs>] [--dry-run] [--remove] [--yes] [--link]
OptionEffect
--vault <path>The vault the tools’ bridge asks. Or KEYPASTE_VAULT; with neither, the vault chosen with keypaste use or in the app.
--client <a,b>Only these tools: claude-code, codex, gemini-cli, devin, vscode, cursor, claude-desktop.
--label <name>The --client-label each tool’s bridge gets, which agent settings and the audit log follow. The tool’s id by default.
--expose <globs>Narrows what every agent these tools start can see. ** by default, with each agent’s settings deciding each value.
--dry-runPrints every step and changes nothing.
--removeTakes keypaste out of each tool, leaving its other servers alone.
--yesAnswers the question; needed without a terminal.
--linkPrints links that have Cursor and VS Code add keypaste.

Each tool’s bridge gets --client-label, --expose '**' and --allow-run (the bridge’s flags). No master password or key file goes into a tool’s configuration. Running it again is safe and updates a moved vault path.

CodeMeaning
0A tool was connected, removed, or found not connected
3No tool found
6Every tool refused

setup keeps the first original of a file it edits as <file>.keypaste-backup.

Toolsetup writes
Claude Codeclaude mcp add --scope user
Codexcodex mcp add, into ~/.codex/config.toml
Gemini CLIgemini mcp add --scope user; it starts keypaste only in trusted folders
Devindevin mcp add -s user
VS Codeyour user mcp.json, under servers with "type": "stdio"
Cursor~/.cursor/mcp.json; restart Cursor
Claude Desktopits config file, on macOS and Windows

On Windows, a tool installed with pnpm or yarn is refused.

setup --dry-run prints the exact entry for each tool. Paths must be absolute; on Windows, escape backslashes in JSON ("C:\\Users\\you\\keypaste.exe"). Give each tool its own --client-label.

Claude Code, for one repository:

Terminal window
claude mcp add --transport stdio --scope project keypaste \
-- /absolute/path/to/keypaste mcp \
--vault /absolute/path/to/vault.kdbx \
--client-label claude-code

--scope project writes .mcp.json in the repository root, which teammates get if you commit it. Its absolute paths can reveal usernames; --scope local keeps it to your machine.

Claude Desktop, and any tool that reads mcpServers JSON:

{
"mcpServers": {
"keypaste": {
"command": "/absolute/path/to/keypaste",
"args": [
"mcp",
"--vault", "/absolute/path/to/vault.kdbx",
"--client-label", "claude-desktop"
]
}
}
}
Claude Desktop’s file
macOS~/Library/Application Support/Claude/claude_desktop_config.json
Windows%APPDATA%\Claude\claude_desktop_config.json
Linux~/.config/Claude/claude_desktop_config.json
Windows, Store or MSIX%LOCALAPPDATA%\Packages\Claude_pzs8sxrjxfjjc\LocalCache\Roaming\Claude\claude_desktop_config.json, once it has one

Claude Desktop doesn’t see your shell’s variables, so with KEYPASTE_HOME set, use setup or the app’s Connect instead.

Start with keypaste doctor, which reports the vault, the process holding it and each tool’s registration.

What you seeWhat to do
The server fails to startCheck the path is absolute and executable, and ~/.keypaste is writable.
“Nothing holds this vault unlocked.”Unlock the vault in the app, or start keypaste approve --vault <path>, with the same --approver as the bridge.
Nothing in the audit logCheck KEYPASTE_HOME: the approver writes in its own home.
Protocol errorsRemove wrappers or shell profiles that print to stdout.
An old command is refusedIt names its replacement.
Terminal window
keypaste setup --dry-run
keypaste setup --client claude-code,cursor --vault ~/vaults/work.kdbx
keypaste setup --expose 'tag:env:*'
keypaste setup --remove --yes

The bridge does not protect against a tool that keeps released values or sends them to a remote model, another local program using an agent’s label, or an agent that edits its own tool’s configuration (THREATS T-3, T-14).