warden-mcp is a Vaultwarden / Bitwarden MCP server positioned to give AI agents "credential awareness" capabilities. It operates a Vaultwarden or Bitwarden vault through the official Bitwarden CLI (bw), enabling MCP clients to search, create, update, move, and read vault entries without reimplementing Bitwarden's encryption logic on the client side.
Purpose When an agent needs to log in to real systems during browser automation or management workflows, it can use warden-mcp to obtain usernames, passwords, and TOTP codes, avoiding hardcoding passwords in prompts, configuration files, or one-off scripts. It is suitable for agents and automation scenarios that need credentials, TOTP codes, secure notes, attachments, Sends, folders, organizations, and collections.
Main capabilities
- Search, read, create, update, move, restore, and delete common Bitwarden entry types, as well as folders, organization collections, attachments, and Sends.
- Provides tools such as keychain_get_username, keychain_get_password, and keychain_get_totp to obtain common login values, where passwords and TOTP require reveal: true.
- Supports batch creation of login items (keychain_create_logins), reporting failures item by item without aborting the entire batch operation.
- Supports replacing or merging the URI list of a login item (keychain_set_login_uris), as well as batch soft delete or hard delete by id (keychain_delete_items).
- Attachments: keychain_get_item exposes safe attachment metadata (id, fileName, size) but redacts the signed download URL; keychain_get_attachment accepts an attachment id or an unambiguous filename and returns { filename, bytes, contentBase64 }.
- Sends: keychain_send_get returns metadata and text content of owned Sends; keychain_receive uses a Send accessUrl to receive shared Sends or download file Send bytes.
- Default security: sensitive fields remain redacted unless the tool supports reveal: true and the client explicitly requests it.
- Text compatibility: security identifiers are mirrored into text output for MCP hosts that ignore structuredContent.
- Shared HTTP mode: a long-running service can serve multiple vault hosts or identities via per-request X-BW-* headers.
Usage Before running, a Vaultwarden or Bitwarden account is required, along with a Bitwarden API key pair or username/password login.
stdio mode: suitable for a local MCP host to start the server directly, and is the simplest, most portable desktop agent configuration. Credentials are loaded from BW_* environment variables at process startup.
HTTP mode: suitable for one service serving multiple clients or multiple vault configurations. After starting the server, MCP tool calls must include X-BW-* headers unless environment variable fallback is explicitly enabled. For browser-hosted MCP clients that cannot send custom headers, a single-tenant HTTP server can be run with environment variable fallback enabled (KEYCHAIN_ALLOW_ENV_FALLBACK=true), but it should only be used within a trusted network boundary. Hosted clients that require HTTPS can place a reverse proxy, private tunnel, VPN, or equivalent protected endpoint in front of warden-mcp.
Installation and running: the npm package is @icoretech/warden-mcp, and the Docker image is ghcr.io/icoretech/warden-mcp. Running from npm or source requires Node.js 22.x and npm 10.x; the Docker image includes a supported Node runtime. The server resolves bw in the following order: BW_BIN (if set), the bundled @bitwarden/cli dependency, the system bw in PATH. The bundled @bitwarden/cli version is currently 2026.8.0. If bw is missing, you can explicitly install the CLI or point BW_BIN to a known binary.
Tool names start with keychain_* by default; the prefix can be changed via TOOL_PREFIX and the separator via TOOL_SEPARATOR. Common tools include keychain_status, keychain_sync, keychain_search_items, keychain_get_item, keychain_get_username, keychain_get_password, keychain_get_totp, keychain_create_login, keychain_update_item, keychain_move_item_to_organization, etc.
Use cases
- Agent login flows: obtain usernames, passwords, and TOTP codes in real browser automation without storing secrets in agent prompts.
- Password vault management: create, update, move, restore, and delete common Bitwarden item types, folders, organization collections, attachments, and Sends.
- Multi-tenant or shared services: serve multiple clients or vault identities via HTTP mode.
- Read-only or no-reveal scenarios: hide mutation tools and reject direct write calls via READONLY=true or KEYCHAIN_READONLY=true; force all tools that return secrets to remain redacted via NOREVEAL=true or KEYCHAIN_NOREVEAL=true.
Limitations and security considerations
- v1 has no built-in authentication layer; the transport layer must be protected before exposure: bind locally by default (WARDEN_MCP_HOST=127.0.0.1), use a firewall/VPN/authenticating reverse proxy, and use TLS in HTTP mode (X-BW-* request headers carry vault credentials).
- Avoid environment variable fallback on shared networks; KEYCHAIN_ALLOW_ENV_FALLBACK=true causes clients without request headers to inherit the server-side vault credentials.
- Keep debug logging off in production unless troubleshooting.
- Protect KEYCHAIN_BW_HOME_ROOT (stores local bw configuration state); /metricsz is unauthenticated and exposes runtime/session counters, so protect it if necessary.
- Redacted fields include item notes (including secure note bodies), login passwords, TOTP seeds/codes, card numbers and codes, identity SSN/passport/driver's license numbers, hidden custom fields, native SSH private keys and private keys stored via the secure note convention, signed attachment URLs, and password history. Public SSH keys and fingerprints remain visible. Returning notes or private keys requires reveal: true; NOREVEAL and KEYCHAIN_NOREVEAL force them to remain redacted.
- KEYCHAIN_TEXT_COMPAT_MODE=structured_json mirrors supported structuredContent as plain text, which helps MCP clients that only pass content[] to the model, but any revealed secrets will also appear in the text record.
- keychain_search_items relies on bw list items --search and cannot reliably search inside custom field values.
- keychain_create_ssh_key creates a secure note with standard SSH key fields; native SSH key items can be recognized by keychain_search_items and are supported by keychain_get_item.
- High-risk bw features (such as export/import) are intentionally not exposed.
- The Vaultwarden reports page is not mirrored as an MCP tool; the current report-like helper tool is keychain_get_exposed.
- Vaultwarden is a continuously verified target in CI; official Bitwarden compatibility is the goal, but it is not continuously verified without a real Bitwarden tenant.
- @bitwarden/cli upgrades are treated as compatibility decisions and should only be released after checking direct bw authentication behavior, SDK behavior, and MCP integration behavior on a local Vaultwarden instance.
For local development, Docker Compose can be used to start a full Vaultwarden-backed stack; make up starts local Vaultwarden, provides an HTTPS proxy for bw, bootstraps a test account, and runs the MCP server in the foreground.