{
  "markdown": "<p align=\"center\">\n  <img src=\"public/assets/logo.svg\" width=\"92\" alt=\"1Password Agent MCP logo\">\n</p>\n\n# 1Password Agent MCP\n\nLocal MCP access to approved 1Password items and profile data for AI agents.\n\n[npm package](https://www.npmjs.com/package/onepassword-agent-mcp) · [setup guide](docs/SETUP.md) · [security model](docs/SECURITY.md) · [uninstall guide](docs/UNINSTALL.md)\n\nAgents receive encrypted local handles, not plaintext 1Password secrets. At the moment of copy or paste, the MCP resolves the selected field locally through the 1Password CLI and sends it to the OS clipboard or active app.\n\nThe repo contains no personal 1Password data. Every install connects to that user's own 1Password CLI and local approval policy.\n\n> Not affiliated with or endorsed by 1Password.\n\n![Agent vault drag flow](docs/screenshots/mcpvault-workbench.svg)\n\n## How It Works\n\n1. Create a dedicated 1Password vault named `MCPVAULT`.\n2. Copy or move selected logins, passwords, API credentials, credit cards, secure notes, or other supported items from your normal vaults into `MCPVAULT`.\n3. Approve exact `MCPVAULT` fields for specific websites.\n4. Connect Claude Code, Codex, GitHub Copilot, or another MCP client.\n5. The agent can paste approved fields without seeing the plaintext in its response.\n\nThe MCP tools only expose approved fields from the configured agent vault. The local profile-data section can also expose user-entered values such as email, phone, address, name, and company.\n\n## Quick Start\n\nInstall from npm:\n\n```bash\nnpm install -g onepassword-agent-mcp\n```\n\nRun the friendly installer. It detects supported MCP clients, shows what it found, and asks before changing their user configuration. On macOS it separately offers the optional visible menu-bar shortcut:\n\n```bash\nonepassword-agent-mcp install\n```\n\nOr install from GitHub:\n\n```bash\nnpm install -g github:gambadio/onepassword-agent-mcp\n```\n\nPrefer explicit commands? Check your setup and connect clients manually:\n\n```bash\nonepassword-agent-mcp doctor\n```\n\nConnect every detected MCP client with one command:\n\n```bash\nonepassword-agent-mcp setup all --apply\n```\n\nStart the local console:\n\n```bash\nonepassword-agent-mcp admin\n```\n\nOpen:\n\n```text\nhttp://127.0.0.1:7319\n```\n\nFull walkthrough: [docs/USER_GUIDE.md](docs/USER_GUIDE.md)\n\nUninstall guide: [docs/UNINSTALL.md](docs/UNINSTALL.md)\n\n## Does It Always Run?\n\nNo. Installing the npm package itself adds commands only. It does not install a launch agent, daemon, background service, startup item, browser extension, or hidden resident process.\n\n- `onepassword-agent-mcp admin` runs the local approval console only while that terminal process is alive.\n- `onepassword-agent-mcp mcp` is a stdio MCP server. MCP clients such as Claude Code, Codex, or VS Code launch it as a child process when they need it.\n- `onepassword-agent-mcp setup ... --apply` only writes MCP client configuration. Existing JSON files are backed up before a merge.\n- The optional macOS menu-bar companion is installed only when you explicitly choose it. Its icon is visible whenever it is running.\n- Launch at login is a separate choice and is off by default. Even when enabled, the visible menu-bar app does not start the admin server until you choose **Open Admin Console**.\n- Restarting the computer does not auto-start this project unless you enabled the optional menu-bar login item or another app starts an MCP client that then launches the stdio server.\n- Persistent local state is limited to approvals and the local encryption key in `~/.onepassword-mcp`.\n\nYou can see this explanation any time:\n\n```bash\nonepassword-agent-mcp runtime\n```\n\n## Optional Mac Menu Bar\n\nOn macOS, the guided installer can add a clearly labeled **1P** item to the menu bar. You can also enable it later under **Mac Menu Bar Shortcut** in the local admin page.\n\nThe companion is built locally from the readable Swift source in [`native/MenuBarApp.swift`](native/MenuBarApp.swift). No opaque app binary is shipped in the npm package. The generated app uses the project's teal shield logo, is placed at `~/Applications/1Password Agent MCP.app`, and never asks for administrator access.\n\nManual controls:\n\n```bash\nonepassword-agent-mcp menubar status\nonepassword-agent-mcp menubar install\nonepassword-agent-mcp menubar launch\nonepassword-agent-mcp menubar remove\nonepassword-agent-mcp menubar install --launch-at-login\nonepassword-agent-mcp menubar login on\nonepassword-agent-mcp menubar login off\nonepassword-agent-mcp menubar uninstall --apply\n```\n\nUse `menubar remove` to close the visible shortcut without uninstalling it, and `menubar launch` to show it again. Use `menubar install` after uninstalling it. The local admin page offers the same installation controls under **Mac Menu Bar Shortcut** while the admin console is running.\n\nThe menu contains **Open Admin Console**, **Stop Admin Console**, **Launch Menu Bar at Login**, **Remove From Menu Bar**, and **Uninstall Menu Bar Shortcut**. **Open Admin Console** starts the console when needed and then opens it, so there is no separate Start action. **Remove From Menu Bar** only closes the visible helper; it stays installed and can be reopened. **Uninstall Menu Bar Shortcut** removes the helper and its login item after confirmation. Neither action changes MCP client configuration, local approvals, `MCPVAULT`, or 1Password items.\n\nThe admin console itself has explicit process controls:\n\n```bash\nonepassword-agent-mcp admin status\nonepassword-agent-mcp admin stop\n```\n\n## Requirements\n\n- Node.js 20+\n- 1Password CLI (`op`)\n- 1Password desktop app integration, or an `OP_SERVICE_ACCOUNT_TOKEN`\n- An MCP client that supports local stdio servers\n\nmacOS:\n\n```bash\nbrew install node 1password-cli\n```\n\nEnable the 1Password desktop integration:\n\n1. Open 1Password.\n2. Go to **Settings > Developer**.\n3. Turn on **Integrate with 1Password CLI**.\n4. When your agent or terminal asks for access, approve only clients you trust.\n\n![Authorize CLI access](docs/screenshots/authorize-codex.svg)\n\n## The Local Console\n\nThe console is a simple left-to-right vault flow:\n\n- **Agent Vault Setup** checks whether `MCPVAULT` exists and can create it.\n- **Choose From 1Password** searches your normal vaults and can filter by item type.\n- **Approve Agent Items** is the right-side `MCPVAULT` area. Drag an item from the left list onto it, then choose **Copy** or **Move**.\n- Copied items are grouped into simple checklists for logins, API keys, credit cards, notes, and other fields already in `MCPVAULT`.\n- **Allowed For Agents** is the final allow list MCP clients can use.\n- **Profile Data For Agents** stores profile values agents may read directly, such as email, phone, address, name, or company.\n\n![Drag to MCPVAULT](docs/screenshots/drag-to-copy.svg)\n\nCopy is the safe default. Copy now uses 1Password's revealed JSON clone pipe so the destination item keeps the original fields. Move is available, but 1Password creates a new item in the destination vault and deletes the original item from the source vault.\n\nAfter copying, nothing is shared with agents yet. In **All Fields**, copied items stay compact so the page remains easy to scan. Click **Review Details** on an item, tick only the details the agent may use, then click **Approve Selected**. Credit cards show normal checkout details separately from sensitive details like CVV or PIN. Blank allowed-sites fields mean the approved item may be used on all URLs. Items in `MCPVAULT` can also be deleted from the approval console after a confirmation prompt.\n\nWhen agents are allowed to create new credentials, those items are saved into `MCPVAULT` first. In **Approve Agent Items**, open the saved item and use **Save this item to another vault** to copy or move it into a normal 1Password vault. Copy keeps the agent-vault version. Move removes it from `MCPVAULT` and removes local approvals for that copied item.\n\n## Client Setup\n\nThe setup CLI prints a dry run by default. It detects Claude Code, Claude Desktop, Codex, VS Code, Xcode coding agents, and Raycast AI when they are installed:\n\n```bash\nonepassword-agent-mcp setup all\n```\n\nApply setup to every detected client:\n\n```bash\nonepassword-agent-mcp setup all --apply\n```\n\nThe command uses absolute executable paths so GUI apps do not depend on Terminal's `PATH`. Claude Desktop and VS Code JSON are merged with timestamped backups. Xcode's private Codex and Claude configuration folders are handled separately because Xcode does not use the normal CLI configuration.\n\nRaycast stores MCP configuration in app-managed storage and does not expose a supported external config writer. The CLI opens Raycast's official **Import Servers** screen; review the prepared entry and confirm it once in Raycast. This is the only interactive client-specific step.\n\n### Claude Code\n\n```bash\nonepassword-agent-mcp setup claude-code --apply\n```\n\nEquivalent command:\n\n```bash\nclaude mcp add --scope user onepassword-agent-mcp -- onepassword-agent-mcp mcp\n```\n\n### Codex\n\n```bash\nonepassword-agent-mcp setup codex --apply\n```\n\nEquivalent command:\n\n```bash\ncodex mcp add onepassword-agent-mcp -- onepassword-agent-mcp mcp\n```\n\n### GitHub Copilot In VS Code\n\n```bash\nonepassword-agent-mcp setup copilot --apply\n```\n\nEquivalent VS Code command:\n\n```bash\ncode --add-mcp '{\"name\":\"onepassword-agent-mcp\",\"command\":\"onepassword-agent-mcp\",\"args\":[\"mcp\"]}'\n```\n\nWorkspace fallback at `.vscode/mcp.json`:\n\n```json\n{\n  \"servers\": {\n    \"onepassword-agent-mcp\": {\n      \"type\": \"stdio\",\n      \"command\": \"onepassword-agent-mcp\",\n      \"args\": [\"mcp\"]\n    }\n  }\n}\n```\n\n### Claude Desktop\n\n```bash\nonepassword-agent-mcp setup claude-desktop --apply\n```\n\nThe CLI safely merges the server into Claude Desktop's user JSON and preserves all other settings.\n\n### Xcode\n\n```bash\nonepassword-agent-mcp setup xcode --apply\n```\n\nThis configures the isolated Codex and Claude Agent environments used only inside Xcode.\n\n### Raycast AI\n\n```bash\nonepassword-agent-mcp setup raycast --apply\n```\n\nRaycast opens its native import screen for the final confirmation. Raycast asks before MCP tool calls by default.\n\n### ChatGPT Desktop\n\nChatGPT Desktop is intentionally not included in local setup. ChatGPT currently connects to remote MCP servers rather than arbitrary local stdio commands. Do not expose this password bridge through a public tunnel merely to connect it.\n\n### Other MCP Clients\n\nPrint generic MCP JSON:\n\n```bash\nonepassword-agent-mcp setup generic --json\n```\n\nGeneric config:\n\n```json\n{\n  \"mcpServers\": {\n    \"onepassword-agent-mcp\": {\n      \"command\": \"onepassword-agent-mcp\",\n      \"args\": [\"mcp\"]\n    }\n  }\n}\n```\n\n## Stop And Uninstall\n\nStop the local approval console by pressing `Ctrl-C` in the terminal running:\n\n```bash\nonepassword-agent-mcp admin\n```\n\nDisconnect MCP clients:\n\n```bash\nonepassword-agent-mcp uninstall all\nonepassword-agent-mcp uninstall all --apply\n```\n\nThe uninstall command removes its entries from Claude Code, Claude Desktop, Codex, VS Code, and Xcode where present, then removes the optional menu-bar app/login item. Raycast opens **Manage Servers** for an explicit removal because its settings are app-managed. Other client settings and all 1Password data remain untouched.\n\nRemove the global npm package:\n\n```bash\nnpm uninstall -g onepassword-agent-mcp\n```\n\nOptional: delete this app's local approvals and encryption key:\n\n```bash\nonepassword-agent-mcp uninstall state\nonepassword-agent-mcp uninstall state --apply\n```\n\nThis deletes `~/.onepassword-mcp`. It does not delete 1Password vaults or items. Delete `MCPVAULT` inside 1Password only if you intentionally want to remove that vault.\n\n## MCP Tools\n\n- `onepassword_status`: check CLI, `MCPVAULT`, local approvals, profile data, and settings.\n- `find_secrets_for_site`: return approved encrypted handles for a website.\n- `list_approved_secrets`: list approved handles and allowed sites.\n- `copy_secret`: resolve a handle and copy the selected field to the clipboard.\n- `paste_secret`: resolve a handle, copy it, paste into the active app, and return no plaintext.\n- `clear_secret_clipboard`: clear the clipboard.\n- `save_secret_item`: save a new login, password, API credential, secure note, or credit card into `MCPVAULT` when the local save setting is enabled.\n- `get_profile_data`: return user-defined profile data allowed for the current site.\n- `find_passwords_for_site`, `list_approved_passwords`, `copy_password`, `paste_password`, and `clear_password_clipboard`: compatibility aliases.\n- `admin_ui_info`: return the approval console URL.\n\n## Security Model\n\nProtected:\n\n- Passwords are not stored by this project.\n- MCP copy/paste tools never return plaintext 1Password secret fields.\n- Handles and stored 1Password secret references are encrypted locally.\n- Disabled or deleted approvals invalidate old handles.\n- Allowed-site checks run again at copy and paste time.\n- The MCP server only lists and resolves approvals from the configured agent vault.\n- Agent-created items are opt-in, and are saved only into the configured agent vault.\n\nStill sensitive:\n\n- The OS clipboard briefly contains the plaintext field value.\n- The active app receives the field value when paste is triggered.\n- A local process with clipboard access may observe copied secrets.\n- With desktop CLI integration, the local 1Password CLI session may have broader vault access than the MCP exposes.\n- `get_profile_data` returns plaintext profile values you explicitly added in the admin UI.\n\nFor the strictest boundary, use a 1Password service account scoped only to `MCPVAULT`.\n\nRead [docs/SECURITY.md](docs/SECURITY.md) before using this with powerful browser-control agents.\n\n## Local State\n\nDefault state location:\n\n```text\n~/.onepassword-mcp/policy.json\n~/.onepassword-mcp/key.bin\n```\n\nUse a different state directory:\n\n```bash\nONEPASSWORD_MCP_HOME=/path/to/state onepassword-agent-mcp admin\n```\n\nUse a different agent vault name:\n\n```bash\nMCP_VAULT_NAME=AgentVault onepassword-agent-mcp admin\n```\n\nHeadless service-account example:\n\n```json\n{\n  \"mcpServers\": {\n    \"onepassword-agent-mcp\": {\n      \"command\": \"onepassword-agent-mcp\",\n      \"args\": [\"mcp\"],\n      \"env\": {\n        \"OP_SERVICE_ACCOUNT_TOKEN\": \"ops_...\",\n        \"MCP_VAULT_NAME\": \"MCPVAULT\"\n      }\n    }\n  }\n}\n```\n\nDo not commit service account tokens.\n\n## Troubleshooting\n\nRun:\n\n```bash\nonepassword-agent-mcp doctor\n```\n\nCommon fixes:\n\n- `op` missing: install the 1Password CLI.\n- 1Password auth failure: enable desktop CLI integration or set `OP_SERVICE_ACCOUNT_TOKEN`.\n- `MCPVAULT` missing: start the admin console and click **Create MCPVAULT**.\n- Copilot setup cannot find `code`: install the VS Code shell command or use `.vscode/mcp.json`.\n- Admin UI not running: run `onepassword-agent-mcp admin`.\n\n## Development\n\nClone the repo:\n\n```bash\ngit clone https://github.com/gambadio/onepassword-agent-mcp.git\ncd onepassword-agent-mcp\nnpm install\n```\n\nRun checks:\n\n```bash\nnpm run build\nnpm run typecheck\nnpm test\n```\n\nRun locally:\n\n```bash\nnpm run dev:admin\nnpm run dev:mcp\n```\n\nMaintainer releases are automated through GitHub Actions with short-lived OIDC credentials. See [docs/RELEASING.md](docs/RELEASING.md); local `npm publish` and repeated device authorization are not part of the release process.\n\n## License\n\nMIT\n",
  "bytes": 15270,
  "sha": "61d166ade3723a9ec8e29792f14ae0c6808eff5dc2c3bfe13f33dd928e4c7233",
  "repo_slug": "gambadio/onepassword-agent-mcp",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_gambadio_onepassword_agent_mcp_cfff31f3/readme"
}