# Bitwarden

This MCP server for Claude Code connects an agent to a separate Bitwarden vault. It handles login records, 2FA codes, and passkeys.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 5 repo stars
- Author: foreverworks
- License: MIT · policy=link-only · description only; the file stays with the author
- Source: https://github.com/foreverworks/mcps/tree/HEAD/servers/bitwarden
- Updated: 2026-10-29
- Security check: automated, 2026-11-17 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/mcp/bitwarden

## What it does

The server lets an agent find saved logins, create entries, change their details, and generate passwords. It can retrieve 2FA codes, keep secrets in secure notes, and move items between an organization’s collections.

The agent can check passwords against known breaches, register passkeys, and sign in through WebAuthn. Setup requires a dedicated Bitwarden account, its API key, and the account’s master password; put the key and password in files. Node 22.19 or newer is required. Each request runs Bitwarden’s CLI, so calls take seconds rather than milliseconds. The server does not change vault settings or delete items, apart from removing a passkey.

## Requirements
- Needs: Node.js (commands run via npx)
- Environment variables: `BITWARDEN_CLIENT_ID_FILE`, `BITWARDEN_CLIENT_SECRET_FILE`, `BITWARDEN_MASTER_PASSWORD_FILE`, `BITWARDEN_SERVER` — keys and tokens: ask the human for the values, never commit them or put them in shared files.

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add --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> --env BITWARDEN_SERVER=<BITWARDEN_SERVER> --transport stdio bitwarden -- npx -y @foreverworks/mcp-bitwarden
```
Replace <…> with your own values

### Codex

**Platform CLI**
```bash
codex 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> --env BITWARDEN_SERVER=<BITWARDEN_SERVER> -- npx -y @foreverworks/mcp-bitwarden
```
Replace <…> with your own values

### Cursor

**Config file**
File `.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>",
                "BITWARDEN_SERVER": "<BITWARDEN_SERVER>"
            }
        }
    }
}
```
Replace <…> with your own values

### GitHub Copilot

**Config file**
File `.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>",
                "BITWARDEN_SERVER": "<BITWARDEN_SERVER>"
            }
        }
    }
}
```
Replace <…> with your own values

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add -e BITWARDEN_CLIENT_ID_FILE=<BITWARDEN_CLIENT_ID_FILE> -e BITWARDEN_CLIENT_SECRET_FILE=<BITWARDEN_CLIENT_SECRET_FILE> -e BITWARDEN_MASTER_PASSWORD_FILE=<BITWARDEN_MASTER_PASSWORD_FILE> -e BITWARDEN_SERVER=<BITWARDEN_SERVER> bitwarden npx -y @foreverworks/mcp-bitwarden
```
Replace <…> with your own values

## When to use it
- find a saved login for a website
- create a password and update sign-in details
- retrieve a current 2FA code
- save a key as a secure note
- register a passkey or complete WebAuthn sign-in

## Example prompts
- Find the saved logins for `example.com`.
- Save the key from `example-key.json` as a secure note.

## Similar
- [Context7](https://affpapa.org/en/nevibecode/mcp/context7.md) — MCP server · 5563 installs
- [Search Google Flights](https://affpapa.org/en/nevibecode/mcp/search-google-flights.md) — MCP server · 2595 installs
- [Math-MCP](https://affpapa.org/en/nevibecode/mcp/math-mcp.md) — MCP server · 5958 installs
- [pipeworx gateway](https://affpapa.org/en/nevibecode/mcp/pipeworx-gateway.md) — MCP server · 419019 installs
- [SparkForge](https://affpapa.org/en/nevibecode/mcp/sparkforge.md) — MCP server · 219896 installs
- [OpenWebSearch](https://affpapa.org/en/nevibecode/mcp/openwebsearch.md) — MCP server · 494 installs

From the same set: [foreverworks/mcps](https://affpapa.org/en/nevibecode/by/foreverworks/mcps.md) — 15 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
