# Bitwarden MCP Server

A Model Context Protocol (MCP) server that provides AI assistants with secure access to Bitwarden password manager.

MCP server by Bitwarden. Category: Security.

## Install

Project (for this project only):

```sh
npx add-mcp @bitwarden/mcp-server --env 'BW_SESSION=${BW_SESSION}'
```

Works with: Claude Code, Codex CLI, Cursor, Copilot CLI, opencode.

Global (for every project on this machine):

```sh
npx add-mcp @bitwarden/mcp-server --env 'BW_SESSION=${BW_SESSION}' -g
```

Works with: Claude Code, Codex CLI, Cursor, Antigravity, Copilot CLI, opencode.

## Where it runs

Your computer.

## What it needs

Environment variables:

- `BW_SESSION` (required): Session token for CLI operations, from `bw unlock --raw`.
- `BW_CLIENT_ID` (optional): Organization API client ID, which starts with `organization.`.
- `BW_CLIENT_SECRET` (optional): Organization API client secret.
- `BW_API_BASE_URL` (optional): API base URL. Defaults to `https://api.bitwarden.com`. Set this for self-hosted instances.
- `BW_IDENTITY_URL` (optional): OAuth2 identity server URL. Defaults to `https://identity.bitwarden.com`. Set this for self-hosted instances.
- `BW_ALLOWED_DIRECTORIES` (optional): Comma-separated directories allowed for file operations.
- `BW_CLI_PATH` (optional): Path to the `bw` executable, needed only if the CLI can't be found on `PATH`.

## Tags

- Runs on your computer: It runs as a program on your machine, with your access.
- Needs a key or account: It asks for an API key or a sign in before it works.

## Source

[Open the source](https://github.com/bitwarden/mcp-server). Checked 2026-10-10. This summary may contain AI-generated text, so it can be wrong. Check the source before you rely on it.

- Previous: [grafana-skills](https://syn4pse.dev/terminal/grafana-skills.md)
- Next: [addon-mcp](https://syn4pse.dev/terminal/storybook-addon-mcp.md)
- [Terminal](https://syn4pse.dev/terminal.md)
- [Suggest a change](mailto:terminal@syn4pse.dev?subject=Terminal%20suggestion)
