Bitwarden Credential Management logo

Bitwarden Credential Management

Community
tamirdresher
bitwarden-credential-management

Secure credential management for AI agents via official Bitwarden MCP server and bw CLI. Agents can store and retrieve secrets without exposing the entire vault. All access is audited.

Overview

Publishertamirdresher
Repositorysquad-skills
Skill namebitwarden-credential-management
Stars
44
Forks
9
Bundled files
2
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 2 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by tamirdresher on GitHub. Read the source before you install it.

Installation

Install the Bitwarden Credential Management AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/tamirdresher/squad-skills/tree/main/plugins/bitwarden-credential-management
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/tamirdresher/squad-skills.git /tmp/squad-skills
mkdir -p .claude/skills
cp -r /tmp/squad-skills/plugins/bitwarden-credential-management .claude/skills/bitwarden-credential-management
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Bitwarden Credential Management in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Bitwarden Credential Management on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Bitwarden Credential Management is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Bitwarden — AI Agent Credential Management

Provides secure, audited credential management for AI agents. Two access methods: Bitwarden MCP server (preferred) and bw CLI (fallback).

CRITICAL: Security Rules

  1. NO DELETE — Agents may NEVER delete vault items. Only the vault owner (human) can delete.
  2. NO EXPORT — Never export the entire vault or dump all passwords.
  3. NO MASTER PASSWORD — Never request, store, or log the master password.
  4. AUDIT ALL ACCESS — Every credential access must be logged.
  5. LEAST PRIVILEGE — Only retrieve the specific credential needed for the current task.
  6. NO PLAINTEXT LOGGING — Never log actual password values. Log only item name/ID + action + timestamp.

Architecture

┌─────────────────────────────────────────────────┐
│  Agent Process (Copilot CLI, CI runner, etc.)    │
│                                                   │
│  ┌──────────────┐    ┌─────────────────────────┐ │
│  │ MCP tools     │    │ bw CLI (fallback)       │ │
│  │ (preferred)   │    │ inherits BW_SESSION     │ │
│  └──────┬───────┘    └────────────┬────────────┘ │
│         │                         │               │
│  ┌──────▼─────────────────────────▼──────────┐   │
│  │ @bitwarden/mcp-server (stdio)             │   │
│  │ Inherits BW_SESSION from User env var      │   │
│  └──────────────────┬────────────────────────┘   │
│                      │                             │
└──────────────────────┼─────────────────────────────┘
                       │
               ┌───────▼───────┐
               │ Bitwarden     │
               │ Vault (cloud) │
               └───────────────┘

Prerequisites

  • Bitwarden CLI: npm install -g @bitwarden/cli
  • Bitwarden MCP server: npm install -g @bitwarden/mcp-server
  • BW_SESSION: Set as a persistent environment variable (see below)
  • MCP config: Entry in your Copilot MCP config for the "bitwarden" server

BW_SESSION — Persistent Session Key

BW_SESSION is an encryption key derived from the master password. It is NOT a JWT and does NOT expire on its own. This is the key insight that makes persistent agent access work.

How it's stored: As a User-level environment variable (Windows) or in shell profile (macOS/Linux). All new processes inherit it automatically — including background agents, watch processes, and new terminal sessions.

It only breaks if:

  • Master password is changed
  • Account is reset
  • Explicit bw lock or bw logout is run

Setting it (one-time, done by vault owner):

Windows (PowerShell)
powershell
# Login (first time only)
bw login your-vault-email@example.com

# Unlock and persist as User-level env var
$session = bw unlock --raw
[System.Environment]::SetEnvironmentVariable("BW_SESSION", $session, "User")
$env:BW_SESSION = $session
macOS / Linux
bash
# Login (first time only)
bw login your-vault-email@example.com

# Unlock and persist in shell profile
export BW_SESSION=$(bw unlock --raw)
echo "export BW_SESSION=$BW_SESSION" >> ~/.bashrc  # or ~/.zshrc

Agent Auto-Detection Pattern

Before using Bitwarden, every agent MUST run this check:

1. Is the Bitwarden MCP server available? (check tool list for bitwarden tools)
   → YES: Use MCP tools (preferred path)
2. Is BW_SESSION set?
   → YES: Use bw CLI as fallback
3. Neither available?
   → Report: "Bitwarden not available — BW_SESSION not set and MCP server not configured."
   → Do NOT fail silently. Do NOT attempt to unlock.

Access Method 1: MCP Tools (Preferred)

When the Bitwarden MCP server is configured, agents get native tools for vault operations. No CLI invocation needed.

MCP config entry (add to your MCP config file):

json
{
  "servers": {
    "bitwarden": {
      "type": "stdio",
      "command": "npx",
      "args": ["@bitwarden/mcp-server"]
    }
  }
}

The MCP server runs via stdio, inherits env vars (including BW_SESSION), and exposes tools directly. Agents don't need to do anything special — the tools appear automatically.

Key MCP tools available:

ToolPurpose
listList vault items (with search/filter)
getRetrieve a specific item by ID or name
create_itemCreate a new vault item
edit_itemUpdate an existing item
generateGenerate secure passwords/passphrases
get_totpGet current TOTP code for an item

Access Method 2: bw CLI (Fallback)

When MCP is not available, use the standard bw CLI. The BW_SESSION env var is inherited automatically.

Store a Credential

powershell
$item = @{
  type = 1  # Login type
  name = "squad/service-name"
  notes = "Created by [agent-name] for [purpose]"
  login = @{
    username = "the-username"
    password = "the-password"
    uris = @(@{ uri = "https://service-url.com" })
  }
} | ConvertTo-Json -Depth 5

$encoded = [Convert]::ToBase64String([Text.Encoding]::UTF8.GetBytes($item))
bw create item $encoded --session $env:BW_SESSION

Naming Convention: Prefix item names with a namespace (e.g., squad/github-api-key, myproject/azure-storage-key).

Retrieve a Credential

powershell
bw get item "squad/service-name" --session $env:BW_SESSION
bw get password "squad/service-name" --session $env:BW_SESSION

List Credentials

powershell
bw list items --search "squad/" --session $env:BW_SESSION

Update a Credential

powershell
$item = bw get item "squad/service-name" --session $env:BW_SESSION | ConvertFrom-Json
$item.login.password = "new-password"
$encoded = [Convert]::ToBase64String([Text.Encoding]::UTF8.GetBytes(($item | ConvertTo-Json -Depth 5)))
bw edit item $item.id $encoded --session $env:BW_SESSION

Audit Logging

Every credential access MUST be logged. Example format:

[2026-03-26T18:20:00Z] GET    | agent=AgentName | item=squad/github-token | method=MCP
[2026-03-26T18:21:00Z] STORE  | agent=AgentName | item=squad/azure-key    | method=CLI
[2026-03-26T18:22:00Z] LIST   | agent=AgentName | search=squad/           | method=MCP  | count=5

Format: [ISO-timestamp] ACTION | agent=NAME | item=ITEM_NAME | method=MCP|CLI

Background Agent Integration

Background watch processes and autonomous agents inherit BW_SESSION from the User env var automatically — no special setup needed.

Startup health check: Agents SHOULD verify Bitwarden availability at startup:

powershell
# Check BW health at startup
$bwStatus = bw status --session $env:BW_SESSION 2>&1 | ConvertFrom-Json
if ($bwStatus.status -ne "unlocked") {
    Write-Warning "⚠️ Bitwarden vault is NOT unlocked. Status: $($bwStatus.status)"
    Write-Warning "Credential operations will fail. Notify vault owner."
} else {
    Write-Host "✅ Bitwarden vault unlocked. Last sync: $($bwStatus.lastSync)"
}

Cross-Machine Setup

Each machine needs a one-time setup:

powershell
# 1. Install tooling
npm install -g @bitwarden/cli
npm install -g @bitwarden/mcp-server

# 2. Login and unlock
bw login your-vault-email@example.com
$session = bw unlock --raw

# 3. Persist BW_SESSION (Windows)
[System.Environment]::SetEnvironmentVariable("BW_SESSION", $session, "User")
$env:BW_SESSION = $session

# 4. Configure MCP server in your Copilot MCP config
# Add the bitwarden server entry to your mcp-config.json

# 5. Verify
bw status --session $env:BW_SESSION

What's Next: Bitwarden Agent Access (aac)

Bitwarden is building an official Agent Access tool (aac) — an open protocol with E2E encrypted tunnels (Noise protocol) for agent credential access. Key differences from the BW_SESSION approach:

BW_SESSION approachAgent Access (aac)
ScopeFull vault accessiblePer-domain credential scoping
SecuritySession key in env varE2E encrypted tunnel
LLM exposureCreds flow through toolsaac run injects via env vars only
StatusProduction-readyEarly preview

Watch: github.com/bitwarden/agent-access

Troubleshooting

SymptomCauseFix
You are not logged inNever logged in on this machinebw login your-email@example.com
Vault is lockedBW_SESSION missing or invalidVault owner re-unlocks, sets env var
Item not foundName mismatch or stale cacheCheck namespace prefix; run bw sync
MCP tools not appearingMCP server not configuredAdd entry to your MCP config
MCP tools fail silentlyBW_SESSION not inheritedVerify User-level env var is set (not just process-level)
bw status shows locked after rebootUser env var lost or password changedRe-run unlock + persist steps

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Bitwarden Credential Management AI skill do?

Secure credential management for AI agents via official Bitwarden MCP server and bw CLI. Agents can store and retrieve secrets without exposing the entire vault. All access is audited.

Why use Bitwarden Credential Management on TypingMind?

Because you install it once and use it with any model. Bitwarden Credential Management is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Bitwarden Credential Management in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/tamirdresher/squad-skills/tree/main/plugins/bitwarden-credential-management. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Bitwarden Credential Management?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Bitwarden Credential Management?

As many as you like. As long as a model supports skills, you can use Bitwarden Credential Management with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Bitwarden Credential Management AI skill free?

Yes. It is published on GitHub by tamirdresher under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇