bitwarden-agent-vault-mcp
An MCP server for using Bitwarden Secrets Manager as durable credential storage for agent workflows, enabling secure secret storage, retrieval, and injection into trusted executables.
README
Bitwarden Agent Vault MCP
An unofficial, open-source Codex plugin and local MCP server for using Bitwarden Secrets Manager as durable credential storage for agent workflows.
The server runs locally over MCP stdio. It does not open a network port and it does not contain a Bitwarden token, organization ID, project ID, password, or API key. Every installation must supply its own Bitwarden machine account and private configuration.
This community project is not affiliated with or endorsed by Bitwarden, Inc.
What it does
- Stores and rotates stable agent credentials in Bitwarden Secrets Manager.
- Lists projects and secret metadata without returning values.
- Retrieves a secret when plaintext is explicitly required.
- Injects selected secrets into an allowlisted executable without placing them in the normal command output.
- Opens the Bitwarden Secrets Manager web vault on macOS.
- Includes a Codex skill for automatically saving durable credentials that Codex creates, receives, or discovers.
Security model
Codex MCP client
| local JSON-RPC over stdin/stdout
v
Bitwarden Agent Vault MCP server
| machine token from macOS Keychain or BWS_ACCESS_TOKEN
v
Bitwarden Secrets Manager API via bws
- The MCP server uses stdio and has no HTTP listener.
- The machine token is read from macOS Keychain by default. On other platforms,
it must be supplied to the MCP process as
BWS_ACCESS_TOKEN. - Bitwarden project and secret permissions remain the authoritative access boundary. Use a least-privilege machine account.
store_secretrefuses to overwrite an existing key unlessoverwrite: trueis explicitly supplied.get_secretis disabled by default and requires an explicit privateallowPlaintextRevealopt-in.run_with_secretsis disabled by default. When enabled, it requires an absolute executable allowlist and injects only the requested secret keys.- Command output is redacted for exact secret values. Redaction cannot prevent an executable from encoding, transforming, writing, or transmitting a secret. Only allowlist purpose-built programs you trust.
get_secretintentionally returns plaintext to the MCP client. Do not expose this server to untrusted clients or untrusted prompt sources.
See SECURITY.md for reporting and operational guidance.
Requirements
- Node.js 20 or later
- A Bitwarden Secrets Manager organization, project, and machine account
- Bitwarden Secrets Manager CLI (
bws) - Codex with local plugin/MCP support
- macOS for the included Keychain helper; Linux can use an MCP-process environment variable
The server may work on Windows when bws is installed and
BWS_ACCESS_TOKEN is provided, but the helper scripts are currently tested for
macOS and Linux shells only.
Install
Clone the repository into the conventional personal plugin source location:
git clone https://github.com/ceweldy/bitwarden-agent-vault-mcp.git \
"$HOME/plugins/bitwarden-agent-vault"
cd "$HOME/plugins/bitwarden-agent-vault"
npm ci
Install bws with the checksum-verifying helper, or install it from Bitwarden's
official release process:
./scripts/install-bws.sh
Create a Bitwarden Secrets Manager project and a machine account with only the required project permissions. Copy the machine access token once.
On macOS, store the token in Keychain without placing it in a file or shell history:
./scripts/store-machine-token.sh
On non-macOS systems, configure BWS_ACCESS_TOKEN only in the MCP host's
private process environment. Do not commit it or place it in a shared shell
profile.
Create the private configuration:
mkdir -p "$HOME/.config/bitwarden-agent-vault"
cp config.example.json "$HOME/.config/bitwarden-agent-vault/config.json"
chmod 600 "$HOME/.config/bitwarden-agent-vault/config.json"
Replace defaultProjectId with your Bitwarden project UUID. The UUID is not a
secret, but keeping deployment metadata outside the repository avoids leaking
your vault structure.
Check the live connection:
./scripts/doctor.sh
Add the Codex plugin
Add this entry to the plugins array in your personal Codex marketplace at
~/.agents/plugins/marketplace.json. Preserve any entries already in that
file.
{
"name": "bitwarden-agent-vault",
"source": {
"source": "local",
"path": "./plugins/bitwarden-agent-vault"
},
"policy": {
"installation": "AVAILABLE",
"authentication": "ON_INSTALL"
},
"category": "Productivity"
}
Then install it:
codex plugin add bitwarden-agent-vault@personal
Start a new Codex task so the MCP tools and skill are loaded.
Configuration
The server reads ~/.config/bitwarden-agent-vault/config.json unless
BITWARDEN_AGENT_CONFIG points to another file.
| Field | Required | Meaning |
|---|---|---|
serverUrl |
No | Bitwarden API server; defaults to Bitwarden cloud. |
defaultProjectId |
Recommended | Project used when a tool call omits project_id. |
allowPlaintextReveal |
No | Must be exactly true to enable get_secret. |
allowCommandExecution |
No | Must be exactly true to enable run_with_secrets. |
allowedExecutables |
When enabled | Absolute paths to trusted executable files. |
To opt into command execution, use a private configuration such as:
{
"serverUrl": "https://vault.bitwarden.com",
"defaultProjectId": "replace-with-your-bitwarden-project-id",
"allowPlaintextReveal": false,
"allowCommandExecution": true,
"allowedExecutables": [
"/absolute/path/to/a-purpose-built-tool"
]
}
Avoid allowlisting shells, general-purpose interpreters, download tools, or network clients. They defeat the purpose of an executable allowlist.
MCP tools
| Tool | Behavior |
|---|---|
status |
Checks local token, CLI, optional remote access, and command-execution state. |
list_projects |
Returns accessible project metadata. |
list_secrets |
Returns secret names and metadata, never values. |
get_secret |
Returns one exact secret value when privately enabled. |
store_secret |
Creates a secret or explicitly rotates an exact-key match. |
run_with_secrets |
Runs an enabled, allowlisted executable with selected secret keys. |
open_bitwarden |
Opens the Bitwarden Secrets Manager web UI on macOS. |
Development
npm ci
npm run check
npm audit --omit=dev
Tests use a fake bws fixture and contain no real credentials. Never add live
tokens, vault exports, .env files, personal configuration, or customer data
to tests or issue reports.
License
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。