# Bitwarden

> Bitwarden is an open-source MCP server for security. Give an AI assistant its own Bitwarden vault for logins, 2FA codes and passkeys. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** CLI, self-hosted
- **Website:** https://foreverworks.github.io/mcps/servers/bitwarden/
- **Repository:** https://github.com/foreverworks/mcps/tree/HEAD/servers/bitwarden
- **MCP Registry name:** com.foreverworks/bitwarden
- **Categories:** security
- **Listing updated:** 2026-11-14

## About

The design assumes a separate Bitwarden account set aside for the agent, not your personal vault. Any plan works, and Premium is not needed. The README notes your own passkeys belong on your own devices, since this account holds the agent's identities.

The assistant can find, create and update logins, generate passwords, compute 2FA codes, store other secrets such as an API token in secure notes, move items between an organization's collections and check passwords against Have I Been Pwned. It also acts as a passkey authenticator: it registers passkeys and signs WebAuthn sign-ins, stored the way Bitwarden's own apps store them.

Six tools write (create_login, update_login, create_note, move_item, create_passkey, import_passkeys), delete_passkey removes a single passkey, and nothing else deletes. Nothing exports the vault or changes settings. Every call runs Bitwarden's CLI, so tools take seconds. Credentials are read from files, and BITWARDEN_SERVER can point to the EU or a self-hosted server.

## Features

- **Login management:** Finds, creates and updates logins and generates passwords.
- **2FA codes:** Computes current two-factor codes for stored logins.
- **Passkey authenticator:** Registers passkeys and signs WebAuthn sign-ins, compatible with Bitwarden apps.
- **Breach checks:** Checks passwords against Have I Been Pwned.
- **Secure notes:** Keeps tokens and key files as secure notes.
- **Collection moves:** Moves items between an organization's collections.

## Good for

- Let an agent sign up for a service with a generated password
- Fetch a current 2FA code during an automated login
- Audit saved logins for known breached passwords
- Store an agent's deploy key in a secure note

## Install

### Claude Code (Terminal)

```sh
claude mcp add bitwarden --env BITWARDEN_CLIENT_ID_FILE='<BITWARDEN_CLIENT_ID_FILE>' --env BITWARDEN_CLIENT_SECRET_FILE='<BITWARDEN_CLIENT_SECRET_FILE>' --env BITWARDEN_MASTER_PASSWORD_FILE='<BITWARDEN_MASTER_PASSWORD_FILE>' -- npx -y @foreverworks/mcp-bitwarden
```

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "bitwarden": {
      "command": "npx",
      "args": [
        "-y",
        "@foreverworks/mcp-bitwarden"
      ],
      "env": {
        "BITWARDEN_CLIENT_ID_FILE": "<BITWARDEN_CLIENT_ID_FILE>",
        "BITWARDEN_CLIENT_SECRET_FILE": "<BITWARDEN_CLIENT_SECRET_FILE>",
        "BITWARDEN_MASTER_PASSWORD_FILE": "<BITWARDEN_MASTER_PASSWORD_FILE>"
      }
    }
  }
}
```

### Cursor (~/.cursor/mcp.json)

```json
{
  "mcpServers": {
    "bitwarden": {
      "command": "npx",
      "args": [
        "-y",
        "@foreverworks/mcp-bitwarden"
      ],
      "env": {
        "BITWARDEN_CLIENT_ID_FILE": "<BITWARDEN_CLIENT_ID_FILE>",
        "BITWARDEN_CLIENT_SECRET_FILE": "<BITWARDEN_CLIENT_SECRET_FILE>",
        "BITWARDEN_MASTER_PASSWORD_FILE": "<BITWARDEN_MASTER_PASSWORD_FILE>"
      }
    }
  }
}
```

### VS Code (.vscode/mcp.json)

```json
{
  "servers": {
    "bitwarden": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@foreverworks/mcp-bitwarden"
      ],
      "env": {
        "BITWARDEN_CLIENT_ID_FILE": "<BITWARDEN_CLIENT_ID_FILE>",
        "BITWARDEN_CLIENT_SECRET_FILE": "<BITWARDEN_CLIENT_SECRET_FILE>",
        "BITWARDEN_MASTER_PASSWORD_FILE": "<BITWARDEN_MASTER_PASSWORD_FILE>"
      }
    }
  }
}
```

### Windsurf (~/.codeium/windsurf/mcp_config.json)

```json
{
  "mcpServers": {
    "bitwarden": {
      "command": "npx",
      "args": [
        "-y",
        "@foreverworks/mcp-bitwarden"
      ],
      "env": {
        "BITWARDEN_CLIENT_ID_FILE": "<BITWARDEN_CLIENT_ID_FILE>",
        "BITWARDEN_CLIENT_SECRET_FILE": "<BITWARDEN_CLIENT_SECRET_FILE>",
        "BITWARDEN_MASTER_PASSWORD_FILE": "<BITWARDEN_MASTER_PASSWORD_FILE>"
      }
    }
  }
}
```

### Other clients (your client's MCP settings (most use this shape))

```json
{
  "mcpServers": {
    "bitwarden": {
      "command": "npx",
      "args": [
        "-y",
        "@foreverworks/mcp-bitwarden"
      ],
      "env": {
        "BITWARDEN_CLIENT_ID_FILE": "<BITWARDEN_CLIENT_ID_FILE>",
        "BITWARDEN_CLIENT_SECRET_FILE": "<BITWARDEN_CLIENT_SECRET_FILE>",
        "BITWARDEN_MASTER_PASSWORD_FILE": "<BITWARDEN_MASTER_PASSWORD_FILE>"
      }
    }
  }
}
```

## Tools

- `create_login`: Create a login
- `update_login`: Update a login
- `create_note`: Create a secure note
- `move_item`: Move an item between collections
- `create_passkey`: Register a passkey
- `import_passkeys`: Import passkeys from a file
- `delete_passkey`: Remove one passkey from its login

## FAQ

### Should I connect my personal vault?

No. The README says to use an account set aside for the agent, not your personal vault.

### Does it need Bitwarden Premium?

No, any plan works.

### What can it delete?

Only delete_passkey, which removes one passkey from its login. Nothing else deletes.

### Does it work with EU or self-hosted Bitwarden?

Yes, set BITWARDEN_SERVER, for example https://vault.bitwarden.eu.

### Is Bitwarden free?

Yes. Bitwarden is open source, so you can use and self-host it for free.

### How do I add Bitwarden to Claude Code?

Run this command in your terminal: claude mcp add bitwarden --env BITWARDEN_CLIENT_ID_FILE='<BITWARDEN_CLIENT_ID_FILE>' --env BITWARDEN_CLIENT_SECRET_FILE='<BITWARDEN_CLIENT_SECRET_FILE>' --env BITWARDEN_MASTER_PASSWORD_FILE='<BITWARDEN_MASTER_PASSWORD_FILE>' -- npx -y @foreverworks/mcp-bitwarden

### What are the best alternatives to Bitwarden?

The closest alternatives to Bitwarden are REA, Agent Roast, Midplane, Leash and Tinplate Edge AI Safety, Security & EU Compliance.

## Alternatives

- [REA](https://ai-powered.com/mcp/rea): REA is an open-source MCP server for developer tools.
- [Agent Roast](https://ai-powered.com/mcp/agent-roast): Agent Roast is an open-source MCP server for developer tools.
- [Midplane](https://ai-powered.com/mcp/midplane): Midplane is an open-source MCP server for databases.
- [Leash](https://ai-powered.com/mcp/leash): Leash is a free MCP server for security.
- [Tinplate Edge AI Safety, Security & EU Compliance](https://ai-powered.com/mcp/tinplate-edge-ai-safety-security-and-eu-compliance): Tinplate Edge AI Safety, Security & EU Compliance is a freemium MCP server for security.
- [SecureCloud](https://ai-powered.com/mcp/securecloud): SecureCloud is a free MCP server for security.
- [Eikino](https://ai-powered.com/mcp/eikino): Eikino is a freemium MCP server for security.
- [SynomosAI Governance MCP](https://ai-powered.com/mcp/synomosai-governance-mcp-2): SynomosAI Governance MCP is an open-source MCP server for security.

---
Source: https://ai-powered.com/mcp/bitwarden
