Skip to main content
MCP server CX Codex

onepassword — Claude Code MCP server: what it does, how to install

MCP server that reads and writes 1Password vault data via CLI. The agent can pull credentials, create new items, or mint share links.

Install into Claude Code · Platform CLI All methods and platforms ↓
claude mcp add --env OP_SERVICE_ACCOUNT_TOKEN=<OP_SERVICE_ACCOUNT_TOKEN> --env ENABLED_TOOLGROUPS=<ENABLED_TOOLGROUPS> --env SKIP_HEALTH_CHECKS=<SKIP_HEALTH_CHECKS> --env DANGEROUSLY_SKIP_ELICITATIONS=<DANGEROUSLY_SKIP_ELICITATIONS> --env OP_ELICITATION_READ=<OP_ELICITATION_READ> --transport stdio onepassword -- npx -y onepassword-mcp-server
Open on GitHub

What onepassword does

The server runs through 1Password CLI (op) and requires a service account token for auth. It lists vaults, searches items by tag, fetches metadata and full fields of logins, API keys, and secure notes. Creates new items — logins, secure notes, API credentials — and generates temporary share links for existing entries.

By default, requests for secret fields (onepassword_get_item) require user confirmation via an elicitation prompt. For non-sensitive reads there's onepassword_get_item_metadata, which returns titles, field names, tags, and vault without asking for approval. Write operations run without confirmation: these tools only add data, they do not overwrite or delete. Individual items can be whitelisted via OP_WHITELISTED_ITEMS — by title or ID — to skip the prompt on reads.

Without the op CLI in PATH and a service account token in OP_SERVICE_ACCOUNT_TOKEN, the server will not start. The ENABLED_TOOLGROUPS variable restricts the toolset: readonly enables only reads, readonly,write enables everything. The server refuses to start if elicitation is not configured (HTTP fallback URLs) and the DANGEROUSLY_SKIP_ELICITATIONS=true flag is not set.

What it helps with

  • Pull a password or API key from 1Password during an agent workflow
  • Write new credentials into a vault without manual copy-paste
  • Generate a temporary share link for a 1Password item to hand off to a colleague
  • Find all items tagged with a specific label in the vault
  • Let the agent read from the vault while blocking create and share operations

Example prompts for the agent

  • Find the staging API login in 1Password
  • Create a new login in the Private vault for [email protected] with password xyz123
  • Generate a share link for the Database Credentials item so I can send it to the developer

How to install onepassword

Platform CLI

claude mcp add --env OP_SERVICE_ACCOUNT_TOKEN=<OP_SERVICE_ACCOUNT_TOKEN> --env ENABLED_TOOLGROUPS=<ENABLED_TOOLGROUPS> --env SKIP_HEALTH_CHECKS=<SKIP_HEALTH_CHECKS> --env DANGEROUSLY_SKIP_ELICITATIONS=<DANGEROUSLY_SKIP_ELICITATIONS> --env OP_ELICITATION_READ=<OP_ELICITATION_READ> --transport stdio onepassword -- npx -y onepassword-mcp-server

Replace <…> with your own values. 2 more environment variables are in the server README

Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more

Questions about onepassword

How to install onepassword in Claude Code?

Run claude mcp add onepassword -e OP_SERVICE_ACCOUNT_TOKEN=<OP_SERVICE_ACCOUNT_TOKEN> -- npx -y onepassword-mcp-server, replacing the placeholder with your 1Password service account token.

What does onepassword do?

Gives the agent access to a 1Password vault: reads logins, API keys, and secure notes, creates new items, generates temporary share links. By default it asks for confirmation before revealing secrets.

What does onepassword need to run?

The op CLI must be installed and available in PATH, and the 1Password service account token must be passed in the OP_SERVICE_ACCOUNT_TOKEN environment variable. The server will not start without them.

Similar MCP servers

Everything for Security →

From the same set9

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor