T

The Real Bitwarden MCP

by mguttmann · io.github.mguttmann/the-real-bitwarden-mcp

Local stdio MCP server for Bitwarden (Public API + Secrets Manager). 50+ admin tools for members, groups, collections, policies, licensing, projects, and secrets. For Claude Desktop / Claude Code.

npm Local · stdio GlamaOfficial MCP Registry High confidence

Install

Add to ~/Library/Application Support/Claude/claude_desktop_config.json

Windows / Linux path
Windows: %APPDATA%\Claude\claude_desktop_config.json
Linux: ~/.config/Claude/claude_desktop_config.json
{
  "mcpServers": {
    "io-github-mguttmann-the-real-bitwarden-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "the-real-bitwarden-mcp"
      ],
      "env": {
        "BITWARDEN_SELFHOST_API_BASE": "<VALUE>",
        "BITWARDEN_SELFHOST_IDENTITY_URL": "<VALUE>",
        "BITWARDEN_SELFHOST_CLIENT_ID": "<VALUE>",
        "BITWARDEN_SELFHOST_CLIENT_SECRET": "<YOUR_VALUE>",
        "BITWARDEN_CLOUD_API_BASE": "<VALUE>",
        "BITWARDEN_CLOUD_IDENTITY_URL": "<VALUE>",
        "BITWARDEN_CLOUD_CLIENT_ID": "<VALUE>",
        "BITWARDEN_CLOUD_CLIENT_SECRET": "<YOUR_VALUE>",
        "BWS_ACCESS_TOKEN": "<YOUR_VALUE>",
        "BWS_ORG_ID": "<VALUE>",
        "BWS_API_BASE": "<VALUE>",
        "BWS_IDENTITY_URL": "<VALUE>",
        "BITWARDEN_CONFIRM_WRITES": "true",
        "BITWARDEN_READ_ONLY": "false",
        "LOG_LEVEL": "warn",
        "BW_MCP_MAX_RESPONSE_BYTES": "1048576",
        "HTTP_TIMEOUT_MS": "30000",
        "PAGINATION_MAX_ITEMS": "1000",
        "PAGINATION_MAX_PAGES": "20",
        "BW_MCP_MAX_LIST_RESPONSE_BYTES": "60000"
      }
    }
  }
}

Restart Claude Desktop to activate the new server.

Add to .cursor/mcp.json (project) or ~/.cursor/mcp.json (global)

Windows / Linux path
Windows: .cursor\mcp.json (project) or %USERPROFILE%\.cursor\mcp.json (global)
Linux: .cursor/mcp.json (project) or ~/.cursor/mcp.json (global)
{
  "mcpServers": {
    "io-github-mguttmann-the-real-bitwarden-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "the-real-bitwarden-mcp"
      ],
      "env": {
        "BITWARDEN_SELFHOST_API_BASE": "<VALUE>",
        "BITWARDEN_SELFHOST_IDENTITY_URL": "<VALUE>",
        "BITWARDEN_SELFHOST_CLIENT_ID": "<VALUE>",
        "BITWARDEN_SELFHOST_CLIENT_SECRET": "<YOUR_VALUE>",
        "BITWARDEN_CLOUD_API_BASE": "<VALUE>",
        "BITWARDEN_CLOUD_IDENTITY_URL": "<VALUE>",
        "BITWARDEN_CLOUD_CLIENT_ID": "<VALUE>",
        "BITWARDEN_CLOUD_CLIENT_SECRET": "<YOUR_VALUE>",
        "BWS_ACCESS_TOKEN": "<YOUR_VALUE>",
        "BWS_ORG_ID": "<VALUE>",
        "BWS_API_BASE": "<VALUE>",
        "BWS_IDENTITY_URL": "<VALUE>",
        "BITWARDEN_CONFIRM_WRITES": "true",
        "BITWARDEN_READ_ONLY": "false",
        "LOG_LEVEL": "warn",
        "BW_MCP_MAX_RESPONSE_BYTES": "1048576",
        "HTTP_TIMEOUT_MS": "30000",
        "PAGINATION_MAX_ITEMS": "1000",
        "PAGINATION_MAX_PAGES": "20",
        "BW_MCP_MAX_LIST_RESPONSE_BYTES": "60000"
      }
    }
  }
}

Cursor usually picks up config changes automatically; if the server does not appear, reload the window.

Add to .mcp.json (project) or ~/.claude.json (global)

Windows / Linux path
Windows: .mcp.json (project) or %USERPROFILE%\.claude.json (global)
Linux: .mcp.json (project) or ~/.claude.json (global)
{
  "mcpServers": {
    "io-github-mguttmann-the-real-bitwarden-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "the-real-bitwarden-mcp"
      ],
      "env": {
        "BITWARDEN_SELFHOST_API_BASE": "<VALUE>",
        "BITWARDEN_SELFHOST_IDENTITY_URL": "<VALUE>",
        "BITWARDEN_SELFHOST_CLIENT_ID": "<VALUE>",
        "BITWARDEN_SELFHOST_CLIENT_SECRET": "<YOUR_VALUE>",
        "BITWARDEN_CLOUD_API_BASE": "<VALUE>",
        "BITWARDEN_CLOUD_IDENTITY_URL": "<VALUE>",
        "BITWARDEN_CLOUD_CLIENT_ID": "<VALUE>",
        "BITWARDEN_CLOUD_CLIENT_SECRET": "<YOUR_VALUE>",
        "BWS_ACCESS_TOKEN": "<YOUR_VALUE>",
        "BWS_ORG_ID": "<VALUE>",
        "BWS_API_BASE": "<VALUE>",
        "BWS_IDENTITY_URL": "<VALUE>",
        "BITWARDEN_CONFIRM_WRITES": "true",
        "BITWARDEN_READ_ONLY": "false",
        "LOG_LEVEL": "warn",
        "BW_MCP_MAX_RESPONSE_BYTES": "1048576",
        "HTTP_TIMEOUT_MS": "30000",
        "PAGINATION_MAX_ITEMS": "1000",
        "PAGINATION_MAX_PAGES": "20",
        "BW_MCP_MAX_LIST_RESPONSE_BYTES": "60000"
      }
    }
  }
}

The server will be available in the next Claude Code session.

Add to .vscode/mcp.json

Windows / Linux path
Windows: .vscode\mcp.json
Linux: .vscode/mcp.json
{
  "servers": {
    "io-github-mguttmann-the-real-bitwarden-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "the-real-bitwarden-mcp"
      ],
      "env": {
        "BITWARDEN_SELFHOST_API_BASE": "<VALUE>",
        "BITWARDEN_SELFHOST_IDENTITY_URL": "<VALUE>",
        "BITWARDEN_SELFHOST_CLIENT_ID": "<VALUE>",
        "BITWARDEN_SELFHOST_CLIENT_SECRET": "<YOUR_VALUE>",
        "BITWARDEN_CLOUD_API_BASE": "<VALUE>",
        "BITWARDEN_CLOUD_IDENTITY_URL": "<VALUE>",
        "BITWARDEN_CLOUD_CLIENT_ID": "<VALUE>",
        "BITWARDEN_CLOUD_CLIENT_SECRET": "<YOUR_VALUE>",
        "BWS_ACCESS_TOKEN": "<YOUR_VALUE>",
        "BWS_ORG_ID": "<VALUE>",
        "BWS_API_BASE": "<VALUE>",
        "BWS_IDENTITY_URL": "<VALUE>",
        "BITWARDEN_CONFIRM_WRITES": "true",
        "BITWARDEN_READ_ONLY": "false",
        "LOG_LEVEL": "warn",
        "BW_MCP_MAX_RESPONSE_BYTES": "1048576",
        "HTTP_TIMEOUT_MS": "30000",
        "PAGINATION_MAX_ITEMS": "1000",
        "PAGINATION_MAX_PAGES": "20",
        "BW_MCP_MAX_LIST_RESPONSE_BYTES": "60000"
      }
    }
  }
}

Reload the VS Code window to activate.

Add to ~/.codeium/windsurf/mcp_config.json

Windows / Linux path
Windows: %USERPROFILE%\.codeium\windsurf\mcp_config.json
Linux: ~/.codeium/windsurf/mcp_config.json
{
  "mcpServers": {
    "io-github-mguttmann-the-real-bitwarden-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "the-real-bitwarden-mcp"
      ],
      "env": {
        "BITWARDEN_SELFHOST_API_BASE": "<VALUE>",
        "BITWARDEN_SELFHOST_IDENTITY_URL": "<VALUE>",
        "BITWARDEN_SELFHOST_CLIENT_ID": "<VALUE>",
        "BITWARDEN_SELFHOST_CLIENT_SECRET": "<YOUR_VALUE>",
        "BITWARDEN_CLOUD_API_BASE": "<VALUE>",
        "BITWARDEN_CLOUD_IDENTITY_URL": "<VALUE>",
        "BITWARDEN_CLOUD_CLIENT_ID": "<VALUE>",
        "BITWARDEN_CLOUD_CLIENT_SECRET": "<YOUR_VALUE>",
        "BWS_ACCESS_TOKEN": "<YOUR_VALUE>",
        "BWS_ORG_ID": "<VALUE>",
        "BWS_API_BASE": "<VALUE>",
        "BWS_IDENTITY_URL": "<VALUE>",
        "BITWARDEN_CONFIRM_WRITES": "true",
        "BITWARDEN_READ_ONLY": "false",
        "LOG_LEVEL": "warn",
        "BW_MCP_MAX_RESPONSE_BYTES": "1048576",
        "HTTP_TIMEOUT_MS": "30000",
        "PAGINATION_MAX_ITEMS": "1000",
        "PAGINATION_MAX_PAGES": "20",
        "BW_MCP_MAX_LIST_RESPONSE_BYTES": "60000"
      }
    }
  }
}

Restart Windsurf (or refresh its MCP servers panel) to activate the new server.

Windsurf Next uses ~/.codeium/windsurf-next/mcp_config.json. Devin Desktop (the Windsurf rebrand) uses ~/.config/devin/mcp_config.json and imports the Windsurf file.

Add to ~/Library/Application Support/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json

Windows / Linux path
Windows: %APPDATA%\Code\User\globalStorage\saoudrizwan.claude-dev\settings\cline_mcp_settings.json
Linux: ~/.config/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json
{
  "mcpServers": {
    "io-github-mguttmann-the-real-bitwarden-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "the-real-bitwarden-mcp"
      ],
      "env": {
        "BITWARDEN_SELFHOST_API_BASE": "<VALUE>",
        "BITWARDEN_SELFHOST_IDENTITY_URL": "<VALUE>",
        "BITWARDEN_SELFHOST_CLIENT_ID": "<VALUE>",
        "BITWARDEN_SELFHOST_CLIENT_SECRET": "<YOUR_VALUE>",
        "BITWARDEN_CLOUD_API_BASE": "<VALUE>",
        "BITWARDEN_CLOUD_IDENTITY_URL": "<VALUE>",
        "BITWARDEN_CLOUD_CLIENT_ID": "<VALUE>",
        "BITWARDEN_CLOUD_CLIENT_SECRET": "<YOUR_VALUE>",
        "BWS_ACCESS_TOKEN": "<YOUR_VALUE>",
        "BWS_ORG_ID": "<VALUE>",
        "BWS_API_BASE": "<VALUE>",
        "BWS_IDENTITY_URL": "<VALUE>",
        "BITWARDEN_CONFIRM_WRITES": "true",
        "BITWARDEN_READ_ONLY": "false",
        "LOG_LEVEL": "warn",
        "BW_MCP_MAX_RESPONSE_BYTES": "1048576",
        "HTTP_TIMEOUT_MS": "30000",
        "PAGINATION_MAX_ITEMS": "1000",
        "PAGINATION_MAX_PAGES": "20",
        "BW_MCP_MAX_LIST_RESPONSE_BYTES": "60000"
      }
    }
  }
}

Cline reloads cline_mcp_settings.json automatically; if the server does not appear, reload the VS Code window.

Open it from Cline's MCP Servers panel → Configure. Roo Code uses a different file and format.

Configuration

Environment variables this server reads. Secrets stay on your machine.

NameRequiredDescription
BITWARDEN_SELFHOST_API_BASE No Self-hosted Bitwarden API base URL, e.g. https://vault.example.com/api. Required when using self-host mode.
BITWARDEN_SELFHOST_IDENTITY_URL No Self-hosted Bitwarden identity URL, e.g. https://vault.example.com/identity. Required when using self-host mode.
BITWARDEN_SELFHOST_CLIENT_ID No Self-hosted Public API client ID, e.g. organization.<orgId>. Required when using self-host mode.
BITWARDEN_SELFHOST_CLIENT_SECRET secret No Self-hosted Public API client secret. Required when using self-host mode.
BITWARDEN_CLOUD_API_BASE No Bitwarden Cloud API base URL, e.g. https://api.bitwarden.com. Required when using cloud mode.
BITWARDEN_CLOUD_IDENTITY_URL No Bitwarden Cloud identity URL, e.g. https://identity.bitwarden.com. Required when using cloud mode.
BITWARDEN_CLOUD_CLIENT_ID No Bitwarden Cloud Public API client ID. Required when using cloud mode.
BITWARDEN_CLOUD_CLIENT_SECRET secret No Bitwarden Cloud Public API client secret. Required when using cloud mode.
BWS_ACCESS_TOKEN secret No Machine-account access token for Bitwarden Secrets Manager. Optional; required for Secrets Manager tools. Malformed tokens are fatal.
BWS_ORG_ID No Organization UUID used by Secrets Manager project/secret tools when organizationId is not passed.
BWS_API_BASE No Secrets Manager API base URL. Optional; defaults to the self-host API base.
BWS_IDENTITY_URL No Secrets Manager identity URL. Optional; defaults to the self-host identity URL.
BITWARDEN_CONFIRM_WRITES No When true, write tools return a preview unless invoked with confirm: "YES". Default: true
BITWARDEN_READ_ONLY No When true, write tools stay listed but refuse to run. Default: false
LOG_LEVEL No Log level: debug, info, warn, or error. Default: warn
BW_MCP_MAX_RESPONSE_BYTES No Successful tool output above this many bytes is cut to valid JSON with a responseTruncated marker that says how to narrow or page the query. Default: 1048576
HTTP_TIMEOUT_MS No Timeout for API, OAuth token, and Secrets Manager SDK calls. Default: 30000
PAGINATION_MAX_ITEMS No Maximum number of items to paginate. Default: 1000
PAGINATION_MAX_PAGES No Maximum number of pages to paginate. Default: 20
BW_MCP_MAX_LIST_RESPONSE_BYTES No Adds a note warning to list responses that exceed this size. Default: 60000

Similar servers