About Keyfold
Keyfold is an offline-first encrypted vault for developers managing API keys by project and environment, along with passwords. Its CLI provides MCP tools that let AI clients use keys without returning secret values; each request requires approval in the Keyfold app.
Key features
- 01Organizes keys by project and environment
- 02Imports and writes approved .env files
- 03Runs commands with injected keys
- 04Stores keys and creates projects
- 05Requires in-app approval for every request
Use cases
- 01Let a coding agent run a command with project keys
- 02Write an approved .env file without exposing key values
- 03Import .env entries into an encrypted vault
MCP support
The `keyfold mcp` command starts an MCP server for clients such as Claude Code, Cursor, Codex, and Gemini CLI. It offers seven tools for vault and command operations, while requiring app approval and never returning secret values.
Configuration
Local server config is the same for every client. Copy it into your client’s MCP config file.
We haven’t collected a package or remote endpoint for this server. Follow the instructions in the project README.
Tools
Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.
Details
From the project READMEKeyfold core
The open-source parts of Keyfold, an offline-first vault for developers: API keys organised by project and environment, plus passwords, in one encrypted file. No account, no cloud, no telemetry.
The Keyfold app for Mac is built on these crates (Windows is coming through the Microsoft Store). Get it at keyfold.app/download; signed builds are also on the Releases page.
What is here
| Crate | What it does |
|---|---|
crates/keyfold-core | Argon2id key derivation, XChaCha20-Poly1305 envelope encryption, the tamper-evident vault format, rolling backups, the Recovery Kit, .env parsing, key detection patterns, 2FA codes (RFC 6238) and offline Ed25519 licence verification |
crates/keyfold-agent | The JSON-line protocol between the keyfold CLI and the running app, over an owner-only local socket |
crates/keyfold-cli | The keyfold command line and the MCP server for Cursor and Claude Code. No tool returns a secret value; every request is approved in the app |
Use it with an AI agent (MCP)
keyfold mcp lets Claude Code, Cursor, Codex, Gemini CLI and other MCP clients use your API keys without the model seeing them. Its seven tools list project and key names, write a .env file you approve, run a command with the keys injected, store a key, create a project and import a .env file. None of them returns a secret value. Every request waits for your click in the Keyfold app, which shows the command or file the keys are for.
- Install Keyfold for Mac. In the app, open Settings › General › Command line and MCP and click Install, which puts
keyfoldon yourPATH. - Add the server to your client:
claude mcp add --scope user keyfold -- keyfold mcp
Cursor (.cursor/mcp.json): { "mcpServers": { "keyfold": { "command": "keyfold", "args": ["mcp"] } } }
A command you approve can still print a key, and the model reads what it prints; the MCP guide covers that and one-hour approvals. The server needs the Keyfold app running and unlocked on the same Mac. The Dockerfile builds it on Linux only so that MCP directories can read its tool list.
MCP Registry name: mcp-name: io.github.codewithkolin/keyfold
Docs
- Vault format: every byte of the file, and how it is authenticated.
- Threat model: what Keyfold protects against, and what it cannot.
- MCP and CLI guide: connecting an AI agent without showing it your keys.
Build and test
cargo test --workspace
cargo clippy --workspace --all-targets -- -D warnings
cargo build --release -p keyfold-cli # the `keyfold` binary
Rust stable, no other toolchain needed.
Security
Please report vulnerabilities privately; see SECURITY.md.
Licence
AGPL-3.0-only. See the LICENSE file in each crate. The Keyfold desktop app around these crates is proprietary.
Comments
New to MCP?
From what the protocol is to installing your first server, these answers cover most first questions.
An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.