Skip to content
MCP server

Bitwarden

Give an AI assistant its own Bitwarden vault for logins, 2FA codes and passkeys

Runs locallyStatus and history
Install
Pricing
Open source
Platforms
CLI, self-hosted
Runs
Locally
Version
0.2.2
Listing updated
3 days ago

About Bitwarden

Bitwarden is an open-source MCP server for security. It runs locally on your machine and is started by your AI client.

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.

Install

Run in a 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

Add to claude_desktop_config.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>"
      }
    }
  }
}

Add to ~/.cursor/mcp.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>"
      }
    }
  }
}

Add to .vscode/mcp.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>"
      }
    }
  }
}

Add to ~/.codeium/windsurf/mcp_config.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>"
      }
    }
  }
}

Add to your client's MCP settings (most use this shape)

{
  "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>"
      }
    }
  }
}

Configuration

  • BITWARDEN_CLIENT_ID_FILEPath of a file holding the account's API key client id.Required
  • BITWARDEN_CLIENT_SECRET_FILEPath of a file holding the API key's client secret.Required
  • BITWARDEN_MASTER_PASSWORD_FILEPath of a file holding the master password that unlocks the vault.Required
  • BITWARDEN_SERVERA self-hosted or EU server, e.g. https://vault.bitwarden.eu. Leave empty for bitwarden.com.

Tools this server provides (7)

Taken from the project documentation; the running server may differ.

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

What it does

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

Pricing

Open source

Free npm package; a Bitwarden account is needed.

Prices change. Check foreverworks.github.io before you buy.

Bitwarden 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 to Bitwarden

  1. REA

    MCP server

    CLI and MCP server that lets coding agents reverse engineer apps and binaries

    Runs locally
    • Open source
    • 464K GitHub stars
    • Developer tools
  2. Agent Roast

    MCP server

    Offline review that flags agent changes which weaken tests, assertions or CI

    Runs locally
    • Open source
    • 4 Hacker News points
    • Developer tools
  3. Midplane

    MCP server

    Postgres gateway for AI agents with table grants, column masking and approval for writes

    Runs locally
    • Open source
    • 5 GitHub stars
    • Databases
  4. Leash

    MCP server

    Review what your AI touched, approve risky actions and undo supported changes

    • 1 tool
    • Remote
    • Free
    • 1 GitHub star
    • Security
  5. SecureCloud

    MCP server

    SentinelOne and IT security catalog, prices, quotes and checkout links for Israel

    • 7 tools
    • Remote
    • Free
    • Security