Discover MCPs & agents
Loading MCPs and agents…
Loading MCPs and agents…
No tool list is on record. This does not mean the server has no tools. Tools were not run.
No setup evidence yet No matching config or report on record. This does not mean the server is incompatible.
GitHub checked 655h ago - refresh overdue
A Model Context Protocol (MCP) server that provides AI assistants with secure access to Bitwarden password manager functionality through two complementary interfaces:
[!WARNING] This MCP server is designed exclusively for local use and must never be hosted publicly or exposed over a network.
When you grant an AI assistant access to this server, you are providing the ability to:
- Read vault items including passwords, secure notes, and sensitive data
- Create, modify, and delete vault items
- Access organization secrets and administrative functions
- Expose credentials and vault contents through AI responses
You are responsible for:
- Ensuring this server runs only on your local machine or self-hosted environment
- Understanding what data you're exposing to your AI assistant
- Being aware that AI responses may inadvertently reveal sensitive information
- Using appropriate AI providers (consider self-hosted or local LLMs for sensitive data)
- Never sharing configuration files containing session tokens or API credentials
- Monitoring logs for unexpected activity
Never:
- Deploy this server to cloud hosting, containers, or public servers
- Share your MCP configuration files with others
- Use this server over untrusted networks
- Grant access to untrusted AI clients or services
Use this tool responsibly and at your own risk.
The Model Context Protocol is an open standard that enables AI assistants to securely interact with local tools and services. This server exposes Bitwarden's vault management and organization administration capabilities to MCP-compatible AI clients like Claude Desktop.
For Vault Management and CLI tools:
npm install -g @bitwarden/cli)For Organization Administration:
[!WARNING] The configuration files below will contain sensitive credentials that grant access to your Bitwarden vault. Keep these files secure, never commit them to version control, and never share them with others. Ensure your MCP client (e.g., Claude Desktop) is configured to run the server locally only.
Add to your Claude Desktop configuration file:
~/Library/Application Support/Claude/claude_desktop_config.json%APPDATA%\Claude\claude_desktop_config.json{
"mcpServers": {
"bitwarden": {
"command": "npx",
"args": ["-y", "@bitwarden/mcp-server"],
"env": {
"BW_SESSION": "your-session-token-here"
}
}
}
}
Get your session token:
bw login
bw unlock --raw
To enable organization administration features, add API credentials:
{
"mcpServers": {
"bitwarden": {
"command": "npx",
"args": ["-y", "@bitwarden/mcp-server"],
"env": {
"BW_SESSION": "your-session-token-here",
"BW_CLIENT_ID": "organization.your-client-id",
"BW_CLIENT_SECRET": "your-client-secret"
}
}
}
}
Get organization API credentials:
Requires that this repository be checked out locally. Once that's done:
npm install
npm run build
Then reference the built dist/index.js file from Claude desktop:
{
"mcpServers": {
"bitwarden": {
"command": "node",
"args": ["local/path/to/mcp-server/dist/index.js"],
"env": {
"BW_SESSION": "your-session-token-here"
}
}
}
}
Any MCP-compatible client can connect to this server via stdio transport. Refer to your client's documentation for configuration details.
| Variable | Required For | Description | Default |
|---|---|---|---|
BW_SESSION | CLI operations | Session token from bw unlock --raw | - |
BW_CLIENT_ID | API operations | Organization API client ID | - |
BW_CLIENT_SECRET | API operations | Organization API client secret | - |
BW_API_BASE_URL | API operations | Bitwarden API base URL | https://api.bitwarden.com |
BW_IDENTITY_URL | API operations | OAuth2 identity server URL | https://identity.bitwarden.com |
BW_ALLOWED_DIRECTORIES | File operations | Comma-separated list of allowed file directories. Required for file-based tools (e.g. create_file_send, create_attachment, get with object: "attachment"); when unset, all file operations are rejected. | - |
BW_CLI_PATH | CLI operations | Absolute path to the bw executable or its JS entry point. Only needed when the CLI cannot be auto-located on PATH (e.g. it is not on PATH, or a non-standard global install layout). | auto-resolved from PATH |
Note: For self-hosted Bitwarden instances, set BW_API_BASE_URL and BW_IDENTITY_URL to your server URLs.
Note: BW_CLIENT_ID and BW_CLIENT_SECRET are the environment variable names read by the MCP server. If you are using bw login --apikey in a startup script, the Bitwarden CLI reads BW_CLIENTID and BW_CLIENTSECRET (no underscores between words) for the same credentials. See the Bitwarden CLI documentation.
Once configured, you can interact with Bitwarden through your AI assistant:
Vault:
Organization Administration:
lock, unlock, sync, statuslist, getcreate_item, edit_item, delete, restorecreate_folder, edit_foldercreate_attachmentcreate_org_collection, edit_org_collection, edit_item_collections, move, confirmdevice_approval_list, device_approval_approve, device_approval_approve_all, device_approval_deny, device_approval_deny_allcreate_text_send, create_file_send, list_send, get_send, edit_send, delete_send, remove_send_passwordgeneratelist_org_collections, get_org_collection, update_org_collection, delete_org_collectionlist_org_members, get_org_member, invite_org_member, update_org_member, remove_org_member, reinvite_org_member, get_org_member_groups, update_org_member_groupslist_org_groups, get_org_group, create_org_group, update_org_group, delete_org_group, get_org_group_members, update_org_group_memberslist_org_policies, get_org_policy, update_org_policyget_org_eventsget_org_subscription, update_org_subscriptionimport_org_users_and_groupsgit clone https://github.com/bitwarden/mcp-server.git
cd mcp-server
npm install
npm run build # Compile TypeScript
npm test # Run test suite
npm run lint # Check code style
npm run lint:fix # Auto-fix linting issues
npm run inspect # Test with MCP Inspector
The MCP Inspector provides an interactive testing environment:
npm run build
npm run inspect
This opens a web interface where you can:
The project includes Jest unit tests covering validation, CLI commands, and core functionality.
# Run all tests
npm test
# Run tests in watch mode
npm run test:watch
# Run tests with coverage
npm test -- --coverage
# Run specific test file
npm test validation.spec.ts
# Run tests matching a pattern
npm test -- --testNamePattern="validation"
Enable debug logging by setting environment variables:
export DEBUG=bitwarden:*
export NODE_ENV=development
BW_SESSION, BW_CLIENT_ID, BW_CLIENT_SECRET)Vault is locked
Ask your AI assistant to run the unlock tool — the MCP server will open a native OS password dialog for you to enter your master password. The password is never sent through the MCP protocol or seen by the LLM.
On headless machines (no DISPLAY on Linux, no GUI session), the unlock tool will refuse to run. Use the manual fallback:
bw unlock --raw
# Copy the token and update BW_SESSION in your MCP config
Session key is invalid
unlock tool to refresh the session in-place, or run bw unlock --raw manually and update your MCP configuration with the new tokenThe unlock tool lets your AI assistant prompt you for your master password without that password ever crossing the MCP channel.
osascript secure input dialogzenity --password (falls back to kdialog --password)bw unlock --raw via the --passwordenv flag with a randomized one-shot environment variable. It never appears in process arguments, in the MCP protocol, or in the LLM's context."Vault unlocked successfully." or a sanitized failure message (e.g. "Invalid master password.", "Unlock cancelled.").bw unlock --raw manual flow.Invalid client credentials
BW_CLIENT_ID starts with organization.BW_CLIENT_SECRET is correct403 Forbidden
We welcome contributions! Please see CONTRIBUTING.md for guidelines.
Loading reviews...
GitHub checked 64h ago - refresh overdue. Recently viewed repositories target hourly refresh.
Find a documented setup for your client. No sign-in, installation, or tool execution.
If this MCP is also published on mcpchannel.ai, you can subscribe from Browse and use the gateway config there instead.