
1password
io.github.CakeRepository由 GitHub 帳號 CakeRepository 發布v2.5.0更新於 Oct 24, 2026
MCP server for 1Password service accounts — tools and resources for vaults and credentials
概覽
社群版 MCP 伺服器,讓助理透過受限的服務帳戶瀏覽、讀取、建立、輪替與刪除 1Password 保險庫項目。
- 可以做什麼
- 列出保險庫、依標題搜尋項目並檢視項目中繼資料,預設不揭露機密;讀取項目與單一欄位,機密值需明確開啟才顯示,並可驗證 op:// 參照而不回傳值;建立登入項目、安全筆記與產生的密碼或口令短語,並更新或輪替欄位;執行本機命令,將 op:// 參照注入子程序環境,並從回傳輸出中盡力遮蔽解析出的機密;封存或永久刪除項目;提供密碼產生、憑證輪替、保險庫稽核與參照建立的引導提示,以及可瀏覽的保險庫與項目資源。
- 適用情境
- 適合讓助理處理存放在 1Password 的自動化或 CI 憑證,例如列出保險庫、輪替密碼,或執行需要機密但不必把機密貼進對話的命令。最好只用於專門的自動化保險庫,而非個人或銀行登入資訊。
- 執行需求
- 透過 npx 以 stdio 在本機執行,需要 Node.js 20 或更新版本。需要 1Password 服務帳戶權杖,透過 OP_SERVICE_ACCOUNT_TOKEN 提供;在 macOS 上也可透過 OP_KEYCHAIN_SERVICE 與選用的 OP_KEYCHAIN_ACCOUNT 從鑰匙圈讀取。選用 OP_MCP_ALLOWED_VAULTS 可限制可用的保險庫。需要連線至 1Password 的網路存取。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 1password,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
1Password MCP Server
[CI] [npm] [Node] [MCP] [License]
Give your AI assistant a locked door to 1Password — not a pile of passwords in the chat.
@takescake/1password-mcp is a community Model Context Protocol (MCP) server. It lets Claude, Cursor, VS Code Copilot, OpenAI Codex, Gemini, and other MCP clients manage vaults and credentials through a 1Password Service Account.
Built on the MCP TypeScript SDK v2 with protocol negotiation for 2026-07-28 (and legacy clients). Secrets stay in 1Password; agents prefer op:// references and op_run so plaintext never has to land in the model transcript.
Not an official 1Password product. Community-built, Apache 2.0 licensed.
Who this is for
Why teams pick this server
- Security-first defaults —
password_readreturns metadata, anditem_gethides secret-bearing fields (passwords, SSH keys, OTP seeds, card numbers), unless you opt in withreveal: true. op_run(the MCP equivalent ofop run) — injectop://vault/item/fieldinto a local command’s environment; resolved secrets are redacted from the returned stdout/stderr on a best-effort basis (including common encodings).- Full vault toolkit — list, search, get, edit, create logins & notes, rotate passwords, archive, or delete.
- Guided prompts — password generation, credential rotation, vault audit, and secret-reference helpers.
- Browsable resources — vault and item catalogs over
onepassword://…URIs (no secrets in resource payloads). - Modern MCP — stdio transport, Zod 4 schemas, MCP 2026-07-28 negotiation with legacy client compatibility.
What you get
Tools (15)
Grouped the way agents and humans actually use them.
Discover
Read (safe by default)
Create & update
Use secrets without revealing them
Soft-delete & destroy
Prompts (4)
Resources (3)
Upgrading from 4.x: resource URIs used to start with
1password://, which MCP clients could never read (a URI scheme can't start with a digit). Replace any hard-coded1password://URIs withonepassword://.
Before you start
You need two things:
- Node.js 20 or newer
- A 1Password Service Account with access to the vault(s) you want the AI to use
Create a service account (plain English)
- Sign in to your 1Password account on the web.
- Open Developer → Service Accounts (or follow 1Password’s guide).
- Create a service account and grant it only the vaults you want automation to touch (for example an
AutomationorCIvault — not your personal banking vault). - Copy the token once. Treat it like a master key.
Quick start
Claude Desktop / Cursor / VS Code / most IDEs
Add this to your MCP config (exact file depends on the app):
Restart the app, then try: “List my 1Password vaults.”
macOS Keychain (no token in the config file)
Store the token in Keychain, then point the server at it:
Token resolution order: CLI (--service-account-token / --token) → OP_SERVICE_ACCOUNT_TOKEN → macOS Keychain. OP_KEYCHAIN_ACCOUNT is optional when the service name alone is unique. Avoid the CLI flags: command-line arguments are visible to other local processes, and the server logs a warning at startup if you use them.
OpenAI Codex (TOML)
Option A — token in config:
Option B (recommended) — config only names the env var:
Set OP_SERVICE_ACCOUNT_TOKEN in your shell or CI. Note: codex mcp add ... --env OP_SERVICE_ACCOUNT_TOKEN=... writes the secret into Codex config; prefer env_vars when you can.
On macOS you can omit the token env and use OP_KEYCHAIN_SERVICE (+ optional OP_KEYCHAIN_ACCOUNT) instead.
Optional: restrict the server to certain vaults
By default the server can use any vault the service account can see. To allow-list vaults:
Names or IDs work (case-insensitive). Same setting via --allowed-vaults. The allow-list applies server-wide, to every tool and resource that touches a vault, not only op_run / op_check_ref:
vault_listandonepassword://vaultsshow only allowed vaults.- Tools that take a
vaultId, and theonepassword://vaults/{vaultId}/itemsresource, must be given the vault’s ID (not its name); vaults outside the list are rejected. op://references are checked both as written and by the vault they actually resolve to.- When an allow-list is set, each guarded call makes one extra
vaults.listread (mind service-account rate limits), and the server fails closed if vaults can’t be listed.
Upgrading from 4.0.3 or earlier? If you set this expecting it to affect only
op_run/op_check_ref, it now restricts everything.
This is defense in depth: scope the service account’s own vault access in 1Password first.
For agents: how to handle secrets
Follow this order every time:
- Discover with
vault_list→item_lookup/item_list(metadata only). - Confirm a reference with
op_check_ref— neverrevealjust to see if a path exists. - Use a secret in a command or API call with
op_runandop://vault/item/fieldinenv. - Reveal with
password_read/item_get+reveal: trueonly when the human explicitly needs the value in chat. - Rotate with
password_generate→password_update(keepreturnSecret: falseunless asked). - Prefer
item_archiveoveritem_deleteunless permanent removal is required.
op_run sketch
Prefer argv over a shell command string when you can — fewer quoting surprises.
Configuration reference
Environment variables
CLI flags
Security & privacy
Read this before pointing the server at a vault you care about.
- LLM privacy — Anything revealed to the model may be sent to your AI provider and retained under their policies.
- MCP is not end-to-end encrypted for secrets in flight — Values are plaintext inside the MCP workflow and toward the model. They are encrypted at rest in 1Password once stored.
- Best fit — Automation credentials: CI tokens, bot accounts, disposable env secrets.
- Avoid — Banking, primary personal logins, recovery codes, or anything you cannot afford to expose to a model provider.
- Token = master key — Scope the service account tightly; rotate immediately if leaked; never commit tokens or MCP configs with secrets.
- Prefer the env var or Keychain for the token —
--token/--service-account-tokenputs it in the process arguments, which other local processes can read (the server warns at startup). A same-user process can generally read the server’s environment too (for example/proc/<pid>/environon Linux), so on macOS Keychain is the strongest option: it keeps the token out of config files and the process environment. - Prefer references —
op://…+op_runbeat pasting passwords into prompts or files. op_runruns arbitrary commands as your user — Keep your MCP client’s approval prompts on for it; don’t auto-approve it.- Redaction is best effort —
op_runmasks resolved secrets in returned output, including common encodings (base64, JSON- and URL-encoded forms, multi-line values). That protects against accidental disclosure. It is not a sandbox: a command can deliberately transform or transmit a secret it was given. - Notes are not concealed —
item_getreturns notes as-is (likeop item get). Don’t keep secrets in the notes of vaults an agent can read. - Least privilege — Dedicated automation vaults beat sharing your whole account.
OP_MCP_ALLOWED_VAULTSis a second fence, not a substitute. - Reporting vulnerabilities — Open a public issue; see SECURITY.md.
Protocol & compatibility
Development
Watch mode: npm run dev.
Project layout
See CONTRIBUTING.md. Maintainers / agents: agents.md.
Changelog
See CHANGELOG.md for version history, including the 5.0.0 release (resource URIs moved from 1password:// to onepassword://, plus security hardening; read its Changed notes before upgrading), the 4.0.0 MCP v2 / 2026-07-28 migration, and the 3.0.0 op_run / reveal-opt-in security changes.
License
來源:README.md,提交 9287e77
工具
0版本歷史
1- v2.5.0最新Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分