
vaultgate
io.github.adamrowles1996由 GitHub 账号 adamrowles1996 发布v0.1.0-rc.10更新于 Oct 26, 2026
Self-hosted remote MCP server for Bitwarden and Vaultwarden with OAuth 2.1; agents hold tokens only
概览
自托管的远程 MCP 服务器,通过 OAuth 2.1 让托管型 AI 代理在不看到凭据的情况下使用 Bitwarden 或 Vaultwarden 中的凭据。
- 可以做什么
- 搜索保险库条目、读取元数据、每次调用只揭示一个密钥字段、生成密码,并可在允许时创建或更新条目
- 列出已授权的目标并对其执行类型化操作:HTTP 请求(含 Microsoft Graph)、SQL 查询与语句、SSH 与 WinRM 命令
- 通过 Semble 连接在私有 GitHub 仓库中搜索代码、查找相关代码并读取文件
- 管理按客户端的授权同意、作用域、授权与撤销,并记录每次工具调用、登录和令牌事件的审计日志
- 适用场景
- 当 Claude、Claude Code、Codex 等托管型代理需要用存放在 Bitwarden 或 Vaultwarden 保险库中的凭据操作外部系统,且希望密钥值不进入模型上下文和对话记录时适用。适合愿意自行运行并通过 HTTPS 对外暴露服务的运维者。
- 运行要求
- 需要一台自己掌控的主机,装有 Docker Engine 与 Compose 插件(或在 Debian/Ubuntu 虚拟机上使用 install.sh),一个指向它的 DNS 名称,以及可从公网访问的 80 和 443 端口;TLS 必须在其前端终止。需设置 VAULTGATE_DOMAIN、VAULTGATE_PUBLIC_URL 和 VAULTGATE_VERSION,创建密钥文件,然后用服务器地址、API 密钥客户端 ID 与密钥、主密码连接保险库。代理连接到 /mcp 端点。
安装
在 SourceWeft 中
- 打开 控制台中的 vaultgate,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Web executable,通过 Streamable HTTP。 远程服务在工作区中配置后即可从网页运行时运行。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
vaultgate
[CI] [CodeQL] [OpenSSF Scorecard] [License: Apache-2.0]
A self-hosted, remote MCP server that lets hosted AI agents such as Claude, Claude Cowork, Claude Code and Codex use your credentials without ever seeing them. The credentials stay in your Bitwarden (or Vaultwarden) vault. vaultgate uses them on the agent's behalf against systems you define (an HTTP API, Microsoft Graph, a SQL Server or PostgreSQL database, an SSH or WinRM host, a GitHub repository searched with Semble) under your policy, and hands back only the result. It is its own OAuth 2.1 authorization server, so the agent holds a short-lived, scoped, revocable token and nothing else.
Status: release candidate. Milestones M1 to M7 are merged: configuration, SQLite store, operator identity with TOTP, the OAuth 2.1 authorization server, the MCP tool surface, the managed
bw servebackend, the audit trail, packaging and the Azure template. M8 (hardening and compatibility evidence) is in progress. The actions layer, opt-in and off by default, has landed through M14: M9 the engine, the operator pages and thehttpconnector, M10 the Microsoft Graph credential adapter, M11sql, M12ssh, M13winrm, and M14 the policy-form validation messages, the call-history and writes views and grant management from the connected-clients list. M16 adds thecodeconnector: Semble code search over private GitHub repositories, with its sidecar (guide). Anhttpdestination may pin its certificate or trust a private certificate authority, and theoauth2credential mode obtains tokens from any OAuth 2.0 token endpoint (guide). vaultgate's own per-call write confirmation is withdrawn: approval belongs to the agent's client. The opt-in credential relay servesbw serve's read API to programs on tagged Tailscale nodes (guide).browseris M15; seedocs/PLAN.md.
Why
A credential an agent can read ends up in the transcript. Once an agent reveals a password in order to use it, the value sits in the model's context, in the chat transcript, in the client's logs and on whatever command line the agent builds, and revoking the agent does not take it back. vaultgate is built so that the agent never needs the value:
- Use, don't read. With the actions layer enabled (guide, spec 13 and 13a, ADR 0007), an agent names a target you defined and describes an operation: an HTTP request, a SQL query or statement, a command on an SSH or WinRM host, a Semble search of a GitHub repository. vaultgate fetches the credential from the vault, connects to the pinned destination, runs the operation inside your policy, scrubs every injected value from the result and returns what is left. An agent never supplies a host, a URL base, a database name or a credential; its arguments change what runs, never where or as whom.
- Writes are opt-in twice, and approved where you work. A write needs its own scope at consent and a target policy that allows it. Approving each call is the agent's client's job — Claude Code, for one, asks before it runs a tool its permissions do not allow — and the console lists every call that changed something.
- One audited door for the rare value that must be read. The vault tools return metadata. A single tool returns a secret value, one field of one item per call, behind its own scope, with every call audited.
- Nothing runs on the vaultgate host. No tool runs whatever an agent sends wherever it likes:
ssh_runandwinrm_runrun one command on one configured host under your allowlist (a target that accepts any command needs both its own flag and the deployment's consent), and every operation executes at its target. - The agent holds a token and nothing else. The master password and API key live only in the vaultgate process on your host, encrypted under your secret key once you connect the vault on the console's Vault page.
- Standards as written. OAuth 2.1, PKCE, RFC 9728 / 8414 / 8707 / 7591 / 7009 / 9207 and Client ID Metadata Documents, per the MCP authorization specification (2026-07-28).
- Any Bitwarden. bitwarden.com, bitwarden.eu, self-hosted Bitwarden and Vaultwarden.
- Boring to operate. One process, one SQLite file, structured logs, health
probes, an audit trail.
docker compose upis a complete installation.
Compared with other Bitwarden MCP servers
Hosted agents reach MCP servers over HTTPS and cannot run a process next to your vault, and the other Bitwarden MCP servers are built for exactly that local process:
"Not described" means the project's README does not document one. Dated verification notes with
links, and when the official stdio server is the better choice: docs/comparison.md.
Quick start
The current version is 0.1.0-rc.26 (package.json; releases are tagged on GitHub). On a VM with
Docker Engine, the Compose plugin, a DNS name pointing at it and ports 80 and 443 reachable from
the internet:
Set VAULTGATE_DOMAIN, VAULTGATE_PUBLIC_URL and VAULTGATE_VERSION in .env, then:
First run: the log prints a one-time /setup?token=… URL. Open it and create the operator
account with an e-mail address, a password and a code from your authenticator (TOTP). That
password is vaultgate's own operator login; it is not, and never becomes, your Bitwarden master
password. Sign in, and on the Vault page connect the vault: server, API key client id and
secret, and master password. vaultgate stores that connection encrypted under
VAULTGATE_SECRET_KEY, so it survives restarts and upgrades. Then add https://<host>/mcp to
Claude (or Claude Code, Codex, the MCP Inspector) as a remote MCP server and approve the scopes on
the consent page. The bw CLI that vaultgate drives is bundled in the image and installed by
install.sh; nothing else is needed on the host. Walkthrough:
docs/guides/first-run.md; details and the verification of the
image: docs/guides/install-docker-compose.md.
To let agents use credentials rather than read them, set VAULTGATE_ENABLE_ACTIONS=true and the
switch for each connector you want, restart, and add connections (targets) on the console's Connections
page: docs/guides/actions.md.
How it works
- An agent calls
/mcpand is challenged withWWW-Authenticate. - It discovers the authorization server from the protected resource metadata, registers (Client ID Metadata Document, dynamic registration, or a pre-registered id) and sends you to the consent page.
- You log in (password + TOTP) and approve the scopes:
vault:read,vault:reveal,vault:generate, optionallyvault:write, and theactions:*scopes of each connector the deployment enables. - With an
actions:*scope, the agent lists the targets granted to it and calls them:http_request,sql_query,sql_execute,ssh_run,winrm_run, andcode_search,code_find_relatedandcode_readfor Semble connections. vaultgate fetches the credential from the vault, performs the operation at the target and returns the scrubbed result; the credential never reaches the agent. - With the vault scopes, it can search items, read metadata, reveal one secret field at a time, generate passwords and, if allowed, create or update items.
Install
TLS is always terminated in front of vaultgate; every method below ends with a
public https:// origin that hosted agents can reach.
Releases publish ghcr.io/adamrowles1996/vaultgate:<version> for linux/amd64 and
linux/arm64, signed with Sigstore cosign and carrying an SBOM and a provenance attestation,
plus vaultgate-<version>.tgz and its .sha256 for the script install.
Documentation
Development
Requires Node 26 (see .nvmrc) and mise for the pinned external
linters.
Every check that runs in CI runs locally with npm run quality. See
CONTRIBUTING.md for the rules the repository enforces and why.
Licence
来源:README.md,提交 69356d9
工具
0版本历史
2- v0.1.0-rc.10最新Sep 24, 2026
- v0.1.0-rc.5Sep 23, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通必需25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式必需10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分